?
Solved

GP 2013 R2 Error - A get/change first operation on table 'sysUserDefaults' failed accessing SQL data

Posted on 2016-09-20
4
Medium Priority
?
62 Views
Last Modified: 2016-10-23
We have a user that is unable to login to our test GP server due to the error above. SA can login fine. I tried clearing user access to all companies and then re-adding but did not work. Reset password, verified user is setup correctly. This has happened previously to users when restoring productions data to the test server but former admin did not leave steps to resolve. This user has not logged into the test server since before the last production to test migration so he is the only one experiencing the issue at this time. I did find an article on running the Grant.sql script but am unsure of implications to other users if I do this. Any insight would be appreciated!
0
Comment
Question by:Jason Shaw
  • 3
4 Comments
 
LVL 13

Assisted Solution

by:Norm Dickinson
Norm Dickinson earned 400 total points (awarded by participants)
ID: 41807843
I have a client whose software runs on Dynamics GP 13, and when a restore is performed, or a test company refreshed, as our software vendor terms it - we always have to run two particular scripts on the newly refreshed databases. The first goes thru and checks for key integrity, and the second sets ownership of the database to DYNSA. Do you have any such scripts for your software? Do you have a vendor to contact for specific scripts? While the ownership is a one-liner, the first script is two pages typed, and I doubt my script would work for your database.
0
 
LVL 53

Accepted Solution

by:
Vitor Montalvão earned 1600 total points (awarded by participants)
ID: 41808198
SQL Server doesn't really works with user names but user ids. With that said, when you migrate logins from another SQL Server instance you should assure that the login has the same ID or it won't be able to connect to the migrated database(s).
Luckily you can fix this very easily with the following stored procedure:
EXEC sp_change_users_login 'Auto_Fix', 'LoginName'

Open in new window

NOTE: Replace LoginName with the desired login name.
0
 
LVL 53

Expert Comment

by:Vitor Montalvão
ID: 41829399
Jason, a feedback will be appreciated.
Cheers
0
 
LVL 53

Expert Comment

by:Vitor Montalvão
ID: 41855844
Recommend to close this question with the above solutions.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Desired Skill Set for Microsoft Dynamics CRM Technical Resources – Part I
Windocks is an independent port of Docker's open source to Windows.   This article introduces the use of SQL Server in containers, with integrated support of SQL Server database cloning.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Suggested Courses

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question