jdbc连接ORACLE数据库时出现如题错误的一种可能:
//oracle连接标识
String url = "jdbc:oracle:thin:@192.168.0.200:1521:orcl";
必须与
文件:oracle\product\10.2.0\db_1\network\admin\tnsnames.ora中:
RHORCL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.200)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = orcl)
)
)
对应:@后面接相对应的HOST,PORT,SERVICE_NAME的值
时间: 2024-10-30 09:45:06