tnsnames.ora有这么几种配置方式:
1、以实例名SID连接
172.18.1.119=
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=172.18.1.119)(PORT=1521))
(CONNECT_DATA=
(SID=orcl)
)
)
172.18.1.192=
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=172.18.1.192)(PORT=1521))
(CONNECT_DATA=
(SERVICE_NAME=orcl)
(INSTANCE_NAME=shycorcl)
)
)
2、以服务名连接:
172.18.1.102_oraecology_OAQ2 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.18.1.102)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = oraecology)
)
3、以服务名和实例名连接
172.18.1.133_ZB_UAT=
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=172.18.1.133)(PORT=1528))
(CONNECT_DATA=
(SERVICE_NAME=EBSUAT)
(INSTANCE_NAME=EBSUAT)
)
)
文章评论