Jdbc connection string for Oracle pluggable Databases
When I deploy a database of a third-party system on the server, the server database version is Oracle 12c. I created an instance. Access is normal.
Later, the project owner told me that Oracle 12C supports the so-called pluggable database. Pluggable? What is this? I immediately searched for it on the Internet. I found it and actually drew the database into a USB flash drive. Wow! It's really pluggable! Tall! I'm optimistic about you.
But isn't the so-called pluggable database instance hanging under one database instance? SQL SERVER seems to have existed for a long time, but it never saw it boast of plug-and-plug. Isn't Oracle the leader in relational databases?
The owner said that multiple instances are too resource-consuming and need to be pluggable. Therefore, the database is exported from the instance I created to an instance (ORACLE should call this instance a container database ...)
As a result, the system that was normally accessible failed.
I changed the configuration file of the system and finally found that it was a jdbc connection string problem.
If the traditional style is used and the database is deployed in the instance, the connection string should be written as follows:
Jdbc: oracle: thin: @ 192.168.0.1: 1521: SSO
(Assume the Instance name is SSO)
If it is a pluggable database named PDBSSO, the connection string should be purple:
Jdbc: oracle: thin: @ 192.168.0.1: 1521/SSO
Pluggable, pluggable, and unplugged.
In addition, if the configuration file in tomcat contains Chinese characters, it is best to remove it. Otherwise, an error is reported.