sync all users after database backup

1476
7
Jump to solution
07-30-2020 04:55 AM
BryanPrice
New Contributor III

After restoring a database from backup i use ...

EXEC sp_change_users_login 'Update_One', 'sde', 'sde'

how do i sync the windows authinicated users?

0 Kudos
1 Solution

Accepted Solutions
BryanPrice
New Contributor III

Craig Russell‌, I think I may see the problem if this below is correct?

View solution in original post

0 Kudos
7 Replies
CraigRussell
Esri Contributor

Hi Bryan

Not sure of the exact source of the script that I've used in the past to do this, but it was similar to the one found here - What about orphaned windows users? – SQLServerCentral  

This only works for SQL Server 2012 and higher.

0 Kudos
BryanPrice
New Contributor III

Craig Russell‌ thanks for the reply, let me go into  a little more detal, I restored a database from an April 30th backup and named it a different name (GDB2020) , I did this from SSMS. I ran the script, (EXEC sp_change_users_login 'Update_One', 'sde', 'sde')  now I;m trying to connect to it from ArcMap using the sde credentials and ArcMap is giving me error ...

0 Kudos
CraigRussell
Esri Contributor

The source of your issue is more likely to be the renaming of the geodatabase; this doesn't work because fully qualified table names (i.e. database.schema.table) are stored throughout the SDE system tables.

BryanPrice
New Contributor III

Craig Russell‌, I think I may see the problem if this below is correct?

0 Kudos
CraigRussell
Esri Contributor

Yep, just got in before me!

BryanPrice
New Contributor III

yes that is what the problem was... Thanks guys!!

CraigRussell
Esri Contributor

Thanks for the update Bryan; could you please mark this as helpful and the correct answer to assist others who might have the same issue?