ORA-28040: No matching authentication protocol : Oracle 12c Upgrade - oracle11g

We have migrated our Oracle database to 12c from 11g.
We have a legacy application running in Java 1.5 and using ojdbc14.jar.
Our application is not able to create connection to database error saying :
java.sql.SQLException: ORA-28040: No matching authentication protocol
I reffered to answer ORA-28040: No matching authentication protocol exception, and tried to upgrade my ojdbc14.jar to ojdbc6.jar.
I now have a different error message saying :
error: OracleCallableStatement is not public in oracle.jdbc.driver; cannot be accessed from outside package
import oracle.jdbc.driver.OracleCallableStatement;
^
error: OracleTypes is not public in oracle.jdbc.driver; cannot be accessed from outside package
cstmt.registerOutParameter(3,oracle.jdbc.driver.OracleTypes.CURSOR);
^
Ant build file :
<javac srcdir="${src}" destdir="${classes}" source="1.5" target="1.5">
<classpath refid="cpath" />
</javac>
Not sure what exactly we should do to get the application working.

I had the same error with 2 different applications recently:
a Java 7 app on Tomcat 7 using odbc6.jar with Oracle 12 c database.
a legacy ASP application with Oracle 12 c database.
The second solution mentioned in the
same post you referred to - worked well for us.
Workaround: Set SQLNET.ALLOWED_LOGON_VERSION=8 in the oracle/network/admin/sqlnet.ora file.
We worked with our DBAs to set the above option on the sqlnet.ora on the database server. This resolved our issue. I hope it helps someone.

I faced the same error.
Got it resolved by without removing ojdbc14.jar.
step 1 : set SQLNET.ALLOWED_LOGON_VERSION=8
Step 2 : change
Connection conn = (Connection) DriverManager.getConnection("jdbc:oracle:thin:#server:port:sid", "username", "passwrd");
to
java.sql.Connection conn = DriverManager.getConnection("jdbc:oracle:thin:##server:port:sid", "username", "passwrd");
It will works!

After migrating from Oracle 11 to Oracle 12.
In my case lib directory had both OJDBC14.jar & OJDBC8.jar.
After removing older OJDBC14.jar it worked for me.

I had a problem connecting to DB after migration to ORACLE 12c.
The error was:java.sql.SQLException: ORA-28040: No matching authentication protocol.
After setting this parametar SQLNET.ALLOWED_LOGON_VERSION=8 it was solved.
Thank you very much

If you are migrating your application to ojdbc6, one probable reason would be your old classes (compatible to old ojdbc version) might not be getting the class OracleTypes. Easiest way would be changing import statement from import oracle.jdbc.driver.OracleTypes; to import oracle.jdbc.OracleTypes; from the classes where you are getting the error.

I was getting ORA-28040 in Sqldeveloper (ver. 1.5.5) for all connections. I set SQLNET.ALLOWED_LOGON_VERSION=8 but the error didn't go away. Then I enabled "Use OCI/Thick driver" under Tools->Preferences->Database->Advanced Parameters. That did the trick.

The main problem is that the JDBC thin client of the 10g uses the
SHA-1 authentication protocol, this protocol is not allowed in the
12c, so it gives the error.
In my Oracle I could not find the sqlnet.ora file so I had to create it with the command:
vi $ORACLE_HOME/network/admin/sqlnet.ora
And I added the following:
SQLNET.ALLOWED_LOGON_VERSION=10
SQLNET.ALLOWED_LOGON_VERSION_CLIENT=10
SQLNET.ALLOWED_LOGON_VERSION_SERVER=10
SQLNET.ALLOWED_LOGON_VERSION=8
SQLNET.ALLOWED_LOGON_VERSION_CLIENT=8
SQLNET.ALLOWED_LOGON_VERSION_SERVER=8
SQLNET.AUTHENTICATION_SERVICES = (NONE)
So I had to stop and start the listener:
lsnrctl stop
lsnrctl start
Finally, I restart the database.
This should only be a workaround

We had this error when we moved from 11g to 12c, I am able to get correct response through tnsping "servername" (this is the first step that we need to check through cmd).
After this we realize that database server is enable to handle only 64bit request (In my case I was using WinSQL and it always check for 32bit).
So to correct this, ask your admin to eanble server for 32 bit request as well or you can move to SQL developer which work for me.

Related

The server has not found anything matching the requested URI - SSMS

I'm trying to connect to an Azure db using pyodbc and keep getting this error.
My connection string:
"Driver=ODBC Driver 17 for SQL Server;Server=company.database.windows.net;Authentication=ActiveDirectoryPassword;Database=My_Database;UID=DOMAIN\UserName;PWD=********;"
Each time I connect it returns error The server has not found anything matching the requested URI
The strange thing is that when I try to connect with these credentials from inside SSMS, the error I get is Windows logins are not supported in this version of SQL Server.
All the other questions with this error are on web apps and html pages, so I'm very stuck.
I figured it out.
The problem was that I was using UID=DOMAIN\UserName;. When I switched it to UID=username#domain.com; the connection worked.
Hope this helps someone else with the same problem - there are not many resources on this error.

Having trouble connecting to iSeries from .NET Core

