1

dbcc checkdb

query for database gives errors. What is it, is it dangerous and how to resolve?

Full log file: download file or view on github (errors begin from string 364)

Possible There was disk d:\ crash before (there are .mdf and .ldf files on d:\Data). Disk was restored from backup. But not sure if these errors are related with this hardware crash.

DBCC results for 'DocStreams'. Msg 8914, Level 16, State 1, Line 1 Incorrect PFS free space information for page (1:103151) in object ID 1993058136, index ID 1, partition ID 72057594434682880, alloc unit ID 71906736119218176 (type LOB data). Expected value 0_PCT_FULL, actual value 100_PCT_FULL. Msg 8914, Level 16, State 1, Line 1 Incorrect PFS free space information for page (1:103887) in object ID 1993058136, index ID 1, partition ID 72057594434682880, alloc unit ID 71906736119218176 (type LOB data). Expected value 0_PCT_FULL, actual value 100_PCT_FULL. Msg 8914, Level 16, State 1, Line 1 Incorrect PFS free space information for page (1:104839) in object ID 1993058136, index ID 1, partition ID 72057594434682880, alloc unit ID 71906736119218176 (type LOB data). Expected value 0_PCT_FULL, actual value 100_PCT_FULL.

enter image description here

2
  • 1
    You potentially need to patch your database server (ref) as you could be running into a bug with the free-space tracking algorithm. This will hopefully resolve the issue going forward. To fix the error itself, try rebuilding the clustered index on the DocStreams table. Oct 14, 2016 at 14:25
  • And Yes You are right, it could be just bug: "as long as the message tells you that the page is supposed to be empty, but is actually marked 100%, nothing can really go wrong with that page. Unfortunately, DBCC will keep reporting these errors." from Your link
    – Gennady G
    Oct 14, 2016 at 16:23

1 Answer 1

1

Thank You for response John!

Tried to backup DB and rebuild clustered index, but didn't help. As I understand there is no patch, but it is and old bug. Or something was really damaged during hardware crash..

This helped:

--dbcc checkdb;
--dbcc checktable(DocStreams) WITH ALL_ERRORMSGS;

ALTER DATABASE WSS_Content
SET SINGLE_USER WITH ROLLBACK IMMEDIATE

dbcc checktable(DocStreams, REPAIR_FAST) WITH ALL_ERRORMSGS;
GO
dbcc checktable(DocStreams, REPAIR_REBUILD) WITH ALL_ERRORMSGS;

-- use this only if above does not work
--DBCC CHECKTABLE(DocStreams, REPAIR_ALLOW_DATA_LOSS) WITH ALL_ERRORMSGS;

ALTER DATABASE WSS_Content SET MULTI_USER;

But first

  • Do backup database
  • I also backuped table using this cmd (press Enter multiple times):

    bcp WSS_Content.dbo.DocStreams out C:\backups\DocStreams\DocStreams.dat -t -T

    pause

Use in Your own risk)

links: incorrect-pfs bcp tool

Upd.: or You can try "reorganize with (lob_compaction = on)" first (link)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.