Exclusive mode

Exclusive mode

Post by Loukas Marini » Wed, 03 Sep 2003 15:44:44



Background
SQL server 7.0 vb6 and ado

I suppose sql server doesn't support exclusive mode:

I have implemented a kind of exclusive mode in the application
setting/unsetting flags etc. but i want to eliminate producing all of the
necessary information in the application (case of crashes, unexpected
conditions etc)

My question is what kind of information i can take from server so i can come
closer to an exclusive mode.

Is there a way, let's say to lock the entire database?
or similar things.

Is there a way to set/unset the maximum numbers of users connected to my
database and not just to the server?

Any general direction will be welcomed
Thanx in advance

 
 
 

Exclusive mode

Post by Russell Field » Wed, 03 Sep 2003 16:02:24


Loukas,

There are options with ALTER DATABASE that might help you.  Read in the BOL,
focusing on these options:

    < state_option > ::=
        { SINGLE_USER | RESTRICTED_USER | MULTI_USER }
        | { OFFLINE | ONLINE }
        | { READ_ONLY | READ_WRITE }

There is no "user count" but often SINGLE_USER or RESTRICTED_USER will give
you what you need.

Russell Fields

Quote:> Background
> SQL server 7.0 vb6 and ado

> I suppose sql server doesn't support exclusive mode:

> I have implemented a kind of exclusive mode in the application
> setting/unsetting flags etc. but i want to eliminate producing all of the
> necessary information in the application (case of crashes, unexpected
> conditions etc)

> My question is what kind of information i can take from server so i can
come
> closer to an exclusive mode.

> Is there a way, let's say to lock the entire database?
> or similar things.

> Is there a way to set/unset the maximum numbers of users connected to my
> database and not just to the server?

> Any general direction will be welcomed
> Thanx in advance


 
 
 

Exclusive mode

Post by Katerin » Wed, 03 Sep 2003 16:04:43


">Is there a way, let's say to lock the entire database?

Quote:>or similar things.

>Is there a way to set/unset the maximum numbers of users
connected to my
>database and not just to the server?"

WHY DON'T YOU GIVE IT A TRY AND READ THE SQL SERVER BOOKS
ONLINE A LITTLE BETTER?
THAT'S THE FIRST HINT.
CONCERNING THE LOCKING OF A DATABASE.....WHY DO YOU WANT
TO PUSH IT SO FAR???? IS THERE VITAL NEED FOR YOU TO LOCK
A DATABASE? IF YOUR DATABASE IS NOT BEING REPLICATED, YOU
BETTER NOT TRY IT.
BEST REGARDS FROM ATHENS
 
 
 

Exclusive mode

Post by Loukas Marini » Wed, 03 Sep 2003 19:18:27


Hello Katerina.....
Thanks for your vital hint for reading BOL....
As far as it concerns the second part of your comment, i am not asking
advice for design issues  but rather having as a start point a 'wrong'
design how to implement a solution.
So if you really want to help do so or just skip away.

p.s Please, Please find for me a post out of the about 130 thousands of this
newsgroups that even a small part of the solution isn't on the BOL.


Quote:> ">Is there a way, let's say to lock the entire database?
> >or similar things.

> >Is there a way to set/unset the maximum numbers of users
> connected to my
> >database and not just to the server?"

> WHY DON'T YOU GIVE IT A TRY AND READ THE SQL SERVER BOOKS
> ONLINE A LITTLE BETTER?
> THAT'S THE FIRST HINT.
> CONCERNING THE LOCKING OF A DATABASE.....WHY DO YOU WANT
> TO PUSH IT SO FAR???? IS THERE VITAL NEED FOR YOU TO LOCK
> A DATABASE? IF YOUR DATABASE IS NOT BEING REPLICATED, YOU
> BETTER NOT TRY IT.
> BEST REGARDS FROM ATHENS