Cross-posting with this on the IBM forums: https://www.ibm.com/mysupport/s/forumsquestion?id=0D50z00006egDnsCAE. Follow-up question located here: Having trouble connecting to iSeries from .NET Core
Hi all,
I'm very new to this whole thing, so let me know if there's any info which would help, that I'm not providing.
At the moment I'm just trying to get the very basics working - getting the connection to open. I have a stripped-down .NET Core project, which is simply exposing a button I can press that opens a connection for DB2. My code is as follows:
using IBM.Data.DB2.Core;
...
DB2Connection DB2Connection = new DB2Connection(connectionString);
DB2Connection.SystemNaming = true;
DB2Connection.Open();
My connection string is as follows:
"Server=###.###.###.###;Database=AAAA;UID=BBBB;PWD=CCCC;LibraryList=DDDD,EEEE;"
I'm getting the following exception:
IBM.Data.DB2.Core.DB2Exception (0x80004005): ERROR [08001] [IBM] SQL30081N A communication error has been detected. Communication protocol being used: "TCP/IP". Communication API being used: "SOCKETS". Location where the error was detected: "###.###.###.###". Communication function detecting the error: "connect". Protocol specific error code(s): "10061", "*", "*". SQLSTATE=08001
I really don't know how to proceed from here. For context - I'm using "IBM Navigator for i" to query the info directly, and that works just fine for the IP, User ID, and Password I used above.
I've done some reading up, and attempted a few different solutions, but none really helped. I did see that in "Integrating DB2 Universal Universal Database for iSeries with for iSeries with Microsoft ADO .NET", it suggested looking in the Work Management section of the navigator, and check under Server Jobs to see whether there was any added info - however, it does not appear there is anything there to see.
I do understand that I may require a license for this connection to work properly, and accept that if that ends up being the problem, I'll need to get the license - but I don't think I've reached that stage yet. For now I just want to make sure the connection itself works properly.
Any help or insights are greatly appreciated. Thank you.
The symptom SQL30081N with 10061 was resolved by including the PORT=xxx; in the connection string, where xxx is the correct TCP/IP port number on which the Db2-for-i-series is listening for connections.

Mongodb - no suitable server

I deployed a new cosmosDB with mongo and I have an appservice also in the azure. The appservice is a simple php application which connect to a collection (which is in cosmosDB). It works perfect except a connection problem. Cosmosdb throws sometimes this: No suitable servers found (serverSelectionTryOnce set): [connection closed calling ismaster on 'http://apidb.documents.azure.com:10250 '].
What could be the problem? Need to increase RU or need to change consistance settings?
PHP: 7.0.18, mongodb driver: 1.2.8, libmongoc version: 1.5.5 (as I read this problem should be fixed in 1.2.0 mongodb driver version)
Thanks in advance!
UPDATE:
If I remove repliceSet option from the connection string (azure said this option is recommanded), throws this error much less.
Can you try setting serverSelectionTryOnce = false as per http://php.net/manual/en/mongodb-driver-manager.construct.php and retrying your use case. As per your current setup, a single failure in isMaster request will cause the application to fail with the above mentioned error.
If you are still hitting the same error, please send the exact error message (and preferably the MongoLog http://php.net/manual/en/class.mongolog.php) to askcosmosmongoapi [at] microsoft [dot] com

how would I resolve this error: Unable to contact the RDS server "data services on Tomcat (localhost) connection refused: connect

I'm making a program in flash builder 4.5 using WebOrb 4 (which is fantastic, I might add). When I go to deploy, however, it gives me this error:
>There was an error during model deployment for xxxxProgram.
>
>The server returned the following message:
>
>Unable to contact the RDS Server "Data Services on Tomcat (localhost)."
>
>Connection refused: connect
>
>Do you want to continue launching your Flex application?
I've poked around online for a solution, but for the most part I either don't understand them (forum grammar can be somewhat obtuse) or the answer in the post doesn't apply.
Any ideas?
the message that you received was thrown by the flash builder and the following part is quite confused:
"Unable to contact the RDS Server "Data Services on Tomcat
(localhost).""
Most likely, the root of the problem is the incorrect server address in your configuration. The WebORB RDS servlet (you are using WebORB for Java, aren't you?) is mapped to the /rds.wo url, so first of all I would recommend to check if the RDS servlet is up. If so, you should verify is your URL from project settings matched to you actual url where WebORB is running .
Additionally, please have a look on the WebORB plugin documentation step by step just to verify if everything is OK. The documentation is available here
Finally, if you will find nothing, please let me know the version of WebORB that you are using.

What connection string do I use for Classic ASP and Oracle 10g?

I have Oracle 10g and have installed ODBC via the instant client. I am able to use the ODBC administrator and set up a DSN and test successfully, and whenever I use Microsoft Access I can connect to my database no problem. I can also use Visual Web Developer to traverse the data.
But, when I try and use Classic ASP with:
myConn.Open "DSN=oracle10g;" & _
"Uid=myOracleUsername;" & "Pwd=myOraclePassword"
I get:
-2147467259Specified driver could not be loaded due to system error 5 (Oracle in instantclient10_2).
An error occurred while trying to create Server Object.
I have searched various places but nothing seems to work. All ORACLE_HOME, TNSnames, IUSR_X security, all is correct. I am thinking it is a DSN connection string problem.
Anyone know?
Try using the following DSN-less connection string:
myConn.Open "Provider=MSDAORA;Data Source=instance_name;User ID=myOracleUsername;Password=myOraclePassword"
I've used this exact connection string for older version of Oracle client, but can't see any reason why it won't work for your version as well.
try this :
provider=OraOLEDB.Oracle

Resources