Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

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 a sporadic problem, when upgrading SQL Server in a single-user mode, some other application somehow logs into the database and kicks my process out.

Last time when that happened, I ran sp_who, and I could see that a process that took control of the database is "TASK MANAGER". EDIT By "took control" I mean that my process crashed with exception Database '...' is already open and can only have one user at a time. while it was running database upgrade code. SqlConnection was NOT closed or disposed.

Anyone could tell me what is this process, what is it's purpose, and how in the world it could get into a database, which is in single-user mode, and there is an active connection?

share|improve this question

migrated from Jul 11 '12 at 21:54

This question came from our site for professional and enthusiast programmers.

When you say it's "called" TASK MANAGER, is that the loginname or cmd field from the sp_who results? – Widor Jul 11 '12 at 16:20
TASK MANAGER should normally be on the master db, but it's a background process and not sure what you mean by "taking control" of the database. – Widor Jul 11 '12 at 16:23
@Widor TASK MANAGER is Command field. – galets Jul 11 '12 at 16:31
AFAIK Task Manager as it's a system SPID would not take up a user connection to the DB. Someone more knowledgeable than me may be able to confirm this. Do you have sql server agent running on this instance? From memory this counts as a 'user connection' and can interfere with single user mode. – WT_W Jul 12 '12 at 0:07
up vote 4 down vote accepted

Any SPIDs below 50 are system processes. "TASK MANAGER" is one of these. I'm not sure exactly what it does but it is initiated only by the server itself, dealing with system level jobs. Seeing this on the database "sp_who" is nothing to worry about.

I highly doubt this process is the reason why you are getting kicked out of the DB running in single user mode, but if you are curious what the process might be doing you could run dbcc inputbuffer(the_spid_of_process) to check if it is running any commands.

share|improve this answer
Is there something to worry if we are seeing the same for many SPIDs. For me SPID 22 --> 34 is Command : TASK MANAGER under user account sa – Jithin Shaji Jul 21 '14 at 10:22

The "Task Manager" process is used by change tracking to do cleanup steps in change tracking. To make it stop, you can either disable change tracking, or you can disable change tracking cleanup.

share|improve this answer

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.