Sunday, February 26, 2012

error 3271

Hi I am trying to do a backup of a database and it gives me the following
error
Nonrecoverable I/O error occurred on file 'C:\Program Files\Websense
Reporter\wslogdb61.mdf'. [SQLSTATE 42000] (Error 3271)
I ran dbcc checkdb and it gives consistency errors on one of the table, i
dropped all indexes on the table but its giving me errors while dropping the
last index, i think the index is corrupted . Is there any way to fix the
table or to drop the index without losing the data. I tried dbcc checkalloc
with rebuild and fast option still the same , i am hesitant to try the first
option of dbcc checkalloc which says it will fix the problem but will loose
some of the data. I tried copying the contents of the table to a temporary
table, but it gives I/O error.
Any suggestion '
Thanks
RodgerI assume you're on sql2k; thus, it's not possible to disable a corrupted
index to rebuild it.
You can try running "dbcc checktable(tb_name,repair_rebuild)". If it still
fails, you can force a drop of the index by deleting it from sysindexes.
(all warnings/disclaimers applied about direct system modification).
Restoring from a known backup is recommended for most corruption issues!
e.g.
exec sp_configure 'allow','1'
reconfigure with override
go
use <db>
go
--create a backup of sysindexes
--in case of mistake
select *
into sysindexes_bak
from sysindexes
go
delete sysindexes
where name='your_index'
go
exec sp_configure 'allow','0'
reconfigure with override
go
-oj
"Rodger" <Rodger@.discussions.microsoft.com> wrote in message
news:7D83EAD0-94D3-4B01-9C7F-7EBAE775450A@.microsoft.com...
> Hi I am trying to do a backup of a database and it gives me the following
> error
> Nonrecoverable I/O error occurred on file 'C:\Program Files\Websense
> Reporter\wslogdb61.mdf'. [SQLSTATE 42000] (Error 3271)
> I ran dbcc checkdb and it gives consistency errors on one of the table, i
> dropped all indexes on the table but its giving me errors while dropping
> the
> last index, i think the index is corrupted . Is there any way to fix the
> table or to drop the index without losing the data. I tried dbcc
> checkalloc
> with rebuild and fast option still the same , i am hesitant to try the
> first
> option of dbcc checkalloc which says it will fix the problem but will
> loose
> some of the data. I tried copying the contents of the table to a
> temporary
> table, but it gives I/O error.
> Any suggestion '
> Thanks
> Rodger
>

No comments:

Post a Comment