May 2016

Database Restore Fails with Msg 3154

Have you ever tried to restore over an existing database only to receive the following error message? Msg 3154, Level 16, State 4, Line 1 The backup set holds a backup of a database other than the existing ‘AdventureWorks2012’ database. Msg 3013, Level 16, State 1, Line 1 RESTORE DATABASE is terminating abnormally. We could easily avoid this error by using the WITH REPLACE option in the RESTORE DATABASE command, but we want to know why this error occurs and how SQL Server knows they are not from the same family. The answer is the database_guid. The database_guid is a...

Continue reading...