Many times we need to get actual data for our development and to get such data in your dev box you need to restore data from either UAT/QA/SIT or any environment which has such data.
Once you complete DB restore in your target system, here issues come, you don't have admin access or maybe SysUser access to this new DB.
Microsoft provides a script to update your email id as admin in your dev box. Follow the below steps to achieve this.
Step 1: Go to your DEV box RDP.
Step 2: Go to below path K:\AosService\PackagesLocalDirectory\Bin (In most cases it will be the same as mentioned if you didn’t find search for ‘PackagesLocalDirectory’ or ‘Packages’ shortcut in one of the drives.
Step 3: Open ‘AdminUserProvisioning’
Step 4: Enter your email Id, which you want to give admin access to this environment, and click on the submit button.
Step 5: Here you go.
the other option is using scripts,
select SID, NETWORKDOMAIN, NETWORKALIAS, * from UserInfo where Id = ‘Admin’
make a note of all these values.
Step 2: Run below script on new Database
networkdomain = ‘YourDomainName’,
networkalias = ‘Administrator’,
SID = ‘SID’
where ID = ‘Admin’
Follow us on Facebook to keep in rhythm with us. https:fb.com/theaxapta