Microsoft Great Plains SQL Reporting and Data Fixing

This is beginner level SQL scripting article for DB Administrator, Programmer, IT Specialist

Our and Microsoft Business Solutions goal here is to educate database administrator, programmer, software developer to enable them support Microsoft Great Plains for their companies. In our opinion self support is the goal of Microsoft to facilitate implementation of its products: Great Plains, Navision, Solomon, Microsoft CRM. You can do it for your company, being aware on simple data repair techniques and appealing to Microsoft Business Solutions Techknowledge database. This will allow you to avoid expensive consultants visits onsite. You only need the help from professional when you plan on complex customization, interface or integration, then you can appeal to somebody who specializes in these tasks and can do inexpensive nation-wide remote support for you.

Let's look at simple data repair techniques.

1. How to delete the user:

If user, shuts down computer, before signing off Great Plains - she/he will get the message that she/he is already signed. Then you need to delete the user from the activity table. Run the query below against DYNAMICS database - it will unlock the user:

delete ACTIVITY where USERID='MARIE'

2. How to unlock the batch:

From our experience - this is second FAQ we are hearing from Great Plains administrator. Run this script against company database to unlock hanging batch:

update SY00500 set BCHSTTUS=0 where BACHNUMB = 'BATCH0023'

Sometimes you also have to run this script against DYNAMICS database (if first script doesn't do the job)

delete SY00800 where BACHNUMB = 'BATCH0023'

3. Some Reporting Queries