zoukankan      html  css  js  c++  java
  • 关于TNS_ADMIN环境变量

    这里我补充一句:TNS_ADMIN正常是写客户端的路径(但是很奇怪,我改成服务端的居然也不影响访问,我服务端客户端都在本地)

    很多oracle产品都有自己的TNS文件,如果你的系统里装了多个Oracle的产品的话,那么客户端连instance的时候,到底是使用那个tnsnames.ora呢?这个时候就需要看TNS_ADMIN这个参数了。

    Question: What is the tns_admin parameter and how do I use tns_admin to define a common location for my TNS files?

    Answer:  The tns_admin parameter determines the location of the tns administration files (e.g. tnsnames.ora and listener.ora, etc.) 
    The tns_admin parameter is super useful on servers with many databases on different release levels (hence different $ORACLE_HOME directories) because all databases tns_admin values can be set to a single location, allowing a single set of SQL*Net files for all databases on the server. 

    Without the tns_admin variable, each instance would have it's own set of TNS files in the $ORACLE_HOME/network/admin directory.


    查看方法:命令行
    C:Documents and Settingsptian>set TNS_ADMIN
    TNS_ADMIN=D:oracleproduct10.1.0Db_1NETWORKADMIN
    这就表示客户端会从D:oracleproduct10.1.0Db_1NETWORKADMIN下读取TNS的设置

    修改方法:
    有两个地方可以修改,一个是注册表,一个是系统环境变量。
    注册表的位置:HKEY_LOCAL_MACHINESOFTWAREORACLEHOME0TNS_ADMIN
    系统环境变量的优先级高于注册表,如果设置了环境变量,那么就会忽略注册表的值。

    转载自:https://blog.csdn.net/pan_tian/article/details/7699599/

  • 相关阅读:
    spring事务详解(一)初探讨
    spring事务详解(二)实例
    mysql删除重复数据只保留一条
    jdk1.8源码Synchronized及其实现原理
    jdk1.8源码Thread与Runnable区别
    动态创建类并添加属性赋值
    c# 当代热门技术
    c# 开源框架
    极限并发带来的思考(12306 抢票)
    ASP.NET Core 使用外部登陆提供程序登陆的流程,以及身份认证的流程 (Challenge)
  • 原文地址:https://www.cnblogs.com/jyj666/p/14618529.html
Copyright © 2011-2022 走看看