• jbhauser (6/27/2011)


    I am trying to utilize Gianluca's procedure (nice work by the way) against the corrupt databases found in the conference link above. I cannot get around the error "converting data type nvarchar to int". When I run the DBCC CheckDb statement by itself, there is an additional record returned that reads "repair_allow_data_loss is the minimum repair level for the errors found by DBCC CHECK DB...".

    I believe this additional record is causing the insert statement to fail.

    The statement I am running is "DBCC CHECKDB(Corrupt2008Demo) WITH TABLERESULTS, ALL_ERRORMSGS,NO_INFOMSGS". This is executed against a SQL 2008, Standard Edition database with service pack 2 installed.

    Does anyone have any suggestions on how to prevent or suppress the informational record from being returned by the DBCC command?

    Thanks for any help in advance.

    ok definitely one of the columns in that temp table we created doesn't match the DBCC results, so you'll have to help out: when you get the error you identified when running DBCC all by itself,""repair_allow_data_loss is the minimum repair level for the errors found by DBCC CHECK DB...".", look at the row of data...i suspect the column "RepairLevel" is some text instead of NULL? change that temp table to have a varchar definition for the offending varchar column and let us know if that was the issue:

    RepairLevel int NULL,

    RepairLevel varchar(255) NULL,

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!