Skip to main content

Notifications

Microsoft Dynamics SL (Archived)

HELP - can't restore the database - error 3154

Posted on by 3,205

hi there, need help please :(

I've made backup for my database. we use SQL 2008 R2 as database engine, and Dynamic SL 2011.

suddenly I got mistake for the data, and wanna to recover the database.

here are the chronology:

- database deleted by accident (DB application and DB system).

- I re-create new empty database with same name (both for DB application and DB system).

- When I want to restore the database, shown an error:

TITLE: Microsoft SQL Server Management Studio
------------------------------

Restore failed for Server 'MS001'.  (Microsoft.SqlServer.SmoExtended)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.1600.1+((KJ_RTM).100402-1539+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Restore+Server&LinkId=20476

------------------------------
ADDITIONAL INFORMATION:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

------------------------------

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

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.1600&EvtSrc=MSSQLServer&EvtID=3154&LinkId=20476

------------------------------
BUTTONS:

OK
------------------------------

******************************************************************

- ths also happen to DB application.

- already tried for options:

overwrite the existing database (with replace)

restore with recovery

restore with nonrecovery

still no hope. need help please. thanks in advance.




*This post is locked for comments

  • Mac123 Profile Picture
    Mac123 5 on at
    RE: HELP - can't restore the database - error 3154

    Above described method is gud but if u r stiil facing the problem and your sql server showing error 3154 then u can go through this blog to know more about the cause and recovery http://sqlrecoverysoftware.net/blog/sql-server-error-3154.html

  • rodi Profile Picture
    rodi 3,205 on at
    RE: HELP - can't restore the database - error 3154

    hi,

    work perfectly. thanks for help :)

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: HELP - can't restore the database - error 3154

    Hi Rodi

    Cause for the Issue:

    ------------------------------

    The backup set is a backup of a database with the same name as the database to which you are restoring. However, the database being restored was created by a different CREATE DATABASE statement than the database in the backup set. Even though the databases have the same name, they are in fact different databases.

    Solution:

    -----------------

    Either overwrite the existing database by reissuing the RESTORE DATABASE command using the WITH REPLACE clause, or restore the backup set to a different database name. If you restore the backup set to a different database name, ensure that the files that will be created do not already exist and are not being used by another database. If you chose the wrong backup set to restore, select a backup of the existing database and restore it.

    Sample Overwrite SQL Query:

    ----------------------------------------------

    RESTORE DATABASE DATAsys

    FROM DISK = 'C:\DATAsys.bak' --(Mention the exact DB backup file path)

    WITH REPLACE

    Thanks

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans