Chinaunix首页 | 论坛 | 博客
  • 博客访问: 815358
  • 博文数量: 199
  • 博客积分: 6363
  • 博客等级: 准将
  • 技术积分: 2225
  • 用 户 组: 普通用户
  • 注册时间: 2007-04-28 10:01
个人简介

来自农村的老实娃

文章分类

全部博文(199)

文章存档

2017年(1)

2014年(2)

2013年(3)

2012年(6)

2011年(26)

2010年(34)

2009年(50)

2008年(44)

2007年(33)

我的朋友

分类: Oracle

2011-09-29 10:27:08

On UNIX:

select substr(file_spec, 1, instr(file_spec, '/', -1, 2) -1) from dba_libraries where library_name = 'DBMS_SUMADV_LIB'

On Windows, substitute with backslash.

Vadim Bobrov
Oracle Database Tools

3 Responses to “How to get ORACLE_HOME from data dictionary?”
  1. Says:

    Note that you may not have access to dba_libraries. You may use user_libraries or all_libraries.

    I tested the above query on my Windows XP running Oracle XE (connected as sys as sysdba), here is what I got: C:/ADE/aime_051006/oracle/rdbms/. The funny thing is, I do not seem to find this directory at all on my C drive ?!

  2. Says:

    correct. I get the same (non-existent) directory. Does not seem to work on XE. On Enterprise 8i, 9i, 10g works fine

    Vadim Bobrov
    Oracle Database Tools

  3. Laurent Schneider Says:

    This is also not the “ORACLE_HOME” that is used to start the instance. To get the ORACLE_HOME used to start the instance, you can do :

    SQL> set autopri on SQL> var oracle_home varchar2(255) SQL> exec dbms_system.get_env('ORACLE_HOME',:ORACLE_HOME) PL/SQL procedure successfully completed. ORACLE_HOME -------------------------------------------------------------------------------- /app/oracle/oracle/product/10.2.0/db_2
阅读(1118) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~