--允许进行系统表的操作
use master
exec sp_configure 'allow update',1 reconfigure with override
go
--将数据库设置成紧急模式
update sysdatabases set status=-32768 where dbid=DB_ID('yszt')
--创建日志文件
dbcc rebuild_log ('yszt','c:\Program Files\Microsoft SQL Server\MSSQL\backup\yszt_log.ldf')
--恢复数据库的紧急模式
update sysdatabases set status=0 where name='yszt'
--取消数据库的置疑标识
restore database yszt with recovery
--恢复系统表操作的设置
exec sp_configure 'allow update',0 reconfigure with override
go