plsql developer连接oracle的配置文件(tnsnames、listener、sqlnet)

tech2025-01-15  6

1.ORACLE_HOME路径:

F:\myWorkSoft\PLSQL1306\instantclient_11_2

2.path变量中也把上边的路径配好 3.配置字符集

AMERICAN_AMERICA.ZHS16GBK

4.plsql配置 5.在instantclient_11_2目录下新建文件夹 \NETWORK\ADMIN tnsnames.ora

# tnsnames.ora Network Configuration File: F:\myWorkSoft\PLSQL1306\instantclient_11_2\tnsnames.ora # Generated by Oracle configuration tools. ORACLR_CONNECTION_DATA = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521)) ) (CONNECT_DATA = (SID = CLRExtProc) (PRESENTATION = RO) ) ) ORCL = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = ORCL) ) ) # 配置多个数据库连接,就是复制这一段,添加新的ip、端口、实例名就行了 15_ORCL = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.100.15)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = ORCL) ) )

配置好多个数据库连接的效果如图

6.把tnsnames.ora复制到\NETWORK\ADMIN目录下。 至此,打开plsql developer,可以看到database 和 connect as

-------------------------------end--------------------------------- 以下两个配置作为备份。。

**listener.ora** ```bash # listener.ora Network Configuration File: F:\myWorkSoft\PLSQL1306\instantclient_11_2\listener.ora # Generated by Oracle configuration tools. SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (SID_NAME = CLRExtProc) (ORACLE_HOME = F:\myWorkSoft\PLSQL1306\instantclient_11_2) (PROGRAM = extproc) (ENVS = "EXTPROC_DLLS=ONLY:F:\myWorkSoft\PLSQL1306\instantclient_11_2\bin\oraclr11.dll") ) (SID_DESC = (GLOBAL_DBNAME = orcl) (ORACLE_HOME = F:\myWorkSoft\PLSQL1306\instantclient_11_2) (SID_NAME = orcl) ) ) LISTENER = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = PC201508131439)(PORT = 1521)) ) ADR_BASE_LISTENER = E:\app\Administrator

sqlnet.ora

# sqlnet.ora Network Configuration File: F:\myWorkSoft\PLSQL1306\instantclient_11_2\sqlnet.ora # Generated by Oracle configuration tools. SQLNET.AUTHENTICATION_SERVICES= (NTS) NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT) ADR_BASE = E:\app\Administrator
最新回复(0)