Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP (Archived)

Dynamics GP 10 Corruption and Errors (Possibly SQL Related?)

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

We have a client that uses Dynamics GP 10 and recently suffered some sort of power loss to their building that seems to have possibly caused some serious data corruption on their Dynamics / SQL data. I'm told that the server itself didn't ever lose power (due to being connected to a UPS), but everything else did including the network and potentially open connections from workstations to the server.

Unfortunately, this client has now been down for several days and I'm just coming into this situation today. They've been working with Microsoft SQL support, but I'm wondering now that I've spent the better part of the day working with MS SQL support as well if that was the right department to handle this or perhaps they should have been working with Microsoft Dynamics GP support?

I don't know what steps have been taken over the past several days, but am also worried that further problems might have been caused by inexperienced troubleshooting. I am only vaguely familiar with SQL Server 2008 and Dynamics GP 10, so any help that could be provided on here would be greatly appreciated. As far as I know, they can get into the Dynamics GP company file, but numerous actions they take in there are returning SQL and other errors now and so they can't get to most of the functionality they need.

I also believe that DBCC checkdb with repair_allow_data_loss was run against the database and returned several errors, including:

Msg 7985, Level 16, State 2, Line 1
System table pre-checks: Object ID 3. Could not read and latch page (1:73526) with latch type SH. Check statement terminated due to unrepairable error.
DBCC results for '<DATABASE_NAME>'.
Msg 5233, Level 16, State 98, Line 1
Table error: alloc unit ID 196608, page (1:73526). The test (IS_OFF (BUF_IOERR, pBUF->bstat)) failed. The values are 62916617 and -4.
CHECKDB found 0 allocation errors and 1 consistency errors not associated with any single object.
CHECKDB found 0 allocation errors and 1 consistency errors in database '<DATABASE_NAME>'.

They don't have any good normal backups, although they did have CrashPlan PROe installed and it has been set to backup the DATA directory (among other directories) located at D:\Data\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA

I'm told that the power outage occurred sometime in the afternoon on 12/15 and the corruption and errors and access issues started shortly thereafter, and yet it does appear there are MDF and LDF backups for the database in CrashPlan PROe from 12/15 3:30 AM (the next previous backup is early November I think).

The problem is that even after we recovered the MDF and LDF files, we can't seem to get anything working with them. We tried replacing the MDF and LDF files in the DATA directory with the recovered ones, and that doesn't seem to have helped (although after putting the database back into multi_user mode we could access it via GP and get to some data, but are still getting a lot of errors for most things), and also through a lot of work and trial-and-error with MS SQL Support we managed to extract most of the table data from the corrupted database and set-up a new company and then imported that data into the new company database, but that didn't seem to provide access to any of the data either. Obviously we're grasping at straws here, partly because I'm completely unfamiliar with these products and partly because (as mentioned above) I'm wondering if MS SQL support was the right team to assist with this.

If anyone has any help or advice (that they can provide in relatively idiot-proof steps) it would be GREATLY appreciated. Feel free to ask any questions and I'll answer as quickly as I can. Thanks!!

P.S. I'm also wondering if the 12/15 database restore might also be corrupted which is why nothing we've tried has worked either, in which case I'm wondering if we should just try (hopefully with some guidance and help from those of you experts on here) recovering from the early November MDF and LDF backed-up files (if that's possible). Thanks again for any help!

Marc

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Dynamics GP 10 Corruption and Errors (Possibly SQL Related?)

    Thank you everyone for the replies and assistance!

    So we ended up skipping the 12/15 backup of the .mdf and .ldf files since it seemed that one was corrupted also, and went with the 11/9 backup of the .mdf and .ldf files.  We then stopped all the SQL services, replaced the 11/9 mdf and ldf files in the DATA directory, and restarted the services again, and then attempted to launch Dynamics GP on a workstation and it worked and seemed to have all data from 11/9 and back.  No more errors when going into Sales Order Processing or any other workflow, so unless someone on here lets me know I'm going to go with Problem Solved!  Not the greatest solution since it means the client has lost 5 weeks of data, but better than the alternative of losing years of data!

    Thanks again all for your help!

  • Suggested answer
    L Vail Profile Picture
    L Vail 65,271 on at
    RE: Dynamics GP 10 Corruption and Errors (Possibly SQL Related?)

    If you have the .mdf and .ldf files, I would try detaching the ones that are currently installed and then attaching the copy you got from CrashPlan PROe. To detach them, simply right click on the database, select Tasks and then Detach. Move the existing .mdf/.ldf files and copy the PROe versions in their place. Don't forget to do the DYNAMICS database too. To reattach them, right click on the Databases header (the level that the databases hang under) and choose Attach. Click the Add button and go find wherever you copied the new .mdf/.ldf files. I've used this in the past when all I had were the .ldf and .mdf files. Let us know if it works.

    Kind regards,

    Leslie

  • Syrus Profile Picture
    Syrus 4,156 on at
    RE: Dynamics GP 10 Corruption and Errors (Possibly SQL Related?)

    Untitled-picture.png

    The odd are not good  and next action should to get someone who can repair the DB, there are many many  people and Tools just ask them that DB is corrupt and needs repair.

    also as per attached screen shot see if you can restore the mdf and ldf file individually

    Untitled-picture.png

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Dynamics GP 10 Corruption and Errors (Possibly SQL Related?)

    Thanks Syed - only problem is we don't have any recent .BAK files at all - most recent is 2 - 3 years ago I think.  All we have is the .MDF and .LDF files that were backed up through an online/cloud backup service (someone had selected the DATA directory to be backed in this service so we have .MDF and .LDF files from 12/15 and sometime in early Nov.).  Unfortunately I'm not following the rest of your advice regarding unchecking LDF for restore, etc.  - can you advise steps?  Thanks again!

  • Syrus Profile Picture
    Syrus 4,156 on at
    RE: Dynamics GP 10 Corruption and Errors (Possibly SQL Related?)

    well restore is not possible until everybody is out of GP and no body is logged in plus you should be restoring from .BAK file. however if you want to try another way, just uncheck the LDF for restore while doing that you will lose the data not pushed to MDF file.

    But I will also recommend to create another company as TEST and first try to restore backup to that TEST DB with different options to see which one will work and then proceed to the live accordingly. Have month and half gaps in backup is not a good practice but it is what it is. Good luck

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Dynamics GP 10 Corruption and Errors (Possibly SQL Related?)

    Thanks for the info!  Yeah, it is possible that they could be giving me incorrect dates or something else happened earlier, although it's unfortunate the previous backup is a month and a half earlier.  Do you happen to have any advice or can point me in the direction of any online articles that detail how to do a restore with just an MDF and LDF file?  Is it just as simple as stopping all the SQL services, replacing the mdf and ldf files in the DATA directory, and restarting the services again, or are there further steps?  Thanks so much for the assistance!

  • Syrus Profile Picture
    Syrus 4,156 on at
    RE: Dynamics GP 10 Corruption and Errors (Possibly SQL Related?)

    Hi Marc,

    Your last guess seem more reasonable as the backup could also be a bad one, as we have this situation way back and yet the most recent back up taken was also not good, so we tried one before that and it worked. We spend a whole day too and then finally figured that out.

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,458 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans