Hi,
Is there a environment variable in PROIV to return the SQL_DBNAME? I want to write something depends on the Oracle SID the user is logging in. For example I have PROD and TEST DB where my function needs to distinguish if user is in PROD or TEST environment.
Thanks,
Vol

SQL_DBNAME
Started by
Vol Yip
, Jul 12 2007 02:53 AM
3 replies to this topic
#2
Posted 12 July 2007 - 07:43 AM
Hi Vol
I don't know whether it's possible to retrieve SQL_DBNAME using &$@~SQL_DBNAME, but if it isn't the following Oracle SQL may help.
Other parameters for sys_context are listed at: http://www.techonthe...sys_context.php
Hope this helps.
Paul
I don't know whether it's possible to retrieve SQL_DBNAME using &$@~SQL_DBNAME, but if it isn't the following Oracle SQL may help.
SELECT sys_context('USERENV','DB_NAME') FROM DUAL;
Other parameters for sys_context are listed at: http://www.techonthe...sys_context.php
Hope this helps.
Paul
#3
Posted 12 July 2007 - 09:39 AM
Hi Vol
I don't know whether it's possible to retrieve SQL_DBNAME using &$@~SQL_DBNAME, but if it isn't the following Oracle SQL may help.SELECT sys_context('USERENV','DB_NAME') FROM DUAL;
Other parameters for sys_context are listed at: http://www.techonthe...sys_context.php
Hope this helps.
Paul
SQL_DBNAME works for me, as does :
$BOOTS = &$@~PROPATH
$DATA = &$@~PRODATA
$DB = &$@~SQL_DBTYPE
$SQL_USER = &$@~SQL_USERNAME
Cheers
Reply to this topic

0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users