IT recently re-setup my laptop with 64bit windows. He installed Sql Server dev edition for me and set it up with a username and password. I logged in and tried changing Sql Server to windows authentication, restarted sql server, and now it won't let me log in with my domain account.
I have tried adding myself to the SQLServerSQLAgentUser and SQLServerMSSQLUser groups on my local system, but Sql Server still keeps saying my domain account is not authorized. My account is a local system administrator.
How can I get Sql Server to let me log in?
And also, since you are a local administrator.
follow microsoft step by step instructions: http://msdn.microsoft.com/en-us/library/dd207004.aspx or as below:
Stop the SQL Server Service.
Open a command prompt as administrator and browse to the SQL Server binn folder (C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Binn by default)
start the SQL Server in single user mode using the console output
Then start SSMS or SQLCMD as admin, connect and run the following query:
Since you are a local adminstrator you can use the backdoor to SQL Server instance to obtain access.
Download psexec.exe (PSTools from TechNet here).
Go to a command prompt and to the directory where you extracted the file (psexec.exe). Run the command
psexec.exe -i -s ssms.exe
orpsexec.exe -i -s sqlwb.exe
for SQL 2005.This is going to open SSMS as the NT AUTHORITY\SYSTEM account, which by default is given SYSADMIN rights to the instance. You should then be able to add your login to the instance. If this does not work it is likely the system account permission was removed.
NOTE: If you are on Vista or Windows 7 you will probably need to run the command prompt as Administrator (right-click "run as Administrator").
Second Note: This will not work on SQL Server 2012 or above because the built-in administrator group is no longer added as sys admin by default. The exception to this could be if you are eating with an in-place upgrade.
Unfortunately I think you'll either have to:
If you don't have access to the database, then you can't update the security to give yourself permissions.
In order to log in to your SQL Server (individual database permissions may still be missing) the security login needs to be created with
Windows authentication
selected and then the domain account name is theLogin name
.Should you have ensured that your windows account had sufficient permissions to log in before you changed it to Windows Auth?