0
在我的SQL數據庫,我跑到下面的腳本來清理數據並重置標識列,DBCC執行完成。如果DBCC輸出了錯誤信息,請與系統管理員
-- disable referential integrity
EXEC sp_MSForEachTable 'ALTER TABLE ? NOCHECK CONSTRAINT ALL'
GO
EXEC sp_MSForEachTable 'DELETE FROM ?'
GO
-- enable referential integrity again
EXEC sp_MSForEachTable 'ALTER TABLE ? CHECK CONSTRAINT ALL'
GO
EXEC sp_MSforeachtable @command1 = 'DBCC CHECKIDENT(''?'', RESEED, 1)'
Go
我得到以下信息,
Checking identity information: current identity value 'NULL'.
DBCC execution completed. If DBCC printed error messages, contact your system administrator.
Checking identity information: current identity value '1'.
DBCC execution completed. If DBCC printed error messages, contact your system administrator.
Checking identity information: current identity value '1'.....
正在打印所有表格的消息,我想。身份已被重置並且數據已被刪除。我需要擔心這個消息嗎?
'如果DBCC輸出錯誤信息「 - 它?如果沒有,那麼一切都很好 – Raj