15 January, 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;  

Thanks

No comments:

Post a Comment

ADF : Scope Variables

Oracle ADF uses many variables and each variable has a scope. There are five scopes in ADF (Application, Request, Session, View and PageFl...