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.
| Author |
Topic |
|
sunsanvin
Master Smack Fu Yak Hacker
1274 Posts |
Posted - 2007-10-12 : 09:42:21
|
| Dear All,i've to drop one database....i'm sure....but it is saying presently it is in use....there no no replication....some user is using....that is a new database.....how can i throw all users from the databaseVinodEven you learn 1%, Learn it with 100% confidence. |
|
|
Kristen
Test
22859 Posts |
Posted - 2007-10-12 : 09:49:28
|
| ALTER DATABASE MyDatabase SET SINGLE_USER WITH ROLLBACK IMMEDIATE |
 |
|
|
sunsanvin
Master Smack Fu Yak Hacker
1274 Posts |
Posted - 2007-10-12 : 09:58:25
|
| thank you kristenVinodEven you learn 1%, Learn it with 100% confidence. |
 |
|
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
7020 Posts |
Posted - 2007-10-12 : 10:02:24
|
I prefer to do it this way, because it prevents anyone, even administrators, from re-connecting:use masteralter database MyDatabase set offline with rollback immediate CODO ERGO SUM |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2007-10-12 : 10:07:48
|
| "set offline"That's a blinking good idea!Kristen |
 |
|
|
|
|
|