Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Restricting a Package to one instance.

Re: Restricting a Package to one instance.

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Wed, 26 Sep 2001 00:39:07 +0200
Message-ID: <tr22sm5osemfdb@news.demon.nl>


Answers embedded
"Brian Tkatch" <SPAMBLOCK.Maxwell_Smart_at_ThePentagon.com.SPAMBLOCK> wrote in message news:3bb0f037.3046000625_at_news.alt.net...
> I have a package that, as a requirement, may not have multiple
> instantiations. Further, multiple sessions must be able to check its
> state (which can be via a function that returns various variables from
> the package).
>
> Is there a way to:
>
> 1) make a package have only one instantiation?

no, a package is always instantiated in the context of a session, not globally

> 2) for mutiple sessions (by multiple users) see a common state?

again no, see above

Looks like you need to use advanced queueing. I never used it.

>
> On another note, once the package starts, away it goes looping. It
> stops in one of two cases. When the loop iterates:
>
> 1) it checks a package variable to see if it should continue.
> 2) it retrieves a value from a queue. When empty, it stops.
>
> I wanted to add a third method. This would be a forced stop. I am
> assuming to force a stop on a procedure (E.G. in middle of doing an
> UPDATE that will take a half-hour) its session would need to be
> killed.
>
> 1) Is killing it the only way?
> 2) Is there a way for a procedure to get its session id?
> 3) Can a procedure be killed and keep the state of its package?
>
> Brian
>

Hth,

Sybrand Bakker, Senior Oracle DBA Received on Tue Sep 25 2001 - 17:39:07 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US