Java development connection Oracle 12c using PDB encountered problems record

Today, I used java to connect to Oracle 12c for the first time. I encountered various problems. In order to facilitate subsequent inquiries, the problem records and solutions are summarized as follows.

ORA-28040: No matching authentication protocol

Need to be in...\product\12.1.0\dbhome_1\NETWORK\ADMIN\sqlnet.ora

add to file

SQLNET.ALLOWED_LOGON_VERSION=8

 

ORA-12505: TNS:listener does not currently know of SID given in connect descriptor

The SID should be an existing id. When java connects to Oracle 12c, it cannot recognize the SID in the incorrect format, and it should be handled as the following problem.

 

ORA-01017: invalid username/password; logon denied

In pdb mode, the connection string should be in this format

jdbc:oracle:thin:@localhost:1521/pdborcl

Similar to the colon behind, or adding // before locahost, it cannot be used normally.

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326779985&siteId=291194637