The easiest way is to wrap the procedure in a package, and have it set
a variable defined in the package spec.
Other invocations of the procedure would need to verify whether the
variable was already set.
One more solution
Assuming you are talking about it being run
in the current session: Here's another.
DBMS_APPLICATION_INFO.SET_CLIENT_INFO
DBMS_APPLICATION_INFO.GET_CLIENT_INFO
A demo can be found in Morgan's Library at
http://www.psoug.org/
Obtained from
http://dbaspot.com/forums/oracle-ser...y-running.html
Hope this helps