Reputation: 8148
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?
Upvotes: 4
Views: 308
Reputation: 8148
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
Upvotes: 5