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?
loginnameorcmdfield from thesp_whoresults? – Widor Jul 11 '12 at 16:20masterdb, 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