Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have removed by accident SQLServerAgent account and now I cant get access to the database. Connecting from management studio throws me error 26 and system log shows: SQLServerAgent could not be started (reason: Error creating a new session). . I have googled out that's cause of it may be lack of account but ... how to restore it!?

share|improve this question
up vote 2 down vote accepted

Create a new local or domain account (depending on your environment and its needs) and manually assign it the proper permissions. The MSDN article I linked to is for SQL Server 2008 R2, and you didn't mention your specific version of SQL Server. However, it makes no difference. The principle remains the same. Simply create a new account and assign it the proper permissions for your version of SQL Server. The required permissions for each service account are easily found by searching for them in the product documentation (SQL Server Books Online).

You might also want to look at the article titled "Setting Up Windows Service Accounts" on MSDN for a refresher in the general concept of service accounts and permission. Once again the article is specific to SQL Server 2008 R2, but the principles remain the same. Search for documentation for your specific product version.

share|improve this answer
I was trying to do something similar myself, but I failed, so docs are really usefull. Iam running MSSQL 2008 SP1. Big thx for help, I will mark answer asap. – xp11 Sep 3 '11 at 18:58
@xp11 Hope it works out for you. Thanks for marking the answer. don't forget to upvote helpful answer too. – Wesley Sep 3 '11 at 19:02

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.