数据库无法附加,尝试过通过重做日志回复,可是提示:不支持对系统目录进行即席更新
各位大侠:
帮帮忙吧,我现在有mdf和ldf文件,可是就是附加不上去。提示[img=http://hi.csdn.net/space-6137508-do-album-picid-845715-goto-down.html][/img]
然后我重做日志。
使用脚本如下,大侠们看看对不对?
----修改master为可更新状态
use master
go
sp_configure 'allow updates',1
reconfigure with override
go
----修改数据库处于紧急修改模式
update sysdatabases set status=-32768 where dbid=DB_ID('s_c_sc')
----重新建立日志文件(替换重建)
dbcc rebuild_log('s_c_sc','E:\Program Files\MS\Microsoft SQL Server\MSSQL\Data\s_c_sc_log.ldf')
dbcc checkdb('s_c_sc')
----修改回正常模式
use master
update sysdatabases set status=28 where name='s_c_sc'
sp_dboption 's_c_sc','dbo use only','false'
----修改master为不可更新状态
sp_configure 'allow updates',0
reconfigure with override