Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Session variable?
If you're using Oracle8i then you can use a new feature called application
context. Effectively these are equivalent to the variables in your UNIX
profile. Create a procedure to populate these variables depending on the
user logging on. Then create a ON LOGON trigger which runs this procedure.
Once set up properly these session variables get automatically populated
when you log on to the database and can be referenced in your code.
For more info on application contexts check out....
http://192.150.88.104/grace/Oracle8i/Doc/server.815/a68003/01_12est.htm
-----Original Message-----
From: G.Plivna_at_itsystems.lv
To: Multiple recipients of list ORACLE-L
Sent: 10/19/00 11:10 AM
Subject: Re: Session variable?
You can create package specification with public varibles in it
something like
CREATE OR REPLACE PACKAGE my_pkg AS
var1 VARCHAR2(100);
var2 NUMBER;
END;
/
and access these variables with my_pkg.var1 and my_pkg.var2
Gints Plivna
"Andor Gyula" <gy.andor_at_eur To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com> omacc.hu> cc: Sent by: Subject: Session variable? root_at_fatcity. com 00.10.19 12:10 Please respond to ORACLE-L
Hi !
Is there any way to create user-defined session variables in Oracle?
Thanks in advance.
Gyula Andor
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Andor Gyula INET: gy.andor_at_euromacc.hu 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-LReceived on Thu Oct 19 2000 - 04:49:02 CDT
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: INET: G.Plivna_at_itsystems.lv 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). The information contained in this e-mail transmission is confidential and may be privileged. It is intended only for the addressee(s) stated above. If you are not an addressee, any use, dissemination, distribution, publication, or copying of the information contained in this e-mail is strictly prohibited. If you have received this e-mail in error, please immediately notify our IT Department
![]() |
![]() |