Solved

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

Posted on 2016-09-20
4
41 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 50

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 50

Expert Comment

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

Expert Comment

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

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Having trouble getting your hands on Dynamics 365 Field Service or Project Service trial? Worry No More!!!
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

738 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