Io exception: Oracle Error ORA-12650 in Oracle Cloud

送分小仙女□ 提交于 2019-12-02 06:54:04

问题


I have been using Oracle cloud PAAS linux server for my DB machine (Oracle 11g) and having linux application server where i can run all my Java applications.

Assume i have spring based web application which can connect cloud DB machine. I have tried to access the schema in Toad for oracle, it is working as expected but when i try to hit the DB for retrieving the data from application it gives below error.

java.sql.SQLException: Io exception: Oracle Error ORA-12650
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:255)
    at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:387)
    at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:420)
    at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165)
    at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
    at java.sql.DriverManager.getConnection(DriverManager.java:582)
    at java.sql.DriverManager.getConnection(DriverManager.java:154)
    at GetConnection.main(GetConnection.java:35)

I have also tried to extend the service access from SID to service name in DB machine. Still give same error. Same code works fine in another cloud machine, which was set by us. But this cloud machine was done by oracle team and most of the things are by default.

Please share your suggestion to fix this issue.


回答1:


This issue is because of Oracle DB machine encryption ENCRYPTION_SERVER settings. As i understood which is default and set it to enabled, when we set it to disabled or comment the line then application will work as expected. Below is the file name for reference,

Filename : sqlnet.ora (We have to disable ENCRYPTION_SERVER settings)
File Location : ../oracle/product/11.2.0/dbhome_1/network/admin 

Hope this helps some one.!




回答2:


It did not help me at all. Actually I followed your solution and I ended up having another error more critical and serious than the one trying to solve. Let me explain. First of all the value "disabled" that you mentioned is not even an accepted value for this parameter. According to Oracle (Oracle Docs) these are the accepted values that anyone can use:

SQLNET.ENCRYPTION_SERVER Purpose

To turn encryption on for the database server.

Default

accepted

Values

  • accepted: to enable the security service if required or requested by the other side.

  • rejected: to disable the security service, even if the required by the other side.

  • requested: to enable the security service if the other side allows it.

  • required: to enable the security service and disallow the connection if the other side is not enabled for the security service.

Example

SQLNET.ENCRYPTION_SERVER=accepted

In my case being a 12c Oracle Cloud database the default was set to "required" giving me the error "Io exception: Oracle Error ORA-12650" when trying to start my application. Setting the parameter to "accepted" solved the issue and managed to start my application. In case you still get the error you can also set the following parameter to accepted: SQLNET.CRYPTO_CHECKSUM_SERVER = accepted if you see that in your sqlnet.ora the value is set to "required".

Please have in mind that my application as well as my OCI setup are for testing purposes only and they are not intended to be used in production environment. Setting the value of SQLNET.ENCRYPTION_SERVER and SQLNET.CRYPTO_CHECKSUM_SERVER to "accepted" will significantly lower your Database's security making it vulnerable to any attacks from any application that has access to it. The best case scenario is to modify your application to use the ENCRYPTION as "required".



来源:https://stackoverflow.com/questions/46919402/io-exception-oracle-error-ora-12650-in-oracle-cloud

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!