Forum Replies Created

Viewing 15 posts - 2,791 through 2,805 (of 49,552 total)

  • RE: Allocation and Consistency Errors

    dbomgard (7/18/2016)


    GilaMonster (7/17/2016)


    Wonderful.

    First thing, alert the owners of this DB that they've likely lost significant amounts of data, possibly everything, and repairs will take a few days at best,...

    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: Delete mdf, ndf and log files on file system

    If you drop an offline database the files aren't deleted.

    You don't need to restart the instance. If it is the case that the DB was offline when dropped, you just...

    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: slow index scan - unable to improve performance

    rathimittha.mb (7/18/2016)


    Wouldn't it be better to just select the required 5 and then join with any other table??

    No. It's better to write your query as simply as you can.

    SELECT t1.col1,...

    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: slow index scan - unable to improve performance

    rathimittha.mb (7/18/2016)


    Also, under what conditions would I use UPDATE STATISTICS ?? I assumed it was right to use in the current situation of mine

    When the statistics are out of...

    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: slow index scan - unable to improve performance

    rathimittha.mb (7/18/2016)


    My intention is to use a single query for both the cases. And that's why the usage of 'case'

    'Generic' queries such as that are typically slow. I think...

    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: slow index scan - unable to improve performance

    It does help if you post the actual query...

    Add OPTION(RECOMPILE) to the end if the query and test again. The case statements as they are ensure that the optimiser cannot...

    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: slow index scan - unable to improve performance

    Table definitions, index definitions and execution plan please.

    What exactly is AND 1=(Case when 1 = 0 then 1 When 1 = 1 and fca.isactive = 1 then 1 END )...

    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: Allocation and Consistency Errors

    johnwalker10 (7/18/2016)


    Now when you don't have good backup, your options are

    > Use DBCC PAGE to try to figure out which tables in the database are affected and drop their...

    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: CHECKDB found 0 allocation errors and 21 consistency errors in table

    muthukkumaran Kaliyamoorthy (7/18/2016)


    What i understand from the errors, either can be restored from backup or repair_allow_data_loss.

    Yup.

    If the minimum level to repair is repair_allow_data_loss then repair_rebuild is just a waste of...

    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: Allocation and Consistency Errors

    Wonderful.

    First thing, alert the owners of this DB that they've likely lost significant amounts of data, possibly everything, and repairs will take a few days at best, if there'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: number of blockings and deadlocks in a specific time range

    Sure. Set up Extended events with the relevant events. Blocked process report if you have it configured, or you could use the wait-related events if carefully filtered, and the deadlock_info...

    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: CHECKDB found 0 allocation errors and 21 consistency errors in table

    Restore should (almost) always be your first choice, so if you have good backups and can restore, do so.

    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: Allocation and Consistency Errors

    dbomgard (7/15/2016)


    I'm still receiving the errors (below).. will someone please point me in the right direction?

    Restore from your last good backup.

    Repair is not the first thing that should be tried....

    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: Group that has SA and is denied connecting to server can still connect and SELECT

    Any login (Windows or SQL) which is a member of the sysadmin fixed server role has all permissions and cannot be denied anything (basically SQL doesn't do permissions checks for...

    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: Question about concurrency/consistency & UNDO

    As soon as either of the READ_COMMITTED_SNAPSHOT or ALLOW_SNAPSHOT_ISOLATION_LEVEL database options are enabled, data modifications write their old versions to TempDB, no matter what else is running at the time...

    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 - 2,791 through 2,805 (of 49,552 total)