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

--- In, "Ryan Nilsson-Harding"
<nilsson@b...> wrote:
> > If you don't mind for one more quesiton, which object provides
> > 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
> info please assist)
> there is no object which provides exclusive access.
> Exclusive access simply means "make sure you're the only one
> 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
> 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)
> If you are determined to shutdown the db and deny access then
> 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
> with:
> gfix -online
> 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
> rights. If, for example (and I seem to recall it was the case with
> 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
> Rgds,
> -Ryan