use masterrestore database aa from disk='E:\xiao\backup\pubs.bak' with norecovery 就这样
运行后提示 It is being used by database 'pubs'.
use master go restore database aa from disk='E:\xiao\backup\pubs.bak' with norecovery报什么错贴出来看看
这是运行, use master go restore database aa from disk='E:\xiao\backup\pubs.bak' with norecovery后的错误提示 Server: Msg 1834, Level 16, State 1, Line 1 The file 'C:\Program Files\Microsoft SQL Server\MSSQL\data\pubs.mdf' cannot be overwritten. It is being used by database 'pubs'. Server: Msg 3156, Level 16, State 1, Line 1 File 'pubs' cannot be restored to 'C:\Program Files\Microsoft SQL Server\MSSQL\data\pubs.mdf'. Use WITH MOVE to identify a valid location for the file. Server: Msg 1834, Level 16, State 1, Line 1 The file 'C:\Program Files\Microsoft SQL Server\MSSQL\data\pubs_log.ldf' cannot be overwritten. It is being used by database 'pubs'. Server: Msg 3156, Level 16, State 1, Line 1 File 'pubs_log' cannot be restored to 'C:\Program Files\Microsoft SQL Server\MSSQL\data\pubs_log.ldf'. Use WITH MOVE to identify a valid location for the file. Server: Msg 3013, Level 16, State 1, Line 1 RESTORE DATABASE is terminating abnormally.
use master
老大,你能不能说明白点,把sql语句写给我可以吗?
with norecovery
就这样
It is being used by database 'pubs'.
go
restore database aa from disk='E:\xiao\backup\pubs.bak'
with norecovery报什么错贴出来看看
use master
go
restore database aa from disk='E:\xiao\backup\pubs.bak'
with norecovery后的错误提示
Server: Msg 1834, Level 16, State 1, Line 1
The file 'C:\Program Files\Microsoft SQL Server\MSSQL\data\pubs.mdf' cannot be overwritten. It is being used by database 'pubs'.
Server: Msg 3156, Level 16, State 1, Line 1
File 'pubs' cannot be restored to 'C:\Program Files\Microsoft SQL Server\MSSQL\data\pubs.mdf'. Use WITH MOVE to identify a valid location for the file.
Server: Msg 1834, Level 16, State 1, Line 1
The file 'C:\Program Files\Microsoft SQL Server\MSSQL\data\pubs_log.ldf' cannot be overwritten. It is being used by database 'pubs'.
Server: Msg 3156, Level 16, State 1, Line 1
File 'pubs_log' cannot be restored to 'C:\Program Files\Microsoft SQL Server\MSSQL\data\pubs_log.ldf'. Use WITH MOVE to identify a valid location for the file.
Server: Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.