語法:檢查數(shù)據(jù)庫的語法和刪除T357中客服序列號附件語法
DBCC CHECKDB('SMB6Comp01')
--檢查該數(shù)據(jù)庫
DBCC CHECKDB('SMB6Comp01',REPAIR_ALLOW_DATA_LOSS)
--檢查該數(shù)據(jù)庫,并一般修復(fù)
Use master
go
sp_dboption SMB6Comp01, single, true
--以上3行為數(shù)據(jù)庫改為單用戶模式來執(zhí)行修復(fù)
alter database SMB6Comp01 set multi_user with rollback immediate
--將數(shù)據(jù)庫改為多用戶模式
select * from combillattach where progid='chiserve.stksn'
--查詢客服序列號中的附件
delete from combillattach where progid='chiserve.stksn'
--刪除客服序列號中的附件
SELECT SUM(filesize) AS filesizeTotal FROM combillattach where progid='chiserve.stksn'
--查詢客服序列號中的附件總大小