Wednesday, June 16, 2010

RESTORE DATABASE using command

I found this error message when i restore the database using the GUI and it appear this error message "Error 3154: The backup set holds a backup of a database other than the existing database"
It because of trying to restore database on an existing active database.

Solution:
RESTORE DATABASE DatabaseName
FROM DISK = 'C:\myDatabase.bak'
WITH REPLACE

Use WITH REPLACE when using RESTORE command when u saw above error message "Error 3154: The backup set holds a backup of a database other than the existing database"

Tested in MSSQL 2005

3 comments:

Mariusz JasiƄski said...

The site SQL Reports has a great SQL tutorial. Highly recommended for people just getting started on SQL selects.

http://www.sql-reports.net/
http://www.sql-reports.net/2011/03/sql-select-tutorials.html

GuildWars2Items said...

The bravery of each bull is then rated with care according to the number of times he demonstrates his willingness to charge in spite of the sting of the blade Runescape gp, Henceforth will I recognize that each day I am tested by life in like manner. If I persist, if I continue to try, if I continue to charge forward, I will succeed rs gp, Your future depends on your dreams Runescape2 Gold. So go to sleep. Do not keep anything for a special occasion..

Diablo 3 Gold someone who makes you believe that there really is good in the world, someone who makes you laugh until you can't stop Buy Diablo 3 Gold, someone who changes your life just by being part of it Cheap Diablo 3 Gold, this is Forever Friendship

Hariharan s said...

Nice..I am searching what to do for restoring database in sql server.


http://www.theosoftindia.com/