[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

 

posted on 2020-04-10 22:21  InnoLeo  阅读(15502)  评论(0编辑  收藏  举报