Unix/Linux -----------------------------------------------------------------------------
SELECT SUBSTR(file_spec, 1, INSTR(file_spec, '/', -1, 2) -1)
FROM dba_libraries
WHERE library_name = 'DBMS_SUBADV_LIB';
----------------------------------------------------------------------------------------
Windows -------------------------------------------------------------------------------
SELECT SUBSTR(file_spec, 1, INSTR(file_spec, '\', -1, 2) -1)
FROM dba_libraries
WHERE library_name = 'DBMS_SUBADV_LIB';
----------------------------------------------------------------------------------------