Forum Replies Created

Viewing 15 posts - 8,221 through 8,235 (of 49,552 total)

  • RE: Can't Drop Table, Select or create a PK or Index

    What doesn't make sense? There's nothing wrong with the check table output and without any more info on what you mean by 'can't Drop Table, Select or create a PK...

    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: Difference In Query Plans while Executing Same Query Independently and Within Stored Proc

    er.mayankshukla (8/6/2014)


    Thanks Gail,

    So if I am correct for parameterized proc. SQL creates a plan depending on table size as parameter values are not known till compile time.

    Since in my case...

    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: Estimated time to complete the query.

    There's no estimated completion for queries, that's for things like backups.

    No way to tell how long the query will take other than to run it and see.

    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: Difference In Query Plans while Executing Same Query Independently and Within Stored Proc

    er.mayankshukla (8/6/2014)


    The Part1 link says that using local variable, the compiler doesn't know the parameter and creates an average plan.

    What does it mean?

    It means exactly that. At compile time, 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: Questions on Implementing TDE

    You cannot encrypt master!

    TDE has never been about preventing people from accessing the DB. It protects the files at rest and the backups of the user databases, that is all....

    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: clustering Vs Mirroing Vs Logshipingf Vs replication

    To be honest, recommend that they get someone experienced with HA/DR in to do the design at the very least.

    Otherwise, start with this:http://www.amazon.com/Server-2005-Availability-Experts-Voice/dp/159059780X/

    and tell your boss that you'll need...

    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: Difference In Query Plans while Executing Same Query Independently and Within Stored Proc

    er.mayankshukla (8/6/2014)


    But kindly explain me how using local variable helps in overcoming parameter sniffing

    See Part 1 linked above.

    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: Difference In Query Plans while Executing Same Query Independently and Within Stored Proc

    It's parameter sniffing, more correctly the lack thereof (see part 2 linked above)

    Can't give you any advice since I have no idea which of those indexes are on what columns.

    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: TSQL - Trigger Inserted multiple rows after Insert

    Valbuenito (8/6/2014)


    It don't exist a means to create an autoincrement on my SELECT ?

    Look up ROW_NUMBER()

    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: TSQL - Trigger Inserted multiple rows after Insert

    And?

    If that's not what you want (which is not at all clear), you need to debug and fix whatever's wrong.

    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: normalization estate exercise

    sqlvogel (8/6/2014)


    pietlinden (8/5/2014)


    How can you get to 3NF if you don't go through 1NF and 2NF first?

    Very easily, you just need to ensure that the non-trivial determinants of every non-key...

    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: Corruption from backup/restore but original db check db is fine

    Last time CheckDB ran *successfully*

    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: Corruption from backup/restore but original db check db is fine

    Lempster (8/6/2014)


    Are you sure about that Gail?

    Yes, absolutely, 100% certain

    Below is an extract from a SQL Server log at the time a database was recovered from a Restoring state....

    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: TSQL - Trigger Inserted multiple rows after Insert

    You need to remove the variables, remove the select from inserted, do whatever calculation of addressid and contact ID in the insert statements and use the INSERT ... SELECT form...

    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: TSQL - Trigger Inserted multiple rows after Insert

    Because your trigger assumes there will be one row in inserted. There won't, there will be one row for each row inserted.

    Discard the variables, remove the SELECT @var = ......

    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 - 8,221 through 8,235 (of 49,552 total)