I have a database that is in Single User Mode. When I run this:
exec sp_dboption 'MyDb', 'single user', 'FALSE'
It fails, telling me that there is still a user connected.
But when I run both of these:
exec sp_who2
select d.name, d.dbid, spid, login_time, nt_domain, nt_username, loginame
from sysprocesses p inner join sysdatabases d on p.dbid = d.dbid
where d.name = 'MyDb'
I get no connections for MyDb.
How can this be, and how can I get my database out of single user mode?
