Hi, i have been trying to do a similar task. I am hoping to restore the backup file from serverA to serverB.
When i run the script the following error message comes back:
Msg 3234, Level 16, State 2, Line 1
Logical file 'testdb_Data.mdf' is not part of database 'testdb'. Use RESTORE FILELISTONLY to list the logical file names.
Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.
I have done the RESTORE FILELISTONLY to see what the exact logical file names are, yet still not successful.
Am i supposed to create a testdb on serverB beforehand?
Your help would be appreciated, it may be something really simple, i've been looking at this all day now and cannot see what the problem is.
Here is the script for the restore that i am running on serverB.
RESTORE DATABASE [testdb]
FROM DISK = N'\\serverA\c$\sqlbackups\testdb.bak'
WITH FILE = 1,
MOVE N'testdb_Data.mdf' TO N'E:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\testdb_Data.mdf',
MOVE N'testdb_Log.ldf' TO N'E:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\testdb_Log.ldf',
NOUNLOAD, STATS = 10