Solved

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

Posted on 2016-09-20
4
34 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 100 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 48

Accepted Solution

by:
Vitor Montalvão earned 400 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 48

Expert Comment

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

Expert Comment

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

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Suggested Solutions

Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
I have a large data set and a SSIS package. How can I load this file in multi threading?
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Viewers will learn how the fundamental information of how to create a table.

837 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