Pages

OracleEBSpro is purely for knowledge sharing and learning purpose, with the main focus on Oracle E-Business Suite Product and other related Oracle Technologies.

I'm NOT responsible for any damages in whatever form caused by the usage of the content of this blog.

I share my Oracle knowledge through this blog. All my posts in this blog are based on my experience, reading oracle websites, books, forums and other blogs. I invite people to read and suggest ways to improve this blog.


Sunday, February 24, 2013

Get Oracle Home & Oracle SID from PLSQL

The below script gets Oracle Home and Oracle SID from PL/SQL

 DECLARE  
   LC$ORACLE_HOME  VARCHAR2 (2000);  
   LC$ORACLE_SID  VARCHAR2 (256);  
 BEGIN  
   DBMS_SYSTEM.GET_ENV ('ORACLE_HOME', LC$ORACLE_HOME);  
   DBMS_SYSTEM.GET_ENV ('ORACLE_SID', LC$ORACLE_SID);  
   
   -- Oracle Home  
   DBMS_OUTPUT.PUT_LINE ('ORACLE_HOME = ' || LC$ORACLE_HOME);  
   
   -- Oracle SID  
   DBMS_OUTPUT.PUT_LINE ('ORACLE_HOME = ' || LC$ORACLE_SID);  
 END;

No comments:

Post a Comment