Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: "Global" variable in Pl/SQL
Quick answer: You cannot.
Somewhat longer details: The implications of doing so are most likely not really what you want. Ever noticed the Oracle latches.... You would need to get into exactly the same trouble; who's allowed to write to that value? Oracle doesn't expose an API to latching. If you need such a functionality, you need to put your global variable into a table and update with a SQL update statement, and query it using a SQL select every time you need it.
Thanks, Bjørn.
On Tuesday 26 February 2002 21:44, you wrote:
> Dear list !
> How can i make a package variable visible to all sessions , please ?
> I.e. i have a package PPP that has a package variable VVV.
> There is a stored proc in the package , PPP.SP1
> In this procedure i set the package variable VVV to some value.
> Now , i want all the sessions connected to the instance to be able to see
> this value of PPP.VVV .
>
> Thanks a lot in advance !
-- Bjørn Engsig, Miracle A/S http://MiracleAS.dk -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: =?iso-8859-1?q?Bj=F8rn=20Engsig?= INET: bjorn_at_MiracleAS.dk Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Tue Feb 26 2002 - 15:41:52 CST