/ SQL Error 3154 and 3013

SQL Error 3154 and 3013

How to fix  the SQL backup  Error 3154 and 3013?

Today we have faced below error  msg while restoring sql backup file from drive .
Msg 3154, Level 16, State 4, Line 1
The backup set holds a backup of a database other than the existing 'ITAssist' database.
Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.
 

Solution :
-------------
First i was tried to restore the backup as shown below

Restore database ITAssist from disk =' C:\MSSQL_default\Data\backup\ITAssit.bak'

I ran the above query , i have received below error msg

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


Solution is very simple and not as difficult . I was trying to restore the database on another existing active database. 

1) Use WITH REPLACE while using the RESTORE command.

Restore database ITAssist from disk =' C:\MSSQL_default\Data\backup\ITAssit.bak' with Replace
2) Delete the older database which is conflicting and restore again using RESTORE command.