jhieb
asked on
Adding Logon to SQL Express Database
Hello,
I have an application that automatically loads SQL Express 2008 onto my workstation, and it uses the user account that is logged in for the administrator. So, this user has a login with the account from the domain server.
The workstation is Windows 7.
I logged into this workstation with a different account. Now, I cannot access the database because my accong is not an authorized login. I can use the local SA account, but I don't want to do that. Instead, I want to add my domain account to the Logins. When I try to add my domain account, the Management Studio cannot find my account. Also, it only lists my local machine as the location to search. It does not allow me to search through the domain for existing accounts. Why doesn't it allow me to search through the domain and add a domain account? can I change this, and how do I change this so that I can add a domain account to this database?
Thanks,
John
I have an application that automatically loads SQL Express 2008 onto my workstation, and it uses the user account that is logged in for the administrator. So, this user has a login with the account from the domain server.
The workstation is Windows 7.
I logged into this workstation with a different account. Now, I cannot access the database because my accong is not an authorized login. I can use the local SA account, but I don't want to do that. Instead, I want to add my domain account to the Logins. When I try to add my domain account, the Management Studio cannot find my account. Also, it only lists my local machine as the location to search. It does not allow me to search through the domain for existing accounts. Why doesn't it allow me to search through the domain and add a domain account? can I change this, and how do I change this so that I can add a domain account to this database?
Thanks,
John
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
This did it and it was easy to do. I wonder why the domain did not show up even though this machine is a domain member. Thanks for the help. I can now access my database.
looks like your workstation is not part of AD (probably Workgroup member).. check it
you can add local account workstation\newlogin
try above code to add
and additionaly
USE [master]
GO
CREATE LOGIN [yourDomainname\user] FROM WINDOWS WITH DEFAULT_DATABASE=[master] ---< as above
GO
EXEC master..sp_addsrvrolemembe
GO