Forum Replies Created

Viewing 15 posts - 19,651 through 19,665 (of 49,552 total)

  • RE: Database compatability Level 2008

    Yes, Cross Apply works, so does any DMV. What doesn't work is this:

    SELECT sql_handle ,

    text

    FROM sys.dm_exec_query_stats AS qs

    CROSS APPLY...

    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 compatability Level 2008

    Lynn Pettis (3/21/2012)


    Also, in comapability level 80 (SQL Server 2000) you don't have access to new system tables and dmvs introduced in SQL Server 2005 and expanded in SQL Server...

    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 compatability Level 2008

    The compat mode just affects how the query processor processes and checks certain T-SQL constructs. It's not about different behaviour (much), CheckDB does the same in a DB under compat...

    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: Are the posted questions getting worse?

    Brandie Tarvin (3/21/2012)


    May I just say that, according to Salary.com, I am not wasting my time by posting to The Thread.

    http://business.salary.com/why-how-your-employees-are-wasting-time-at-work/%5B/url%5D

    The link, it is broken. This one maybe: http://business.salary.com/why-how-your-employees-are-wasting-time-at-work/

    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: Effective filtering of SQL Profiler tracing

    The showplan events don't have durations or the like, so they can't be filtered. Nasty problem.

    What I've recommended in the past is a 2-phase approach. Trace first for the 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: how can i use the mirrored database? help plz

    The command is

    RESTORE DATABASE <database name> WITH RECOVERY

    However you can only do that if mirroring is completely removed and once done you can't resume mirroring.

    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: Coding Standards

    SQLKnowItAll (3/19/2012)


    Do you think a MS developer sat down and created these in an SSMS window and then executed them?

    Yes, though it's more likely something like Query Analyser...

    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 can i use the mirrored database? help plz

    If you've stopped mirroring completely, you can run RESTORE DATABASE <database name> WITH RECOVERY, but to restart mirroring after that you'd need to set up from scratch, restoring a new...

    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 can i use the mirrored database? help plz

    The mirror database is restoring and is unavailable. Can you explain more what you're trying to do?

    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: Are the posted questions getting worse?

    Evil Kraig F (3/20/2012)


    GilaMonster (3/20/2012)


    I have a number of physics courses, a couple of astrophysics, one or two philosophy and a calculus one queued up to watch.

    My hats off 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: How to diagnose deadlocking in production environment

    You don't need to run profiler traces or to restart the SQL Server at all. The traceflag that you referenced is very, very light weight and will cause no hassle...

    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: Filtering with @variables

    jcb (3/20/2012)


    Gail,

    I had found:

    WHERE (key1 = @key1 AND @key1 IS NOT NULL)

    OR (key2 = @key2 AND @key2 IS NOT NULL)

    OR (key3 = @key3 AND @key3 IS NOT NULL)

    makes better execution...

    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: Prevent or log Truncate Table commands

    DDL triggers won't pick up a truncate, neither will DML triggers.

    Have you considered Extended Events?

    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: Prevent or log Truncate Table commands

    Don't give users DDL Admin or above permissions.

    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: Filtering with @variables

    Sean Lange (3/20/2012)


    Same here. I figure with a single parameter that either of these would perform reasonably well.

    Depends. Even with one parameter the IF is prone to erratic plans. Depending...

    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 - 19,651 through 19,665 (of 49,552 total)