Forum Replies Created

Viewing 15 posts - 5,731 through 5,745 (of 7,616 total)

  • RE: Datatype to be changed from Varchar to Nvarchar

    Hmm, I read it as going to varchar to nvarchar.

    That is tricky, if any code uses local variables of type "varchar" to hold those columns. Given the implicit conversion...

  • RE: How to resolve deadlock issues.

    New Born DBA (10/7/2014)


    ScottPletcher (10/7/2014)


    You're welcome!

    Please let me know [if] it actually helps.

    It's working just fine. Before creating the index on the table, deadlocks occurred every half an hour but...

  • RE: Changing Datetime to Int and set it to beginning of month

    Luis Cazares (10/7/2014)


    ScottPletcher (10/7/2014)


    For consistency, I'd stick with just explicitly CASTing the second value to an int:

    SELECT CAST(DATEADD(MONTH, DATEDIFF(MONTH, 0, GETDATE()), 0) AS int)

    I agree with you, but you missed...

  • RE: How to resolve deadlock issues.

    New Born DBA (10/7/2014)


    ScottPletcher (10/7/2014)


    New Born DBA (10/7/2014)


    ScottPletcher (10/7/2014)


    New Born DBA (10/7/2014)


    ScottPletcher (10/7/2014)


    USE [DBName]

    GO

    CREATE CLUSTERED INDEX [Company_FormName] ON [dbo].[COLUMN_NEXT_ID]

    (

    [Company], [Form_Name]

    )WITH ( FILLFACTOR = 100 ) ON [PRIMARY]

    Now this is the...

  • RE: How to resolve deadlock issues.

    New Born DBA (10/7/2014)


    ScottPletcher (10/7/2014)


    New Born DBA (10/7/2014)


    ScottPletcher (10/7/2014)


    USE [DBName]

    GO

    CREATE CLUSTERED INDEX [Company_FormName] ON [dbo].[COLUMN_NEXT_ID]

    (

    [Company], [Form_Name]

    )WITH ( FILLFACTOR = 100 ) ON [PRIMARY]

    Now this is the warning I am getting:

    Warning!...

  • RE: How to resolve deadlock issues.

    New Born DBA (10/7/2014)


    ScottPletcher (10/7/2014)


    USE [DBName]

    GO

    CREATE CLUSTERED INDEX [Company_FormName] ON [dbo].[COLUMN_NEXT_ID]

    (

    [Company], [Form_Name]

    )WITH ( FILLFACTOR = 100 ) ON [PRIMARY]

    Now this is the warning I am getting:

    Warning! The maximum key length...

  • RE: Changing Datetime to Int and set it to beginning of month

    For consistency, I'd stick with just explicitly CASTing the second value to an int:

    SELECT CAST(DATEADD(MONTH, DATEDIFF(MONTH, 0, GETDATE()), 0) AS int)

  • RE: How to resolve deadlock issues.

    USE [DBName]

    GO

    CREATE CLUSTERED INDEX [Company_FormName] ON [dbo].[COLUMN_NEXT_ID]

    (

    [Company], [Form_Name]

    )WITH ( FILLFACTOR = 100 ) ON [PRIMARY]

  • RE: Book example doesn't work, how come?

    The db must be SQL 2000, or in SQL 2000 compatibility mode (80).

    Yikes and gadzooks! You need to move it forward to at least 2005 as fast you can,...

  • RE: How to resolve deadlock issues.

    New Born DBA (10/7/2014)


    ScottPletcher (10/6/2014)

    The index I suggested was on Company and Form_Name.

    Do you think I should test it out in Dev and QA first before I add a clustered...

  • RE: How to resolve deadlock issues.

    New Born DBA (10/6/2014)


    ScottPletcher (10/6/2014)


    New Born DBA (10/6/2014)


    ScottPletcher (10/6/2014)


    Add a clustered index to the "COLUMN_NEXT_ID" table on "Company" and "Form_Name".

    And how creating an index will help?:-D

    It will avoid a full...

  • RE: How to resolve deadlock issues.

    New Born DBA (10/6/2014)


    ScottPletcher (10/6/2014)


    Add a clustered index to the "COLUMN_NEXT_ID" table on "Company" and "Form_Name".

    And how creating an index will help?:-D

    It will avoid a full table scan, locking as...

  • RE: Improving performance on slow running query

    Suggested query below. If you're willing to add a nonclustered index, you can try the affect of adding the index below before running the query. I can't tell...

  • RE: How to resolve deadlock issues.

    Add a clustered index to the "COLUMN_NEXT_ID" table on "Company" and "Form_Name".

  • RE: fast_forward cursors are read only but are they insensitive?

    Code below appears to confirm that. Although I did notice that if you added "TOP (100)", it became a KEYSET cursor, even w/o you explicitly indicating that.

    DECLARE csr1 CURSOR...

Viewing 15 posts - 5,731 through 5,745 (of 7,616 total)