Error Creating A New Company: Cannot Insert Duplicate Key In Object ‘dbo.SY60100’

Microsoft Dynamics GPOne of our clients was creating a new company recently when GP Utilities produced an error:

Microsoft Dynamics GP: Cannot insert duplicate key in object 'dbo.SY60100'

Microsoft Dynamics GP

[Microsoft][SQL Server Native Client 11.0]p[SQL Server]Violation of PRIMARY KEY constraint 'PKSY60100'. Cannot insert duplicate key in object 'dbo.SY60100'. The duplicate key value is (sa, 114).

The client clicked the OK button and GP Utilities ran through to completion. However, when the user logged into Microsoft Dynamics GP using the sa account, the company was not available for selection.

This is when they called us asking for help.

When we connected in we found that the company did have a record in Company Master (SY01500), but did not have an entry in User-Company Access (SY60100).

The company was listed in the Delete Company window (Administration >> Utilities >> Delete Company). However when the company was deleted, the database remained behind.

I’ve had problems deleting databases this way before, so when I was called over, I directed my colleague to delete the database directly in SQL Server Management Studio and run the Clear Companies script available in Microsoft KB 855361.

A quick search for the error message, revealed a Microsoft Knowledge Base article covering this exact issue.

At some point, the system database’s owner had been changed away from DYNSA. Running the following script set the owner back to DYNSA, allowing the company to be created:

sp_changedbowner 'DYNSA'

Can ISC Software Solutions help?

ISC Software Solutions are UK and Ireland based experts on Microsoft Dynamics GP. If you’d like to speak to someone about support, consultancy, upgrades, implementation, development, GP Elementz add-ons or portals, or anything else Dynamics GP related, you can use the form below.

Your Name (required):
Your Email (required):
Enquiry message:

What should we write about next?

Your Name (required) –
Your Email (required) –

1 thought on “Error Creating A New Company: Cannot Insert Duplicate Key In Object ‘dbo.SY60100’

  1. Pingback: Comment

Leave a Reply

Your email address will not be published. Required fields are marked *