帮忙解决一下这个问题(100分)

X

xaojan

Unregistered / Unconfirmed
GUEST, unregistred user!
restore database tsgl from disk='e:/tsgl20021211' with replace 出错。
tsgl20021211 是一个在sql eterprise manager中备份的文件。不过我不知道它的扩展名。
这样备份提示:Server: Msg 3156, Level 16, State 2, Line 2
The file 'd:/MSSQL7/data/master.mdf' cannot be used by RESTORE. Consider using the WITH MOVE option to identify a valid location for the file.
Server: Msg 3013, Level 16, State 1, Line 2
Backup or restore operation terminating abnormally.
为什么,另再问:我在用程序执行restore 时,系统提示库必须以独占方式,我该怎么做?
 
RESTORE FILELISTONLY
FROM DISK = 'c:/Northwind.bak'
RESTORE DATABASE TestDB
FROM DISK = 'c:/Northwind.bak'
WITH MOVE 'Northwind' TO 'c:/test/testdb.mdf',
MOVE 'Northwind_log' TO 'c:/test/testdb.ldf'
用这个试试!
 
顶部