SQL Server 2005 Backups

This post is more for my memory than anything else but ... I've had issues restoring a SQL 2005 database from a backup today using the SQL Workbench with the following error message: -

The backup set holds a backup of a database other than the existing 'MyDatabase' database.
RESTORE DATABASE is terminating abnormally. (Microsoft SQL Server, Error: 3154)

I spoke to a good friend (Tony Rogerson) and he sent me a command to run: -

restore database MyDatabase from disk = 'C:\MyDatabaseBackup\MyDatabase.BAK' with replace

And it worked a treat!

Published Thursday, October 26, 2006 2:40 PM by Plip

Comments

# re: SQL Server 2005 Backups

Tuesday, February 20, 2007 5:28 PM by Inala Shankar

Thats a great info....i appreciate your contribution...Thank you

# SQL Server 2005 Backups

Wednesday, March 07, 2007 4:11 AM by PRINCE V

Tony Rogerson hey good work , your can be a icon for everyone who want to serve other people.

KEEP DOING THE GOOD WORK

# re: SQL Server 2005 Backups

Thursday, May 03, 2007 2:24 AM by Roni

restore database MyDatabase from disk = 'C:\MyDatabaseBackup\MyDatabase.BAK' with replace

thats good...i was wondering if u can help me out in writing a batch file so i can execute this command in order to compile a restore from a backupd atabase using sql server 2005 express edition...i have it installed somewere in the office and i want to know if it will restore the database.

# re: SQL Server 2005 Backups

Wednesday, October 24, 2007 2:28 AM by Narendra

Thanks for giving good information.

# re: SQL Server 2005 Backups

Monday, February 25, 2008 3:42 PM by Jacob Egholm

Great tip. The command worked like a charm:o)

# re: SQL Server 2005 Backups

Tuesday, March 04, 2008 2:34 AM by ants

What else can u say but thanks to a man who jotted down a command on the net to save not just himself but many others like me....Thanks man

# re: SQL Server 2005 Backups

Tuesday, April 29, 2008 4:57 PM by Raja

Wow!!!!!!!!!! Excellent man. Thanks for sharing it with us

Leave a Comment

(required) 
(required) 
(optional)
(required)