12c开始,对于pdb一般都是需要tnsname登录了,在这里记录一下主要的3个网络文件配置。
listener.ora
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# listener.ora Network Configuration File: /u01/ora12c/app/oracle/product/12.1.0/db_1/network/admin/listener.ora # Generated by Oracle configuration tools. SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (GLOBAL_DBNAME = ora12c) (ORACLE_HOME = /u01/ora12c/app/oracle/product/12.1.0/db_1) (SID_NAME = ora12c) ) (SID_DESC = (GLOBAL_DBNAME = pdb1) (ORACLE_HOME = /u01/ora12c/app/oracle/product/12.1.0/db_1) (SID_NAME = ora12c) ) ) LISTENER = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.132)(PORT = 1522)) ) ADR_BASE_LISTENER = /u01/ora12c/app/oracle |
tnsnames.ora
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# tnsnames.ora Network Configuration File: /u01/ora12c/app/oracle/product/12.1.0/db_1/network/admin/tnsnames.ora # Generated by Oracle configuration tools. ORA12C = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.132)(PORT = 1522)) ) (CONNECT_DATA = (SERVICE_NAME = ora12c) ) ) PDB1 = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.132)(PORT = 1522)) ) (CONNECT_DATA = (SERVICE_NAME = pdb1) ) ) |
sqlnet.ora
1 2 3 4 5 6 |
# sqlnet.ora Network Configuration File: /u01/ora12c/app/oracle/product/12.1.0/db_1/network/admin/sqlnet.ora # Generated by Oracle configuration tools. NAMES.DIRECTORY_PATH= (TNSNAMES, HOSTNAME) ADR_BASE = /u01/ora12c/app/oracle |