sync all users after database backup

110
7
Jump to solution
07-30-2020 04:55 AM
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?

Reply
0 Kudos
1 Solution

Accepted Solutions
New Contributor III

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

View solution in original post

Reply
0 Kudos
7 Replies
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.

Reply
0 Kudos
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 ...

Reply
0 Kudos
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.

New Contributor III

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

View solution in original post

Reply
0 Kudos
Esri Contributor

Yep, just got in before me!

New Contributor III

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

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?