Forum Replies Created

Viewing 15 posts - 31,201 through 31,215 (of 49,552 total)

  • RE: deadlock

    SQL automatically resolves deadlocks as soon as it detects them. The error message that one gets is a notification that SQL detected the deadlock, resolved it by killing one session,...

    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: join

    Assuming you're using management studio...

    In Object Explorer, right click the table, select script table -> Create -> To new query window. Now you've got the table's creation scripts.

    Jeff's article covers...

    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: Alternative for DMV.

    Bhuvnesh (8/17/2010)


    IS sys.dm_db_index_usage_stats not a DMV ?

    Yes it is.

    If you need to do something on insert/update/delete, I recommend triggers. That DMV is just to give info on how indexes...

    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: Get the data after DB getting Crashed

    Google is your friend

    http://msdn.microsoft.com/en-us/library/ms179314.aspx

    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: join

    niyinks (8/17/2010)


    No idea about the clustering but my last post describes the national table

    My apologies, copied the wrong link and didn't notice (what I get for working on presentation 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: create Procedure within Procedure

    Well, the GO in the 'middle' of procedure A ends the batch. Hence leaving a begin without an end and, in the second batch an end without a begin.

    GO is...

    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: join

    niyinks (8/17/2010)


    pls clarify what you mean by table definitions

    Please read the article I linked to.

    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: join

    Table definitions please, sample data and expected results.

    Please read the article I linked to.

    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: create Procedure within Procedure

    Is there a question here? Your code looks like it should work, just add an EXEC to run the dynamic sQL you generated.

    I do have to ask... Why?

    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: join

    Please post table definitions, sample data and expected results as per http://www.sqlservercentral.com/articles/Best+Practices/61537/

    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: Alternative for DMV.

    Why can't you use the DMV?

    There's no really practical alternative. I suppose you could trace for the actual execution plans, load into a table and use xquery to see what...

    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: Get the data after DB getting Crashed

    Depending on how the database crashed. If SQL is still running and the transaction log is still available you can do a tail-log backup and back up right to the...

    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: Creating Procedures & Functions on a filegroup other then Primary

    Well for restore purposes you have to restore PRIMARY, so by doing that you'll have all of your procedures.

    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: Creating Procedures & Functions on a filegroup other then Primary

    Procedures are stored within one of the system tables, and the system tables are always on the Primary filegroup.

    Why are you asking?

    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: Date Conversion Fills the Transaction log

    You can, it's a little more complex that way as you need to know the distribution of the data. I'd typically do it like this. (not tested!)

    DECLARE @Done Bit;

    Set @Done...

    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 - 31,201 through 31,215 (of 49,552 total)