2013年(13)
分类: Oracle
2013-08-07 22:12:06
要访问PDB,必须配置Oracle网络客户端,客户端可以直接连接创建的PDB。在创建PDB时,Oracle会创建一个与之对应的服务。通常,PDB的名字就是服务名。明白了这一点,我们既可以按照以前配置客户端的方法,配置PDB客户端。
[oracle@rac1 admin]$ cat tnsnames.ora
# tnsnames.ora Network Configuration File: /taryartar/12c/db_base/db_home/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
TCDB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac1.taryartar.com)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = tcdb)
)
)
PDB1 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.51)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = pdb1)
)
)
TAR =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac1.taryartar.com)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = tar.taryartar.com)
)
)