免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 966 | 回复: 0
打印 上一主题 下一主题

从数据字典获取ORACLE_HOME [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2011-12-23 01:11 |只看该作者 |倒序浏览

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
http://www.fourthelephant.com

3 Responses to “How to get ORACLE_HOME from data dictionary?”
  1. Eddie Awad Says:
    February 12th, 2006 at 6:50 pm

    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. Vadim Bobrov Says:
    February 12th, 2006 at 7:21 pm

    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
    http://www.fourthelephant.com

  3. Laurent Schneider Says:
    July 21st, 2006 at 4:35 am

    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
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP