确定Oracle URL

前端之家收集整理的这篇文章主要介绍了确定Oracle URL前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

1、查看/u01/app/oracle/product/11.2.0/db_1/network/admin/tnsnames.ora

cat /u01/app/oracle/product/11.2.0/db_1/network/admin/tnsnames.ora

# tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.2.0/db_1/network/admin/tnsnames.ora

# Generated by Oracle configuration tools.


PRODB =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP)(HOST = scan-rhel65.discuz.com)(PORT = 1521))

(CONNECT_DATA =

(SERVER = DEDICATED)

(SERVICE_NAME = prodb.discuz.com)

)

)


2、ORACLE URL 格式

普通SID方式

jdbc:oracle:thin:username/password@x.x.x.1:1521:SID

普通ServerName方式

jdbc:Oracle:thin:username/password@//x.x.x.1:1522/ABCD

RAC方式

jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=x.x.x.1)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=x.x.x.2)(PORT=1521)))(LOAD_BALANCE=yes)(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=xxrac)))

原文链接:https://www.f2er.com/oracle/208218.html

猜你在找的Oracle相关文章