[ORACLE]ORACLE19 client 安装
1. 安装oracle client:
注意oracle 的安装目录中不能包含空格
https://download.oracle.com/otn_software/nt/instantclient/19600/instantclient-basic-windows.x64-19.6.0.0.0dbru.zip
2.在Oracle client 安装目录 建立network\admin,并将ORACLE服务器上tnsnames.ora 和sqlnet.ora 的文件放入此文件夹
tnsnames.ora 内容如下所示:
D4CDB = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = d4cdb.doufupi.com)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = D4CDB.doufupi.com) ) )
sqlnet.ora内容如下所示:
SQLNET.AUTHENTICATION_SERVICES= (NTS)#注意:如果Oracle安装在linux 系统上,此参数不要在linux系统上设置.否则无法连接 NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
oracle client 语言设定
SQL> select userenv('language') nls_lang from dual; NLS_LANG ---------------------------------------------------- AMERICAN_AMERICA.AL32UTF8
设定plsqldev OCI 环境变量
将以下内建立为plsqldev.bat 文件后,直接运行,plsqldev11.
@echo on set path=D:\oracle\instantclient_19_6 set ORACLE_HOME=D:\oracle\instantclient_19_6 set TNS_ADMIN=D:\oracle\instantclient_19_6\network\admin set NLS_LANG=AMERICAN_AMERICA.AL32UTF8 start D:\oracle\instantclient_19_6\plsqldev11_64.exe set @pause @echo off
设定win10 系统环境变量如下
ORACLE_HOME:D:\oracle\instantclient_19_6
NLS_LANG: AMERICAN_AMERICA.AL32UTF8
TNS_ADMIN: D:\oracle\instantclient_19_6\network\admin
(增加)path: D:\oracle\instantclient_19_6
问题:
ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA
每天进步一点点,多思考,多总结
版权声明:本文为CNblog博主「zaituzhong」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。