Solved

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

Posted on 2016-09-20
4
29 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 47

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 47

Expert Comment

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

Expert Comment

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

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

For cloud, the “train has left the station” and in the Microsoft ERP & CRM world, that means the next generation of enterprise software from Microsoft is here: Dynamics 365 is Microsoft’s new integrated business solution that unifies CRM and ERP fun…
I have a large data set and a SSIS package. How can I load this file in multi threading?
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.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties

772 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