Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 can't login to SQL Server to add new logins

Author  Topic 

Maracatu
Starting Member

13 Posts

Posted - 2009-08-30 : 09:23:01
Hi,
I installed SQL Server 2008 a few weeks ago logged into Windows 2008 server as an account called "guestadmin". For some ridiculous reason (something to do with our IT support department's politics) they have removed that user from the network and given me a new username/login for the network. I need to add this new user to SQL Server logins but I am now unable to login to SQL server at all through Management Studio with windows authentication (I get 'login failed for user xxx' 18456 error message). Does anyone know how I can get around this problem - ie how can I login in and connect to my SQL Server database?
thanks
mara

YellowBug
Aged Yak Warrior

616 Posts

Posted - 2009-08-30 : 09:30:26
Can anyone else logon with sysadmin rights? And create your new account in SQL Server?
What account does the SQL Service run under? Can your IT support logon to SQL Server with this account, and add your new account?

If no-one can logon with the rights to create a new account, you may need to stop and restart the SQL service to create a new sysadmin.
Is this a production server? Are you able to freely restart the service?
Go to Top of Page

Maracatu
Starting Member

13 Posts

Posted - 2009-08-30 : 09:48:59
Thanks. IT support are not available as it's the weekend. It's not yet in production so it would be ok for me to stop and restart the SQL Service - but how would I create a new sysadmin?
Go to Top of Page

YellowBug
Aged Yak Warrior

616 Posts

Posted - 2009-08-30 : 10:08:15
Try this: http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=131215

Let us know if it works ok.
Go to Top of Page

Maracatu
Starting Member

13 Posts

Posted - 2009-08-30 : 17:53:59
i've tried restarting in single user mode, and restricting the login to sqlcmd but it still won't let me login - giving generic login failed for user message 18456
Go to Top of Page

Maracatu
Starting Member

13 Posts

Posted - 2009-08-30 : 19:15:08
ok - sorted it now. instead of logging in with sqlcmd in single user mode, I ran management studio as administrator (right clicking) and it worked - also with database in single user mode. I also had to stop IIS to prevent web application from stealing my single user mode connection
Go to Top of Page

YellowBug
Aged Yak Warrior

616 Posts

Posted - 2009-08-31 : 06:11:21
Sorry - I should have mentioned that you'd need to stop any service/application that connects (e.g. web sites, SQL Agent)
Thanks for letting us know how you got on.
Go to Top of Page
   

- Advertisement -