Re: db in Single User mode yet can be accessed via odbc
From: Kalen Delaney (replies_at_public_newsgroups.com)
Date: 07/23/04
- Next message: Kalen Delaney: "Re: waitresource"
- Previous message: Hari Prasad: "Re: db in Single User mode yet can be accessed via odbc"
- In reply to: maxz: "Re: db in Single User mode yet can be accessed via odbc"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 22 Jul 2004 23:52:54 -0700
You should verify that you really have gotten into single user mode.
SELECT databasepropertyex('name of db', 'UserAcccess')
-- HTH ---------------- Kalen Delaney SQL Server MVP www.SolidQualityLearning.com "maxz" <anonymous@discussions.microsoft.com> wrote in message news:27c301c4706f$43c9dcc0$a601280a@phx.gbl... > Hi , > > i hope i am doing it correct. This is how i do it. > > first i opened 2 ms access and connect to the db via > odbc connection > at the server end , i used the query analyzer and > execute the alter database with rollback immediate > > i still find that the connections are still there , and > even when i closed the access and re-open i could still > open the links > > rdgs > >-----Original Message----- > >Hi, > > > >You cannot set the database to single user mode usng the > below comamnd if > >any user is connected to that partcular database. > > > >sp_dboption 'northwind','single user',true > > > >There are 2 options to make the database single user:- > > > >1. Kill all the connected users > >2. Alter database with rollback options > > > >For SQL 2000 , the recommended option is ALTER database. > >---------------------------------------------------------- > --------- > > > >To make the database immediately single user with all the > user disconnected > > > >ALTER database <dbname> set single_user with rollback > immediate > > > >To make the database single user after n seconds then ( > Here it is 120 > >seconds) > > > >ALTER database <dbname> set single_user with rollback > after 120 > > > >Thanks > >Hari > >MCDBA > > > > > > > > > > > >"maxz" <anonymous@discussions.microsoft.com> wrote in > message > >news:272501c47061$cad93e30$a601280a@phx.gbl... > >> Hi , > >> > >> How does the SINGLE USER actually works , > >> i have used the follwing commands : > >> sp_dboption 'acb' , 'single user' 'true' and refresh > >> which it shows the the db : abc is now single user. > >> > >> However , i can still access that db via odbc. > >> > >> Is this how a single user shld works ? Not as wat in > >> the Books Online : > >> > >> SINGLE_USER allows one user at a time to connect to the > >> database. All other user connections are broken. The > >> timeframe for breaking the connection is controlled by > the > >> termination clause of the ALTER DATABASE statement. New > >> connection attempts are refused. The database remains in > >> SINGLE_USER mode even if the user who set the option > logs > >> off. At that point, a different user (but only one) can > >> connect to the database > >> > >> > >> thkz > >> > > > > > >. > >
- Next message: Kalen Delaney: "Re: waitresource"
- Previous message: Hari Prasad: "Re: db in Single User mode yet can be accessed via odbc"
- In reply to: maxz: "Re: db in Single User mode yet can be accessed via odbc"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|