Warning: Constant WP_TEMP_DIR already defined in /var/www/html/blogs/glenn/wp-config.php on line 94

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/blogs/glenn/wp-config.php:94) in /var/www/html/blogs/glenn/wp-includes/feed-rss2-comments.php on line 8
Comments on: How To Avoid Orphaned Database Users with SQL Server Authentication https://www.sqlskills.com/blogs/glenn/how-to-avoid-orphaned-database-users-with-sql-server-authentication/ Semi-random musings about SQL Server performance Wed, 02 Jul 2014 07:49:54 +0000 hourly 1 https://wordpress.org/?v=6.9.4 By: Yaroslav https://www.sqlskills.com/blogs/glenn/how-to-avoid-orphaned-database-users-with-sql-server-authentication/#comment-16437 Wed, 02 Jul 2014 07:49:54 +0000 http://3.209.169.194/blogs/glenn/?p=825#comment-16437 In reply to Kevin Fries.

Nice tip. And thanks Kevin for that Idera app, it has been really handfull

]]>
By: Allen McGuire https://www.sqlskills.com/blogs/glenn/how-to-avoid-orphaned-database-users-with-sql-server-authentication/#comment-3498 Fri, 13 Sep 2013 20:28:13 +0000 http://3.209.169.194/blogs/glenn/?p=825#comment-3498 In reply to Alex.

Alex – I do the same. In fact I wrote up a procedure that maps orphaned users as you describe – have a look if you wish:

http://allen-mcguire.blogspot.com/2009/10/sql-server-map-orphaned-users.html

I do a lot of restores from production to non-production environements so it comes in handy for me.

]]>
By: Kevin Fries https://www.sqlskills.com/blogs/glenn/how-to-avoid-orphaned-database-users-with-sql-server-authentication/#comment-3365 Tue, 27 Aug 2013 11:51:54 +0000 http://3.209.169.194/blogs/glenn/?p=825#comment-3365 Idera offers a free tool which creates all of that very nicely, including the passwords and authorizations for the users regardless of the authentication type. Just migrated about 40 DBs from multiple instances from a cluster to standalone servers (don’t ask but they’re using VMs instead of the cluster for the HA) and it created the scripts and pushed over the authorizations nicely. Since I couldn’t go back to the old servers as they old and new servers used the same alias, it was the greatest thing since sliced bread. (For some reason I was given the new SQL instances with a higher patch level than the old one too, so migrating the model, master and msdb was out of the question).

It’s worth checking out.
http://www.idera.com/productssolutions/freetools/sqlpermissionsextractor

]]>
By: Alex https://www.sqlskills.com/blogs/glenn/how-to-avoid-orphaned-database-users-with-sql-server-authentication/#comment-3359 Mon, 26 Aug 2013 20:38:51 +0000 http://3.209.169.194/blogs/glenn/?p=825#comment-3359 Hi Glenn

I’ve always used the sp_change_users_login proc to remap orphaned users to the correct login rather than creating them with the original SID. Just wondering if this (i.e. the proc) isn’t the best way or if there’s other advantages to creating the user with the original SID?

Cheers

]]>
By: Tom https://www.sqlskills.com/blogs/glenn/how-to-avoid-orphaned-database-users-with-sql-server-authentication/#comment-3355 Mon, 26 Aug 2013 14:40:01 +0000 http://3.209.169.194/blogs/glenn/?p=825#comment-3355 Glenn,

Will the following fix the issue by mapping the SQL Login on the new instance to the User in the database and updating the SID for the User as well?

USE database_name;
GO

ALTER USER [database user] WITH LOGIN = [sql language=”login”][/sql];

]]>
By: gurpreet sohal https://www.sqlskills.com/blogs/glenn/how-to-avoid-orphaned-database-users-with-sql-server-authentication/#comment-3339 Sat, 24 Aug 2013 07:07:59 +0000 http://3.209.169.194/blogs/glenn/?p=825#comment-3339 Cool info Glenn .. Thanks for sharing

]]>