Thursday, July 4, 2013

How to find out oracle_home from database ??

Declare
OHM varchar2(100);
begin
OHM := NULL;
SELECT substr(file_spec,1,instr(file_spec,'lib')-2) INTO OHM FROM
dba_libraries
WHERE library_name='DBMS_SUMADV_LIB';
IF length(OHM) < 4 THEN
 dbms_system.get_env('ORACLE_HOME', :OHM) ;
END IF;
dbms_output.put_line('ORACLE_HOME : '||:OHM);
END;
/

No comments:

Post a Comment