Monday, August 12, 2024

How to fix Admin account after refreshing data base in your dev box

 If you refresh your devbox database from another environment and need to set up its admin account to your user, you can do it by executing the following SQL command.


update USERINFO 
set NAME = 'Admin', 
    NETWORKDOMAIN ='https://sts.windows.net/', 
    NETWORKALIAS = 'a.voytsekhovskiy@mydomain.net', 
    ENABLE = 1, 
    SID = 'S-1-19-XXXXXXXXXX-XXXXXXXXXX-XXXXXXXXXX-XXXXXXXXXX-XXXXXXXXXX-XXXXXXXXXX-XXXXXXXXXX-XXXXXXXXXX-XXXXXXXXXX-XXXXXXXXXX', 
    IDENTITYPROVIDER ='https://sts.windows.net/'
where ID = 'ADMIN'

NB: use your own email address and SID.


No comments: