Sql Server2005 修复数据库页某段内容损坏

use isale
declare @dbname varchar(255)
set @dbname='isale'
exec sp_dboption @dbname,'single user','true'
dbcc checktable('record_change_stock',REPAIR_ALLOW_DATA_LOSS)
dbcc checktable('record_change_stock',REPAIR_REBUILD)
exec sp_dboption @dbname,'single user','false'

isale是数据库名称

record_chagne_stock是表名

你可能感兴趣的:(SQL Server)