last day (15 days later) » 

6:24 PM
0
A: Is it possible to convert existing users from SQL Server authentication to Windows (AD) authentication? (SQL Server 2008 R2)

Pieter GeerkensSimply create SQL Server logins on your server instance for each user; assign these server logins to the Windows AD accounts for each user; and map these new logins to the database user accounts. For twenty users it will be faster to do this by han than to script the process.

 
Can you explain how you assign the server logins to the windows AD accounts?
 
@KennethFisher: CREATE LOGIN login_name FROM WINDOWS. Am I missing something in your question; this seems too easy.
 
The OP is asking if he can attach a SQL Server Login to an AD login. It sounded like you were describing out to do that.
 
@KennethFisher: That's not the question I read: "I am wondering if there is any way to move from using SQL user accounts to AD credentials."
 
Fair point. I guess I read extra into it. So you are saying just create the new logins by and and assign them all of the existing permissions by hand?
 
6:24 PM
@KennethFisher: Not quite - create new logins and map them to the existing database users by hand. (20 or 40 simple actions, depending on how you count.) The existing database users come with all their permissions intact.
 
Unfortunately you can't map an AD login to a SQL Server user. I tried and it returns an error. "Cannot remap a user of one type to a login of a different type." Wish it would though, would make life a lot easier.
 
@KennethFisher: Please clarify - there is no such thing as a SQL SERVER user, as users are atabase objects not server objets.
I'm here
 
Users are database object but still have a "type". If the type is "S" (SQL Server user) then it can only be mapped to a Server Principal of type S
 
I am just looking at Books Online for this
 
Here is the link for sys.database_principals msdn.microsoft.com/en-us/library/ms187328.aspx
 
6:28 PM
OK. Just found the relevant text: "Only SQL users and Windows users (or groups) can be remapped. The WITH LOGIN clause cannot be used to change the type of user, such as changing a Windows account to a SQL Server login. "
I never would have guessed.
Thanks for your patience Kenneth.
 
Yea, Initially I thought it would work too
No problems. I've done a LOT of reading on permissions. If you get a chance take a look at the SPs I wrote for them.
 

last day (15 days later) »