jdbc连接字符串引发问题:
l jdbc连接cdb数据库时,url兼容2种模式:
ü "jdbc:oracle:thin:@192.168.75.131:1521:oracle12c"
ü "jdbc:oracle:thin:@192.168.75.131:1521/oracle12c"
l jdbc连接pdb数据库时url必须使用:" jdbc:oracle:thin:@192.168.75.131:1521/oracle12c"格式,若使用传统格式" jdbc:oracle:thin:@192.168.75.131:1521:oracle12c"则会报一下错误:
java.sql.SQLException: Listenerrefused the connection with the following error:
ORA-12505, TNS:listener does notcurrently know of SID given in connect descriptor
参考:https://www.cnblogs.com/pcbaby-ch/p/jdbc-connect-oracle12c-pdb-cdb.html