Skip to content
Discussion options

You must be logged in to vote

Found the answer. After tracing the command it was narrowed down to the following statement:

exec('use ' + @db_name + ' INSERT #loginmappings select suser_sname(u.sid), db_name(), u.name, null from sys.database_principals AS u where suser_sname(u.sid) is not null')

Suser_Sname was performing poorly and was traced back to servers still pointing Domain Controllers to Azure. Once the DC was switched to local instance performance returned.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@potatoqualitee
Comment options

Answer selected by JedWare
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants