Read ORACLE_SID and ORACLE_HOME Inside PL/SQL Code

 DECLARE 

   V_ORACLE_HOME  VARCHAR2 (2000); 
   V_ORACLE_SID  VARCHAR2 (256); 

 BEGIN 

   DBMS_SYSTEM.GET_ENV ('ORACLE_HOME', V_ORACLE_HOME); 
   DBMS_SYSTEM.GET_ENV ('ORACLE_SID', V_ORACLE_SID ); 
  
   --The below line will print Oracle_home
   DBMS_OUTPUT.PUT_LINE ('ORACLE_HOME :- ' || V_ORACLE_HOME); 
  
   -- the below line will print Oracle_SID
   DBMS_OUTPUT.PUT_LINE ('ORACLE_HOME :-' || V_ORACLE_SID); 
 END; 

Reference :
1-OTN Forum

Thank you
Osama Mustafa

Comments

Popular posts from this blog

Connection refused; No available router to destination On Weblogic Node Manager Log

How to change SGA in Oracle Rac

SGA_MAX_SIZE & SGA_TARGET / MEMORY_TARGET & MEMORY_MAX_TARGET