Re: db in Single User mode yet can be accessed via odbc

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Kalen Delaney (replies_at_public_newsgroups.com)
Date: 07/23/04


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
> >>
> >
> >
> >.
> >


Relevant Pages

  • Re: db in Single User mode yet can be accessed via odbc
    ... >You cannot set the database to single user mode usng the ... >To make the database immediately single user with all the ... >> timeframe for breaking the connection is controlled by ...
    (microsoft.public.sqlserver.server)
  • Re: Username of a user connecting to a database via an application server
    ... All these connections to the database are ... There is a concept in Oracle of "Proxy User", which your single user ... you need to code this in your connection ...
    (comp.databases.oracle.server)
  • Re: Caching a ADODB.Connection
    ... > I am creating a single user VB/ Jet Database and I was wondering if anyone ... The speed of opening and closing the connection is not a major ... the .mdb file) getting corrupted. ...
    (microsoft.public.vb.general.discussion)
  • Re: SQL Store MAC?
    ... I'm still seeing a lot of apps that use single user databases. ... industry leading company that uses Access MDB files ... This looks like a solid desktop database solution in addition to broader ...
    (borland.public.delphi.non-technical)
  • db in Single User mode yet can be accessed via odbc
    ... which it shows the the db: abc is now single user. ... termination clause of the ALTER DATABASE statement. ... connection attempts are refused. ...
    (microsoft.public.sqlserver.server)