views:

105

answers:

2

Other than querying the v_$database and v_$instance tables (or the views v$instance, v$database) is there any other way to programtically retrieve (from PL/SQL) the database name of an oracle database?

+6  A: 

dbms_standard.database_name

dpbradley
+4  A: 

Found the following on Experts Exchange:

select ora_database_name from dual;
select sys_context('userenv','db_name') from dual;
select global_name from global_name;

http://www.experts-exchange.com/Databases/Oracle/Q_20529577.html

Jeff
+1, good additional info.
DCookie