All,
I have Sql Server 2008 installed on a server (let's say Server1) in a Domain (let's say AD). I also have a domain account called AD\Sql1. This is not an Admin account on the Domain (AD), but I want it to be an admin on the Server1. And then create a login on Sql Server for that Domain account (not local account).
How do I do that?
Questions:
- The user AD\Sql1, I want him as Admin on Server1. For that, do I just create a local account with the same user name (let's say, Server1\Sql1) and make the local account an Admin on the machine. Will that local account be automatically mapped to the domain account with the same name?
May be I should add here that
CREATE LOGIN [AD\Sql1] FROM WINDOWSdid not work for me. I tried and got an error sayinguser does not exist in Windows(something like that) - Now, if the above technique works. Lets assume, AD\Sql1, becomes an Admin on Sever1. So, in theory I do not need to create a Sql Login for that Windows Domain account on the Sql Server, right? All the local admins that are part of BUILTIT\Admins automatically have sysadmin access to Sql Server, right?
Where did I go wrong? Please share any URLs that could explain this concept better.
Edit: I should also add that Question 1 and 2 are important independently. I know how to add a domain/windows account as sysadmin. But I am interested in how mapping works between Domain and local accounts. My goal here is not how to add a local account as sysadmin, I can do that pretty quickly. My intention is not to be rude, but be as clear as possible. If my question is still not clear, please let me know, so I could add more details.
Thanks,
_UB
Edit: Grammar
CREATE LOGIN [AD\Sql1] FROM WINDOWS, I got an error saying that the user does not exist in Windows. So, I had to add him as used to local machine (then it works). – UB01 Mar 28 '12 at 18:26sysasminson the machine'. Thank you, I will read up on that. But how does the mapping work? Between Domain accounts and local accounts with the same name. – UB01 Mar 28 '12 at 18:31...user could not be found in windows. May be there is something else going on. I will check again. – UB01 Mar 28 '12 at 19:11AD. You should add the machine to AD domain. You are now pursuing the so called 'NT mirrored accounts' approach (perhaps w/o knowing you're doing so...) and this is a wrong approach. Add the SQL hosting machine to the AD domain. – Remus Rusanu Mar 28 '12 at 19:12