instant client 的配置
oracle server developer自带了客户端
解压目录:D:Toolkitinstantclient_11_2
设置环境变量
Ø 在Path变量中加入:D:Toolkitinstantclient_11_2
Ø NLS_LANG=SIMPLIFIED CHINESE_CHINA.ZHS16GBK
Ø ORACLE_HOME=D:Toolkitinstantclient_11_2
可以省略变量:
Ø TNS_ADMIN=D:Toolkitinstantclient_11_2
n 默认目录为%ORACLE_HOME% etworkadmin
SQL_PATH=D:Toolkitinstantclient_11_2
LD_LIBRARY_PATH=D:Toolkitinstantclient_11_2
tnsnames.ora与sqlnet.ora
一般不需要,但个别软件会认这些文件,碰到了再添加这些文件不迟。
tnsnames.ora示例
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = Oracle)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
sqlnet.ora示例
# 这是安装客户端验证配置,在即时客户端上会报“ORA-12638: 身份证明检索失败的解决方法”错误。
#SQLNET.AUTHENTICATION_SERVICES= (NTS)
# 即时客户端的验证配置:
SQLNET.AUTHENTICATION_SERVICES= (NONE)
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)