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
 Other Forums
 SQL Server 6.5 \ SQL Server 7.0
 Single user mode doesn't change without warning

Author  Topic 

Bambola
Posting Yak Master

103 Posts

Posted - 2009-07-10 : 09:54:17
Hi guys,

I've been running a DBCC CHECKTABLE with repair on a damanges table (consistency errors - no reference to text field - had no choice but to ran checktable allowing data lose). I had this problems on 2 database that have the same structure.

Here is my code

exec sp_dboption my_db ,'single','true'
dbcc checktable(my_table, REPAIR_ALLOW_DATA_LOSS)
exec sp_dboption my_db ,'single','false'

Everything seemed to have gone well, and consistency errors were fixed for both databases. but in the morning I found one of the databases in single user mode!

I remember clearly that after switching back to multi-user I recieved the message saying database is already in a multi-user mode. I though I must have run the sp_dboption statement twice...

Seems like exec sp_dboption my_db ,'single','false' did nothing without a warning. On the contrary, it was giving a "false" message.

Is that a known bug? any ideas?

Thanks!
   

- Advertisement -