Skip to main content
Microsoft Dynamics GP forum
Suggested answer

Restore Live to Test Security Transfer

editSubscribe (0) ShareShare
Posted on by

Hello and good day, trying to improve a process and hoping someone can assist.

I need a script that I can run after restoring live to test to assist with clearing the invalid security records that are copied over.

This is in relation to a user having access to live and not test. When the restore of live is done to test company, the user is 'given' access to test but it is invalid access. 

When i try to give the user access to test in GP, the error message comes up stating - user cannot be added to one or more databases. With this, i have to go to SQL, remove the users from the security folder of the test company. 

Does anyone have a script I can use to automate this when a restore of live is being done to test? I am thinking similar to the update company ID script, this script should also be done to fix those orphan logins. 

  • Suggested answer
    David Musgrave MVP GPUG All Star Legend Moderator Profile Picture
    David Musgrave MVP ... 13,781 Super User on at
    RE: Restore Live to Test Security Transfer

    Hi Ali

    GP Power Tools Database Validation can fix all the issues with Test Environments or moving servers and much more.

    Install it and activate the free 30 day trial period to have a look.



Helpful resources

Quick Links

What Motivates a Super User?

We know many of you visit the Dynamics 365 Community and Power Platform…

Demystifying Copilot with Georg Glantschnig…

Industry experts answer burning questions directly from our amazing Community…

Setting Up Knowledge Sources for Copilot…

Look at how configuring a comprehensive knowledge base is crucial…


Andre Arnaud de Calavon Profile Picture

Andre Arnaud de Cal... 283,045 Super User

Martin Dráb Profile Picture

Martin Dráb 222,570 Super User

nmaenpaa Profile Picture

nmaenpaa 101,138

Product updates

Dynamics 365 release plans