|
sql
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Dropping all connections to a databaseIs there an easy command I can use within a sql script that will drop all
connections to a database, without having to go the SEM and dropping them via Management/Current Activity/Process info? Thanks. DF Use "ALTER DATABASE".
Example: alter database northwind set single_user with ROLLBACK IMMEDIATE AMB Show quote "Doug F." wrote: > Is there an easy command I can use within a sql script that will drop all > connections to a database, without having to go the SEM and dropping them via > Management/Current Activity/Process info? > > Thanks. > > DF Doug
Try this alter database [dbname] set restricted_user with rollback immediate Regards John Show quote "Doug F." wrote: > Is there an easy command I can use within a sql script that will drop all > connections to a database, without having to go the SEM and dropping them via > Management/Current Activity/Process info? > > Thanks. > > DF Alejandro and John - thank you both.
Doug F. Show quote "John Bandettini" wrote: > Doug > > Try this > > alter database [dbname] > set restricted_user > with rollback immediate > > Regards > > John > > "Doug F." wrote: > > > Is there an easy command I can use within a sql script that will drop all > > connections to a database, without having to go the SEM and dropping them via > > Management/Current Activity/Process info? > > > > Thanks. > > > > DF |
|||||||||||||||||||||||