I'm attempting to restore a database using the following command:
RESTORE DATABASE test FROM DISK = 'G:\dbbkups\mssql\cis0\dn0r.dbu' WITH REPLACE
It got busy for about 30 seconds, then returned this error:
I then ran each line individually in query analyzer:
and I got the list of following errors:
I'm not sure what's wrong with this and why it won't run. This is set up as a Management Job in Enterprise Manager for another database (it goes to a different database besides "test" but is pulling from the same backup file) and executes every morning at 6 am.
I'm trying to execute it on a laptop that is connected remotely to the server. Might that be causing the problem? I don't see why, as I can execute the saved job from the same location without the hiccup. Any help or suggestions would be appreciated!
RESTORE DATABASE test FROM DISK = 'G:\dbbkups\mssql\cis0\dn0r.dbu' WITH REPLACE
It got busy for about 30 seconds, then returned this error:
Code:
Server: Msg 3101, Level 16, State 2, Line 1
Exclusive access could not be obtained because the database is in use.
Server: Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.
I then ran each line individually in query analyzer:
Code:
use master
alter database test set single_user with rollback immediate
RESTORE DATABASE test FROM DISK = 'G:\dbbkups\mssql\cis0\dn0r.dbu'
and I got the list of following errors:
Code:
Server: Msg 5105, Level 16, State 2, Line 1
Device activation error. The physical file name 'G:\database\mssql\N000\dn0r_Data.MDF' may be incorrect.
Server: Msg 3156, Level 16, State 1, Line 1
File 'dn0r_Data' cannot be restored to 'G:\database\mssql\N000\dn0r_Data.MDF'. Use WITH MOVE to identify a valid location for the file.
Server: Msg 5105, Level 16, State 1, Line 1
Device activation error. The physical file name 'F:\DBLOGS\MSSQL\N000\dn0r_Log.LDF' may be incorrect.
Server: Msg 3156, Level 16, State 1, Line 1
File 'dn0r_Log' cannot be restored to 'F:\DBLOGS\MSSQL\N000\dn0r_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.
I'm not sure what's wrong with this and why it won't run. This is set up as a Management Job in Enterprise Manager for another database (it goes to a different database besides "test" but is pulling from the same backup file) and executes every morning at 6 am.
I'm trying to execute it on a laptop that is connected remotely to the server. Might that be causing the problem? I don't see why, as I can execute the saved job from the same location without the hiccup. Any help or suggestions would be appreciated!