Today, when the project starts to access a database, it appears
ORA-12505, Tns:listener does not currently know of SID given in Connect Desc.
Look back, my database is configured as:
Driverclassname=oracle.jdbc.driver.oracledriver
url=jdbc:oracle:thin:@158.58.88.102:1521:ESKDB
Username=root
password=aaa111
And then we looked at Oracle's Tnsnames.ora configuration.
eskdb= (DESCRIPTION = (Address_list = (ADDRESS = (PROTOCOL = TCP) (HOST = 158.58.88.102) (PORT = 1521))) (Connect_data = (servic E_name = eskdb)))
According to the truth on the Internet,1, the last ORCL is the database name, my database name is ESKDB, but not
2, the last ORCL is service_name but the configuration of service_name is also eskdb
Finally tangled silent, looking for database DBA help, DBA to help find SID forESKDB1, and the exception hint SID is incorrect, so change the URL to
url=jdbc:oracle:thin:@158.58.88.102:1521:ESKDB1
then restart the project, OK.
Concludes that the last ORCL for database URL connections represents the configured database SID, not the database name or service_name
About Oracle URL connection the last ORCL understanding