Subject Re: active database session - to Ryan
Author innoy1k
Hi Ryan,

In this case, I will take the action of firing up an event to alarm
any active users to log off.

1) alarm the user when the metadata update or the archive process is
about to start
2) it will be ideal to alarm the user who trys to login while the
process is still running

many thanks
Duncan

--- In IBObjects@yahoogroups.com, "Ryan Nilsson-Harding"
<nilsson@b...> wrote:
> > If you don't mind for one more quesiton, which object provides
the
> > exclusive access of the database? This will extremely helpful
when we
> > start the archive process.
>
> Hi Duncan,
> To my knowledge (which is by no way exhaustive, anyone who has
clearer
> info please assist)
> there is no object which provides exclusive access.
> Exclusive access simply means "make sure you're the only one
connected"
>
> AFAIK, there is no "sure-fire way" to get exclusive access. Just
> varying degrees of trickery (for lack of a better word).
>
> If you KNOW you are the only SYSDBA who could log in, the
information
> below may help.
> (This is from a post I read a while ago, but ensure you read Helen
> Borrie's reply to this at the bottom)
>
>
> <BEGIN SNIPPET>
> If you are determined to shutdown the db and deny access then
simply:
>
> gfix -shut -force n (n being time to wait til forced shutdown)
> see also gfix -shut -tran n, gfix -shut -attach n
>
> Do your gbak, or whatever, confident that there are no connections
> (nobody but owner and sysdba can access the db) then bring it back
up
> with:
>
> gfix -online
> <END SNIPPET>
>
>
> <BEGIN BORRIE REPLY>
> You can only be confident that you have exclusive access if there
is no
> chance that you are not the only (human) user who has owner or
sysdba
> rights. If, for example (and I seem to recall it was the case with
Fred's
> deployment), many or all users log in as sysdba or owner, then
there is no
> way to know or guarantee that one of those "other sysdbas" who were
> already
> logged in when you did the forced shutdown are locked out. They
can just
> keep on chugging away - database integrity be damned.
>
> heLen
> <END BORRIE REPLY>
>
>
> Rgds,
> -Ryan