Forum Replies Created

Viewing 15 posts - 22,996 through 23,010 (of 49,552 total)

  • RE: Query plan showing index seek, Activity Monitor shows Keylocks

    MyDoggieJessie (10/7/2011)


    Would there be any benefit to using ROWLOCK over the update lock?

    No. You already have rowlocks.

    Or going further, disabling lock escalation altogether on the table, and...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: SQL Log Shipping, A new usage?

    That sounds like a classic candidate for replication. Transactional if one way, perhaps merge if the central needs to be updated from the secondaries as well

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Backup With Compression - Does it cause fragmentation?

    A restore will always recreate the databae exactly as it was at time of backup. No alterations, no layout changes, nothing.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: database is in suspect mode (sql server 2008 R2 version)

    Agreed, restore from backup. If you have a good backup strategy, you'll only lose since the last log backup.

    If there is no backup, it might be possible to repair,...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Store Proc should return correct result

    Nice procedure. So, what's the question?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Dynamic Index Drop Create Script

    anthony.green (10/7/2011)


    Morning All

    I have the following script so far to check for any indexes which have not been used in a lookup, scan or seek and to create a drop...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: trigger

    As Lumbago showed you

    http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=166392

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: How to delete record if error occurs ?

    Don't think about manually deleting them. Do all the operations in a transaction and let SQL manage the undo if there's an error.

    BEGIN TRANSACTION

    BEGIN TRY

    INSERT INTO tblAttendanceClasses ...

    ...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Query plan showing index seek, Activity Monitor shows Keylocks

    First question. Why are you forcing update locks in a select?

    If that's running a few thousand time, there will be at least 2 key locks per query (one for...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: LDF file size issue

    http://www.sqlservercentral.com/articles/Transaction+Log/72488/

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: A severe error occurred on the current command.The results, if any, should be discarded.

    Please run the following and post the full and complete results

    DBCC CHECKDB (<Database Name>) WITH NO_INFOMSGS, ALL_ERRORMSGS

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: 'Not In' Question

    And here's an explanation: http://sqlinthewild.co.za/index.php/2010/02/18/not-exists-vs-not-in/

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: 'Not In' Question

    I'm going to make a wild guess... there's at least one NULL in the guid column in TableA?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: IF EXIST - DO NOTHING

    If you're going to rollback, you need a begin transaction, however you don't need a rollback, at the point you have it there's nothing to rollback

    You also don't need that...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: which trigger event

    Read up on the UPDATED() and COLUMNS_UPDATED () functions.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 15 posts - 22,996 through 23,010 (of 49,552 total)