What does the last orcl of the Oracle database url connection represent
This article mainly introduces what the last orcl of Oracle database url connection represents. The article is very detailed and has certain reference value. Interested friends must read it!
During project startup access to a database on production, a
ORA-12505, TNS:listener does not currently know of SID given in connect desc .
Looking back, my database configuration is:
driverClassName=oracle.jdbc.driver.OracleDriverurl=jdbc:oracle:thin:@158.58.88.102:1521:eskdbusername=rootpassword=aaa111
Then I looked at Oracle's tnsnames.ora configuration.
eskdb=(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = 158.58.88.102)(PORT = 1521)))(CONNECT_DATA =(SERVICE_NAME = eskdb)))
According to the online reasoning:
1, the last orcl is the database name, my database name is eskdb, but not right
2. The last orcl is service_name, but the configured SERVICE_NAME is also eskdb
Finally, I was speechless. I asked the database DBA for help. The DBA helped me find SID eskdb1, and the exception prompt SID was incorrect, so I changed url to
url=jdbc:oracle:thin:@158.58.88.102:1521:eskdb1
Then restart the project, OK.
Conclude:
The last orcl of a database url connection represents the configured database SID, not the database name or SERVICE_NAME
The above is "Oracle database url connection last orcl represents what" all the content of this article, thank you for reading! Hope to share the content to help everyone, more relevant knowledge, welcome to pay attention to the industry information channel!