Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Answered

User access issue when restore the database

Posted on by 10

Hi everyone,

We have one server which has two GP instances and tenant services configured. 

GP services (SBA)  is configured with multi tenant configuration in same machine too.

So, each instance has its' own system and company databases.

For accompany one of our requirement I need to restore backup of one instance company database to the other instance.

once complete this task I was able to access GP by changing DBNAME of SY00100 table to correct system database.

But, After that, I'm experiencing few issues in user configuration. 

I'm able to create users, but when I'm trying to give company access to that user through 'User Access Setup' window, the operation doesn't commit. 

When I check database level I see, the record still hit into SY60100 table of system database of other instance which I took the backup.

 Is there any solution for this? or any configuration which I missed here?

 

  • Verified answer
    David Musgrave MVP GPUG All Star Legend Moderator Profile Picture
    David Musgrave MVP ... 13,917 Most Valuable Professional on at
    RE: User access issue when restore the database

    Running GP Power Tools: Database Validation would fix the problem.

    The issue is that the SQL Security IDs (SIDs) are different even if the User IDs themselves exist.

    Database Validation in GP Power Tools will recreate all the logins and database users based on the GP users and companies with encrypted passwords.

    It can even email the generated password to each user so they can change it on next login.

    David

  • Verified answer
    Beat Bucher  GP Geek  GPUG All Star Profile Picture
    Beat Bucher GP Gee... 28,021 Super User 2024 Season 1 on at
    RE: User access issue when restore the database

    Hi Manz,

    Have a look at this site.. Helped me quite a few times to fix SQL users account that had been restored as part of a company without having to delete them one by one (that is fine when you just have a handful, but not dozens)

    www.mssqltips.com/.../

    PS: and since you're talking about restore company DB's from one GP instance into another instance, I guess those system DB's had different names ? you may have to run the GP Maintenance Utility to rebuild all the SP's from this restored company, as some times the system DB name is hard-coded within the SQL SP's and point to the wrong name.. 

  • Suggested answer
    RE: User access issue when restore the database

    Hello Manz,

    Are the users you are attempting to add already in the database?

    Dynamics GP almost fully relies on SQL's user system which comes down to two levels: Database Users and Server Logins.

    For GP these two user groups are linked, with a single Server Login pointing to multiple Database Users.

    When you restore a company SQL Backup, the Database Users will come over. The Logins, however, are stored on the server level and will not come over.

    When you create a new user in GP it will create a SQL Login without issues, but when you add company access we cannot add a Database User because one already exists. Make sure to remove the user from each GP database manually (security folder under the database within SQL Server Management Studio) then try to add them back using the User Access window.

    This will occur any time a database is copied between servers. Even if there is a user with the same name, the unique IDs in the backend (SIDS) may not match, which could cause issues.

    Hopefully this is able to get your users in.

    Thanks!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans