Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Duplicate Key Error when giving user access to company

Status
Not open for further replies.

barbola

Technical User
Feb 27, 2003
1,132
CA
When I create a new company I do not copy access from another company, because I want to make sure I have it set up before anyone uses it.

After it's created, I use the exe file that I downloaded from Customer Source to copy setup data from an existing company. It works great.

However, after I've completed my setup, and try to give users access, when I click on the userID and the checkbox for the company (Tools > Setup > System > User Access) I get a pop up with the following message:

Code:
[Microsoft][ODBC SQL Server Driver][SQL Server]Violation of PRIMARY KEY constraint 'PKSY02000'. Cannot insert duplicate key in object 'SY02000'

When I click OK I get:

Code:
The stored procedure smUserCmpnyAccssChckAccssCHG returned following results: DBMS: 2627, Microsoft Dynamics GP:0.

More info says "Please consult the altert message documentation provided by your DBMS."

The SY02000 table is huge, and I'm not sure what to look for.

After I click okay, the user still has Access to the company as if it worked fine.

There is one user, only one, when I click on his user name it says User could not be added to one or more databases. I know this is unrelated, but still a mystery as well.
 
I had something similar happen a while back (so your mileage may vary) - needed to delete the user from GP - THEN - go into SQL and make sure that that user did not have any rights to that database or any other GP company database (and there were a few - mainly the test ones interestingly enough).

Re-added the user and voila - we were all ok again.

After I talked with our Partner's GOOD GP person and he said that he has seen it where the companies that a user has access to is not the same as the SQL security.

maybe this helps you - maybe not... at least something to look at.
 
Yeah I'm not about to delete all the users every time I set up a new company.

Or was this in answer to the last question?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top