An Error Occurred Executing SQL statements. GPS Error: 10 SQL Error: 10 ODBC Error: 10 Try Reviewing the SQL Script for Validity

You receive the following error message when closing the Auditor Maintenance window.

An error occurred executing SQL statements.
GPS Error: 10
SQL Error: 10
ODBC Error: 10
Try reviewing the SQL Script for validity.


Cause 1: Product bug which has been resolved in the latest build. (See Resolution 1)

Cause 2: One or more of the following is true. (See Resolution 2)

  • The user does not have the correct permissions set up for the DYNAMICS database.
  • The user does not have the correct permissions set up for a SQL object such as a table, field, or stored procedure.
  • The database has been changed, added, or removed.


Resolution 1

If you are on the latest build of Auditor, go to Option 1. If you are not on the latest build, go to Option 2.

Option 1:

Run the Auditor Rebuild process. To do this, follow these steps:

  1. Have all users exit the system and make a complete restorable backup.
  2. Go to Microsoft Dynamics GP | Tools | Setup | Auditor | Auditor Setup.
  3. Click the Troubleshooting tab.
  4. Click Rebuild.
  5. In the Auditor Rebuild window, mark the checkboxes for the following:
  • Rebuild SQL Tables Master (This option allows you to recreate the list of tables and databases in the SQL Tables lookup on the Groups Maintenance window.
  • Rebuild SQL Triggers (This option Drops and re-creates all SQL Triggers associated with SQL Table audits that you have defined.)
  • Rebuild SQL Scripts (This option Drops and re-creates all SQL stored procedures and functions for Auditor.)

6.  Mark theRebuild all Databases From Scratch button.
7.  Click Process.
8.  Once it is completed, click OK.

Option 2:

This error has been resolved in the latest build of Auditor.

  1. Go to Rockton Software’s Product Download page:
  2. Download and install the latest build of Auditor specific to the Microsoft Dynamics GP install you are on along with the Auditor Manual which includes the installation steps.

Resolution 2:

In Microsoft SQL Server Management Studio, check the DYNAMICS database and assign read/write access to the DYNAMICS database for the User.

  1. Open Microsoft SQL Server Management Studio and connect to your server.
  2. Expand the server folder, expand the Database folder, expand the DYNAMICS folder, expand the Security folder, and then expand the Users folder.
  3. Right-click on the User and click Properties.
  4. In the Database User – (specific user) window, click Membership.
  5. Mark the appropriate checkbox(es).
  6. Click OK.

Also, in the Auditor manual it states what permissions are necessary. Confirm the User is set up to have the correct permissions as follows:

The User must have sufficient SQL Server rights to be able to create Tables and Triggers. The user must either be in the ‘sysadmin’ fixed server role or the ‘db_owner’ role for the DYNAMICS database and any database for which there are SLQ Table Audits defined. In addition, the user must be either in the AUDITOR ADMIN or POWERUSER Security Role.

To add a user to the ‘sysadmin’ fixed server role, follow these steps:

  1. Open Microsoft SQL Server Management Studio.
  2. Expand the Security folder and then expand the Server Roles folder.
  3. Double-click on sysadmin.
  4. In the Server Role Properties – sysadmin window, click Add.
  5. Type in the User ID and then click Check Names.
  6. Click OK.







Related Content