CHECKTABLE

  • Hi Experts,

    What exactly happens when we run a CHECKTABLE? What happens if we stop the same in between?

    TIA

  • SQL runs a consistency check on that table. If you stop the execution, it stops.

    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
  • Thanks a lot Gail.

    We had an issue here were our database got corrupted ,senior dba's are pointing that it was due to running CHECKTABLE. What you think.

    Got below message from SQL error log.

    Timeout occurred while waiting for latch: class 'FCB_REPLICA', id 00000000C0AB3630, type 2, Task 0x000000002A2634C8 : 0, waittime 2400, flags 0x1018, owning task 0x0000000000000000. Continuing to wait.

    Ran the CHECKTABLE because we got below alert. SQL generated dump file and it was showing error related to one table index.

    The operating system returned error 665(The requested operation could not be completed due to a file system limitation) to SQL Server during a write at offset 0x000287bcb82000 in file 'X:\dba.mdf:MSSQL_DBCC17'. Additional messages in the SQL Server error log and system event log may provide more detail. This is a severe system-level error condition that threatens database integrity and must be corrected immediately. Complete a full database consistency check (DBCC CHECKDB). This error can be caused by many factors; for more information, see SQL Server Books Online

  • Is it possible to run DBCC CHECKTABLE on which you feel that table having index related error. Also it would be good if you can run DBCC CHECKDB to make double sure if any consistency / corruption isuues are there on database.

    What is the size of database? Howlong it will take to complete CHECKDB? Sometime storage also cause corruption. Check with storage team too.

    ---------------------------------------------------
    "Thare are only 10 types of people in the world:
    Those who understand binary, and those who don't."

  • Ratheesh.K.Nair (4/2/2014)


    We had an issue here were our database got corrupted ,senior dba's are pointing that it was due to running CHECKTABLE. What you think.

    No.

    Got below message from SQL error log.

    Timeout occurred while waiting for latch: class 'FCB_REPLICA', id 00000000C0AB3630, type 2, Task 0x000000002A2634C8 : 0, waittime 2400, flags 0x1018, owning task 0x0000000000000000. Continuing to wait

    .

    That is not corruption.

    Ran the CHECKTABLE because we got below alert. SQL generated dump file and it was showing error related to one table index.

    The operating system returned error 665(The requested operation could not be completed due to a file system limitation) to SQL Server during a write at offset 0x000287bcb82000 in file 'X:\dba.mdf:MSSQL_DBCC17'. Additional messages in the SQL Server error log and system event log may provide more detail. This is a severe system-level error condition that threatens database integrity and must be corrected immediately. Complete a full database consistency check (DBCC CHECKDB). This error can be caused by many factors; for more information, see SQL Server Books Online

    That's because during an execution of CheckDB, the hidden database snapshot ran out of space. Re-schedule CheckDB for quieter times.

    It's not corruption of your database, it's just the hidden snapshot.

    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
  • Thanks Gail,

    I know the below is not corruption but that is what i got from error log.

    Timeout occurred while waiting for latch: class 'FCB_REPLICA', id 00000000C0AB3630, type 2, Task 0x000000002A2634C8 : 0, waittime 2400, flags 0x1018, owning task 0x0000000000000000. Continuing to wait.

    What is this exactly.

    SQL server was generating dump for the last 2 months

  • Do some research on latch timeouts.

    It's not database corruption, it's a latch wait timing out (shouldn't happen). You may need to open a case with product support.

    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
  • Thanks Gail.

    We already have a case with MS and they provided some HotFix months back but our server is still generating dump file.

    Thanks a lot for your help.

  • You may want to reopen that 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
  • Thanks Gail.

Viewing 10 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic. Login to reply