Click here to Skip to main content
14,297,656 members
Rate this:
Please Sign up or sign in to vote.
Hi,

I am getting an error when i select a table.

Internal error. Buffer provided to read column value is too small. Run DBCC CHECKDB to check for any corruption.

2 Days back my database has gone into suspect mode and i solved it.

When I did DBBCC Checkdb by below syntax

ALTER DATABASE POSS SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
BEGIN TRANSACTION;
DBCC CHECKDB ('POSS');
ALTER DATABASE POSS SET MULTI_USER;


I am getting following errors

Msg 8992, Level 16, State 1, Line 3
Check Catalog Msg 3858, State 1: The attribute (max_length=0) of row (object_id=119007505,column_id=8) in sys.columns has an invalid value.

Msg 226, Level 16, State 6, Line 4
ALTER DATABASE statement not allowed within multi-statement transaction


Thanks

Sanju
Posted
Updated 30-Oct-14 4:43am
v5
Comments
digimanus 30-Oct-14 10:42am
   
where you commit your transaction?

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

Your database is corrupt. Restore it from the last known good backup.

If you don't have a backup (why not?!), then you might be able to use one of the repair options:
http://www.sql-server-pro.com/dbcc-checkdb.html[^]
http://msdn.microsoft.com/en-us/library/ms176064.aspx[^]

The output from the DBCC CHECKDB command will tell you the minimum repair level required. If you're lucky, it will be REPAIR_REBUILD, which will attempt to fix the corruption without deleting any data. Otherwise, you'll be stuck with REPAIR_ALLOW_DATA_LOSS, which will delete data and break referential integrity to try to fix the corruption.

Make sure you run DBCC CHECKCONSTRAINTS after any repair operation.

Once your database is back to a usable state, set up a job to back your database up on a regular basis. Make sure you regularly test the backups to ensure that you can restore them if necessary.
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100