Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Administration
 database backup and restore
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

2 Posts

Posted - 04/10/2014 :  00:25:40  Show Profile  Reply with Quote
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.

Bustaz Kool
Flowing Fount of Yak Knowledge

1834 Posts

Posted - 04/17/2014 :  19:38:59  Show Profile  Reply with Quote
restore DATABASE "mirrordb" from DISK='c:\mssql\backup\testdb.bkup' WITH recovery,REPLACE,STATS=10

“Everyone wants a better life: very few of us want to be better people.”
-Alain de Botton
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000