Wednesday, March 9, 2011

Instance/database/schema/Host details


Oracle Database Name
select ora_database_name from dual



Oracle Instance Number
select ora_instance_num from dual


Oracle Current Schema
SELECT sys_context('USERENV', 'CURRENT_SCHEMA') 
  FROM dual;

 


Oracle Host Name
SELECT sys_context('USERENV', 'HOST')
  FROM dual;

 


Oracle Service Name 
 SELECT sys_context('USERENV', 'SERVICE_NAME')
  FROM dual;
 

No comments:

Post a Comment