Click here to Skip to main content
15,897,891 members
Please Sign up or sign in to vote.
4.00/5 (1 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

SQL
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

SQL
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
Herman<T>.Instance 30-Oct-14 10:42am    
where you commit your transaction?

1 solution

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.
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900