Forum Replies Created

Viewing 15 posts - 12,781 through 12,795 (of 49,552 total)

  • RE: Principal & Witness Log

    Any time you have a database you have a log file. It's an essential part of the database. That said, witness doesn't need any user databases on it.

    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 case in where clause having other conditions

    Need to see the entire query.

    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 case in where clause having other conditions

    ssurekha2000 (6/13/2013)


    i got it using

    where id=@id

    and (

    (@con=0 AND YEARMONTH >=Replace(@YearMonth,'-',''))

    OR (@con<>0 AND YEARMONTH <>Replace(@YearMonth,'-',''))

    )

    Hope that it's a small row set and excellent...

    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: Help with Plan Cache Query

    Just join sys.dm_exec_query_stats (as used in the first query) to sys.dm_exec_cached_plans (used in the second query) on the plan_handle

    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: Transaction Isolation Level with CTE

    SQL_Enthusiast (6/12/2013)


    Is using SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED in this manner not so bad after all?

    Depends. Do you like your reports accurate or potentially inaccurate. If the latter, nolock'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: ShrinkFile on Varbinary column

    Sean Pearce (6/12/2013)


    GilaMonster (6/12/2013)


    Sean Pearce (6/12/2013)


    I prefer Paul Randal's method:

    1. Create new filegroup.

    2. Create new file on new filegroup. Set this to your required size.

    3. Rebuild all indexes with 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: Transaction Isolation Level with CTE

    You put the SET before the declaration of the CTE and properly terminate it with a ';'

    SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;

    Oh, and http://blogs.msdn.com/b/davidlean/archive/2009/04/06/sql-server-nolock-hint-other-poor-ideas.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: Error Runnind DBCC CHECKDB('databasename')

    It probably would be a good idea.

    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 and PAGE_VERIFY CHECKSUM

    Apparently there are some known bugs that cause this (error 605 with no 824). I was told to search google.

    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 and PAGE_VERIFY CHECKSUM

    Was the database created in SQL 2005/2008?

    If you check the page (via DBCC Page), what's the value for the m_flagBits setting?

    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 and PAGE_VERIFY CHECKSUM

    Do you have page verify set to CheckSum?

    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: Error Runnind DBCC CHECKDB('databasename')

    Run DBCC UPDATEUSAGE

    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 Scan vs Index Seek

    Steven Willis (6/12/2013)


    But I can add an artificial filter like 'WHERE primarykey > 0" and that seems to force the compiler into doing an Index Seek on that key. I've...

    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: ShrinkFile on Varbinary column

    Sean Pearce (6/12/2013)


    I prefer Paul Randal's method:

    1. Create new filegroup.

    2. Create new file on new filegroup. Set this to your required size.

    3. Rebuild all indexes with the new filegroup as...

    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: Can we call stored Procedure inside a function

    Ed Wagner (6/12/2013)


    Just because we can do something doesn't mean we should. The technical workaround does work, but I don't think it's a good idea.

    It's not a good idea.

    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

Viewing 15 posts - 12,781 through 12,795 (of 49,552 total)