大力说:我的數據庫備份不了,導出也會出現如錯誤,用手動創建表也不可以會出現死機現象,查看已經存在表的記錄和內容都會出現死機現象,用修復命令時會出現如下提示: Server: Msg 7995, Level 16, State 1, Line 1 Database 'fki0506' consistency errors in sysobjects, sysindexes, syscolumns, or systypes prevent further CHECKDB processing. Clustered index successfully restored for object 'syscolumns' in database 'fki0506'. 我的數據庫名為'fki0506'.(隻有這一個數據庫是這樣的,別的都可以) 在打開存在表查看記錄時(每個表都是一樣的),會出現如下信息: An unexpected error happened during in operation: [MS Design Tools]-ODBC error:[Microsoft][ODBC SQL Server Driver ][SQL Server] Could not continue scan with NOLOCK due to data movement. [Microsoft][ODBC SQL Server Driver ][SQL Server] Could not continue scan with NOLOCK due to data movement. [Microsoft][ODBC SQL Server Driver ][SQL Server] Could not continue scan with NOLOCK due to data movement. [Microsoft][ODBC SQL Server Driver ][SQL Server] Could not continue scan with NOLOCK due to data movement.據估計可能是數據庫('fki0506')的系統表 syscolumns 出錯,請找马可。
DBCC CHECKDB('fki0506')
DBCC DBREINDEX 重建指定数据库中表的一个或多个索引
DBCC INDEXDEFRAG 整理指定的表或视图的聚集索引和辅助索引碎片
DBCC UPDATEUSAGE 报告和更正 sysindexes 表的不正确内容,
该内容可能会导致通过 sp_spaceused
系统存储过程产生不正确的空间使用报表
set @dl='大力'
exec('select'+@dl)
GOsp_dboption 'fki0506', 'single user', 'true'
GoDBCC CHECKDB('fki0506', REPAIR_REBUILD)
GoUSE 你的数据库名
goexec sp_msforeachtable 'DBCC CHECKTABLE(''?'',REPAIR_REBUILD)'
exec sp_msforeachtable 'DBCC DBREINDEX(''?'')'
gosp_dboption 'fki0506', 'single user', 'false'
Go
即将语句中的: REPAIR_REBUILD
换成: REPAIR_ALLOW_DATA_LOSS
Server: Msg 7995, Level 16, State 1, Line 1
Database 'fki0506' consistency errors in sysobjects, sysindexes, syscolumns, or systypes prevent further CHECKDB processing.
Clustered index successfully restored for object 'syscolumns' in database 'fki0506'.
我的數據庫名為'fki0506'.(隻有這一個數據庫是這樣的,別的都可以)
在打開存在表查看記錄時(每個表都是一樣的),會出現如下信息:
An unexpected error happened during in operation:
[MS Design Tools]-ODBC error:[Microsoft][ODBC SQL Server Driver ][SQL
Server] Could not continue scan with NOLOCK due to data movement.
[Microsoft][ODBC SQL Server Driver ][SQL
Server] Could not continue scan with NOLOCK due to data movement.
[Microsoft][ODBC SQL Server Driver ][SQL
Server] Could not continue scan with NOLOCK due to data movement.
[Microsoft][ODBC SQL Server Driver ][SQL
Server] Could not continue scan with NOLOCK due to data movement.據估計可能是數據庫('fki0506')的系統表 syscolumns 出錯,請找马可。