Forum Replies Created

Viewing 15 posts - 31 through 45 (of 104 total)

  • RE: Alter Table - Find who altered it and when

    GilaMonster (7/7/2010)


    If the record of the change has already been dropped from the default trace (which only contains 5 files of 20MB each), no.

    If you wish to track this...

    Thanks,
    Santhosh


    Human Knowledge Belongs To The World !!

  • RE: Alter Table - Find who altered it and when

    Thank you.

    But it contains only 15mins of information...

    that too all the information are related to index like

    IX_indexName:

    DDL Operation: ALTER

    Time:

    Login Name:

    User Name:

    Is there any way to find atleast 2days old...

    Thanks,
    Santhosh


    Human Knowledge Belongs To The World !!

  • RE: deadlock by 2 triggers on same table

    WayneS (6/30/2010)


    Also, can you run a trace on one (just one) of these inserts, and post that execution plan? I want to ensure that you have proper indexes on all...

    Thanks,
    Santhosh


    Human Knowledge Belongs To The World !!

  • RE: deadlock by 2 triggers on same table

    Jeff Moden (7/1/2010)


    GilaMonster (6/30/2010)


    Jeff Moden (6/30/2010)


    ... but don't mind giving a little advice on what to change. 😉

    The entire thing? 😉

    Heh... z'actly. 😛

    Hi All,

    thanks for your valuable suggestions.

    i know cursors...

    Thanks,
    Santhosh


    Human Knowledge Belongs To The World !!

  • RE: deadlock by 2 triggers on same table

    WayneS (6/30/2010)


    KBSK (6/29/2010)


    Hi,

    please help me in analyzing this deadlock...

    what is causing the deadlock(i mean which query/insert statement is causing the deadlock)

    Is this the information that you're looking for?

    process 1:

    INPUT BUFFER:...

    Thanks,
    Santhosh


    Human Knowledge Belongs To The World !!

  • RE: deadlock by 2 triggers on same table

    Hi,

    any updates please.

    i know here cursors have been used extensively but need to know where i should modify.

    the deadlock happened when two INSERTs occured on a table.

    Thanks,

    KB

    Thanks,
    Santhosh


    Human Knowledge Belongs To The World !!

  • RE: deadlock by 2 triggers on same table

    GilaMonster (6/29/2010)


    Can you post the schema of the table, all indexes and the trigger definitions?

    Schema of table and indexes & triggers are attached.

    Thanks,
    Santhosh


    Human Knowledge Belongs To The World !!

  • RE: inserting GL001 to GL100 in a loop

    Dave Ballantyne (2/1/2010)


    Get out of the habit of looping , use tally tables

    This ...

    insert myTable(Activity_Codes)

    select 'GL'+ Right('000' + convert(varchar(3), number),3) from master..spt_values where type =...

    Thanks,
    Santhosh


    Human Knowledge Belongs To The World !!

  • RE: inserting GL001 to GL100 in a loop

    vstitte (2/1/2010)


    Try this

    declare @id int

    set @id = 001

    While @id <=100

    begin

    insert myTable(Activity_Codes)

    select 'GL'+ Right('000' + convert(varchar, @id),3)

    set @id=@id+1

    end

    Yes, got it...

    Thanks,

    KB

    Thanks,
    Santhosh


    Human Knowledge Belongs To The World !!

  • RE: Locking a stored procedure for updating/reading

    Scott Coleman (7/27/2009)


    -- Use multiple assignment to save the new value in a variable

    DECLARE @ID INT

    UPDATE dbo.TestTable SET @ID = ID = ID + 1

    PRINT @ID

    How does the code work?

    SET...

    Thanks,
    Santhosh


    Human Knowledge Belongs To The World !!

  • RE: Rollback the committed transaction !!!

    thanks, I Got it... and i got how the nested transactions work..

    thank you,

    KB

    Thanks,
    Santhosh


    Human Knowledge Belongs To The World !!

  • RE: Query is using DISTINCT and seems to take long time to execute

    Select name from myTable

    except

    select productName from myAnotherTable

    where productCode = 'SomeProduct'

    Gianluca Sartori (9/11/2009)


    Did you try EXISTS?

    Select distinct name

    from myTable

    where NOT EXISTS (

    select 1

    ...

    Thanks,
    Santhosh


    Human Knowledge Belongs To The World !!

  • RE: ADD Constraint - set default 0

    Awesome. Sorry about the interruptions - but Ian and I are having a fascinating discussion, hope you didn't mind too much :blush:

    Thats ok...

    I am also learning from your discussions...

    Thanks,
    Santhosh


    Human Knowledge Belongs To The World !!

  • RE: ADD Constraint - set default 0

    alter table dbo.myTable alter column Quota int not null

    But this only works after you have removed existing null values

    Thanks,

    it worked.

    -

    KB

    Thanks,
    Santhosh


    Human Knowledge Belongs To The World !!

  • RE: ADD Constraint - set default 0

    KB (9/9/2009)


    ALTER TABLE dbo.myTable ADD CONSTRAINT DF_myTable_Q DEFAULT(0) FOR Quota

    currently the Quota column is "int NULL"

    how to change it to "int NOT NULL" ?

    -

    KB

    Thanks,
    Santhosh


    Human Knowledge Belongs To The World !!

Viewing 15 posts - 31 through 45 (of 104 total)