Removing users with backslash in SQL Server
I'm writing this more as a reminder to myself than anything else, because it's the second or third time that I forget this thing and spend some value time figuring out what's going on.
Today I was requested to restore a database on our Production Server in order to create a new database for some pre-production tests.
After the backup I ran the
However as I listed the
So, in order to remove this names from the
Today I was requested to restore a database on our Production Server in order to create a new database for some pre-production tests.
After the backup I ran the
sp_change_users_login
to fix the broken database users links, and everything. However as I listed the
sysusers
table I noticed some user names starting with a backslash '\
' that I couldn't remove with sp_dropuser
.So, in order to remove this names from the
sysusers
the right call is the sp_dropalias
.
0 Comments:
Post a Comment