Forum Replies Created

Viewing 15 posts - 10,321 through 10,335 (of 49,552 total)

  • RE: problem with default constraint

    Define 'not working'?

    What exactly did you do? What behaviour are you expecting? what are you seeing?

    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: What do you use to find out what's slowing down your instance right now

    sys.dm_exec_requests join sys.dm_exec_sessions cross apply sys.dm_exec_sql_text.

    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 in Restoring State since upgrade of OS to Windows Server 2008 Enterprise

    Welsh Corgi (1/21/2014)


    So I should turn it off on all backup maintenance plans?

    Do you want your databases to go into the RESTORING state after a backup?

    The Database would be...

    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 in Restoring State since upgrade of OS to Windows Server 2008 Enterprise

    In other words, this:

    GilaMonster (1/19/2014)


    Finally a rare reason is someone, after the restore, runs BACKUP LOG ... WITH NORECOVERY, either manually or in a job.

    When you check the 'backup...

    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 blocking / Locking

    As Grant said

    Grant Fritchey (1/17/2014)


    Any login can have a query that causes blocking.

    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 blocking / Locking

    Tune your indexes, tune your queries. Short-lived blocking isn't a problem, long-term blocking is often due to inefficient queries. If you can't tune the queries or doing so doesn't provide...

    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 check wheter a value is whole number or in fraction

    DECLARE @number AS NUMERIC(4,2) = 2.5;

    SELECT @number;

    IF (ROUND(@number,0) = @number)

    PRINT 'whole number';

    ELSE

    PRINT 'has fractional component';

    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: Deadlock Query

    Yuk, traceflag 1204. That traceflag doesn't give enough information and makes debugging deadlocks harder than it should be.

    Can you turn traceflag 1204 off, turn 1222 on instead and, if 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: using one backup device for multiple databases

    To be honest, I think backup devices are a leftover from tape days (as in when backups were done to tape directly). There's little use I see for them with...

    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: Index fragmentation not cutting down to 0

    Jeff Moden (1/20/2014)


    On the other hand, I've found that it almost takes the same amount of time to filter out such tables as it is to try to defrag them...

    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: WITH OPTION RECOMPILE faster query?

    clyde_mcmurdy (1/20/2014)


    My apologies to the OP for the thread hijack.

    Should I start a new one?

    "... ProcedureName WITH RECOMPILE means that the procedure's plan is never cached at all"

    That's...

    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: WITH OPTION RECOMPILE faster query?

    You'd need to explain more what you did for me to be able to say what happened there.

    exec sp_recompile 'procedure name' removes that plan from cache completely. I have a...

    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: Partitioned Table and Index Storage Confusion

    It'll be on whatever filgroup is defined as the default one.

    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: Script to find when was the last update done on a database.

    Generally, not possible.

    You can query sys.dm_db_index_usage_stats per database and check the dates in there, but that's only since the last time the DB was started (typically last time 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: Different collations on different databases

    richardmgreen1 (1/20/2014)


    In your experience, is it a change you would make?

    No. Not unless I had an exceptionally good reason.

    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 - 10,321 through 10,335 (of 49,552 total)