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

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.

Related

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.

Sybase Authentication Violation

I've been running into this error for the past 2 weeks on my Classic ASP application when connecting to sybase.
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Sybase][ODBC Driver][Adaptive Server Anywhere]Unable to connect to database server: Authentication violation
I only get this error when I am attempting to insert records into the sybase database. The strange thing is that I get this error once every while; very inconsistent. I looked over the internet for a while and the only step I found was to authenticate the connection via the connection signature option:
SET TEMPORARY OPTION connection_authentication='company = company-name;
application=application-name;
signature=application-signature';
I changed the values as needed and I still receive the authentication violation error. I am certain it has to do with authorization because my application can read values from the sybase database without any errors, because unauthorized connections are in read only mode. I dont understand how my application can bypass the authorization frequently when writing records but will randomly stumble and get me this error. Am I missing anything? Are there other ways to authorize the connection?

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

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.

Timeout expired error in ASP.NET but not on SQL Server Studio

In my ASP.NET application, I am getting the following error:
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
But I can successfully connect to the database server using 'SQL Server Mangement Studio' and I can also correctly PING the host where SQL Server is hosted.
What can be wrong here.
Check your connection string in web.config. The connection string you are using via SQL Management Studio is different to the one in the web.config.
You can increase timeout in web.config too which is better or say best approach.
Also whenever you get this type of error and everything is good in confirable, then first debug the code,
if the issue code side, then you manage simply by changing logic.
If it is sqlserver side, then get the parameter value and sp or query. Run in to SSMS which gives you better idea.
Increasing Command timeout to 120 fixed my problem for me.
adapter.SelectCommandCommandTimeout=120;

Error while running ASP site

I have set Data Source(ODBC) for running ASP Site in my local Computer selected Microsoft Access Driver.
Now I can run the whole site with out error.But If i apply leave then it will show an error.
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] Operation must use an
updateable query. /eleave/leaveApplicationOut.asp, line 39
Updation
After giving the Write permission following error is showing
Error Type:
jmail.Message (0x8000FFFF) The message was undeliverable. All servers
failed to receive the message /eleave/leaveApplicationOut.asp, line 80
Thank you very much for your support.
It is solved..
4 possible causes are highlighted here: http://support.microsoft.com/kb/175168
I am guessing it's #1:
The most common reason is that the Internet Guest account (IUSR_MACHINE), which is by default part of the "Everyone" group, does not have Write permissions on the database file (.mdb). To fix this problem, use the Security tab in Explorer to adjust the properties for this file so that the Internet Guest account has the correct permissions.
First error (which seems like you solved) has to do with write permissions on the database..
The updated question ,though, seem to be completely unrelated..
You seem to be trying to send an email, right ? and it says it failed..
Perhaps the SMTP service is not running and so it cannot send the email ? could it be a wrong IP address defined somewhere ? wrong credentials for the email accounts ? (read http://host.cdesystems.com/faq/jmail_faq.asp for possible problem)
give some code about the configuration you do to the jmail ..

Resources