I have two databases on the same mssql instance - testdb and mirrordb.
testdb has some data. mirrordb has no data.
I want to copy the data of testdb into mirrordb.
so I want to backup testdb and restore mirrordb from the backup file of testdb.
I tried :
BACKUP DATABASE "testdb" TO DISK='c:\mssql\backup\testdb.bkup' WITH NOFORMAT,INIT,STATS=10
restore DATABASE "mirrordb" from DISK='c:\mssql\backup\testdb.bkup' WITH recovery,STATS=10
but get the error :
Msg 3154, Level 16, State 4, Line 1
The backup set holds a backup of a database other than the existing 'mirrordb' database.
Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.
can somebody tell me how to do this right?
appreciate the feedback.