Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

Unable to restore data because of an unknown error.

(0) ShareShare
ReportReport
Posted on by

Hello,

Please I need help.

I want to restore a back up but its giving me unknown error.

Most of the time I get this error what I do is to restart the system or relocate the backup file and it worked. but this time around no luck what can I do?

Thank you

*This post is locked for comments

  • Suggested answer
    Redbeard Profile Picture
    12,931 on at
    RE: Unable to restore data because of an unknown error.

    You received some really good advice from the folks above.  What you encountered is a fairly common SQL error - "Exclusive access could not be obtained because the database is in use."  Typically when I run into this problem I use the following queries in SQL run from the master database:

    sp_who2 -- this will tell you if there are any phantom users accessing the database you are trying to restore

    Once you have identified the user preventing exclusive access to the database you're trying to restore you use the following query to end their session.

    Kill 57 -- the number should be the value in the SPID column

    It is also important not to be in the database you're trying to restore yourself, so using a query is a good ides, just make sure you're in the database when you do so. 

    Add the following lines to your query:

    Use Master

    Alter WACHQ set single_user with rollback immediate

    restore database WACHQ FROM DISK = 'C:\Users\Solomon\Documents\BACKUP\WACHQ_June4-2014B.bak'

    Using Master ensures you're not in the WACHQ DB, setting the database to single user mode ensures exclusive access during the restore operation.

    Perhaps this information will help other folks who encounter this same problem

  • Community Member Profile Picture
    on at
    RE: Unable to restore data because of an unknown error.

    @Soma

    I did ran  all the script yet it repeated the same error.

    Please what else can I do?

    Thank you

  • Community Member Profile Picture
    on at
    RE: Unable to restore data because of an unknown error.

    Ok ill try it out thanks.

  • Suggested answer
    soma Profile Picture
    24,410 on at
    RE: Unable to restore data because of an unknown error.

    FUNMILAYO,

    You can't restore the database while the GP application is in running/using. So, request you to log off all the users from dynamics GP and run the below query then restore the database.

    DELETE DYNAMICS..ACTIVITY

    DELETE DYNAMICS..SY00800

    DELETE DYNAMICS..SY00801

    DELETE TEMPDB..DEX_LOCK

    DELETE TEMPDB..DEX_SESSION

    Hope this helps!!!

  • Community Member Profile Picture
    on at
    RE: Unable to restore data because of an unknown error.

    @Richard

    Find below the error I found in DEXSQL.

    (restore database WACHQ FROM DISK = 'C:\Users\Solomon\Documents\BACKUP\WACHQ_June4-2014B.bak'

    /*

    /*  Date: 06/04/2014  Time: 18:00:05

    SQLSTATE:(37000) Native Err:(3101) stmt(11918160):*/

    [Microsoft][SQL Server Native Client 10.0][SQL Server]Exclusive access could not be obtained because the database is in use.*/

    /*

    /*  Date: 06/04/2014  Time: 18:00:05

    SQLSTATE:(37000) Native Err:(3013) stmt(11918160):*/

    [Microsoft][SQL Server Native Client 10.0][SQL Server]RESTORE DATABASE is terminating abnormally.*/)

    Please how do I resolve this error.

    Thank you

  • Richard Wheeler Profile Picture
    75,848 Moderator on at
    RE: Unable to restore data because of an unknown error.

    Check the error log in SQL. It will tell you why the restore is failing. The most common issue is out of space.

  • Jonathan Fear Profile Picture
    on at
    RE: Unable to restore data because of an unknown error.

    First thing I would make sure is that you are not in the company (assuming you are doing this from within GP) that you are trying to restore. Otherwise a Dexsql.log may give us more information as to what is causing the issue.

  • Suggested answer
    Tom Mathew Profile Picture
    1,750 on at
    RE: Unable to restore data because of an unknown error.

    1. Do you have write permission to the folder.

    2. Space is there in the drive.

    3. Was the backup taken without any error..make sure the .bak file is not corrupted

    Try running  the sql service  using a local account instead of the network service and then perform the restore.

  • Verified answer
    soma Profile Picture
    24,410 on at
    RE: Unable to restore data because of an unknown error.

    Please try the suggestions from the below link.

    groups.google.com/forum

    Note:

    1. Make sure the SQL instance accepting remote connections, TCP/IP protocol is enabled for this instance and that Windows Firewall is set up to allow connections to TCP/IP port that it uses.

    2. If database mirroring is set up, remove it prior to restore.

    Hope this helps!!!

  • Community Member Profile Picture
    on at
    RE: Unable to restore data because of an unknown error.

    Thanks for your response.

    The error I get is "unknown error".

    I could paste the screen shot you would have seen it.

    Thank you

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

Ramesh Kumar – Community Spotlight

We are honored to recognize Ramesh Kumar as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

Featured topics

Product updates

Dynamics 365 release plans