Great Plains Support: How to recover “Suspicious” company Database

Feb 14
09:15

2008

Andrew Karasev

Andrew Karasev

  • Share this article on Facebook
  • Share this article on Twitter
  • Share this article on Linkedin

Microsoft Great Plains from time to time falls to the situation, when the problem really sits at the MS SQL Server level and you need to do SQL scripting in SQL Query Analyzer

mediaimage

Very good example of this is when you were recovering company DB from backup and for some reason restoration process failed and company is in permanent restoring limbo or marked as Suspicious in SQL Enterprise Manager.  If you are trying to login GP gives you error messages,Great Plains Support: How to recover “Suspicious” company Database Articles starting with the one about the error in Pallet Master table.  Follow these guidelines:

1.       Make backup of Master database in SQL.  This is needed to roll back if our recommendation doesn’t work in your environment.  How to restore master database – you should read SQL Server Books on line

2.       Use sp_detach_db procedure to detach “Suspicious” database.  Unfortunately you can not do it in SQL Server Enterprise Manager.  This is why you do it in Query Analyzer.   If you are not familiar, please read SQL Books on line for the syntax of the command.

3.       To reattach database use sp_attach_single_file_db, which allows you do not deal with potentially corrupted log file.  This command allows you to restore database to production state in SQL from DB MDB file.  Normally you can reattach the same DB file which was marked as Suspicious, as the file is probably a good one and restoration failed somewhere on auxiliary steps.  If you can not reattach, then simply try to restore from backup – now you can do it as DB doesn’t exist

4.       MS SQL Server version.  This problem was common for SQL 2000.  If you are on SQL 2005, you can try our recommendations, however we never heard so far this problem on 2005

5.       Additional recommendations.  The ownership of the DYNAMICS and company database should belong to the role DYNSA.  If you restore from backup you reset ownership to sa or domain administrator in most of the cases.  We recommend you to change ownership back to DYNSA – sometimes we see problem in GP version upgrades, when ownership belongs to different account