Wednesday, March 21, 2012

Msg 3154, Level 16, State 4

Msg 3154, Level 16, State 4, Line 1
The backup set holds a backup of a database other than the existing 'AdventureWorks' database.
Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.

Some of these messages related to backups and restores in MSQL Server are misleading.
This error occurs due to following reason

The instance where you trying to restore the backup file already has a database with the same name. So you need to use the option 'WITH REPLACE' option in the restore command. Else drop the existing database first and then restore the backup file.

1 comment:

  1. Use the option With Replace to overwrite an existing database