SQLAlchemy-1.4.21 SQL Server pyodbc connection error - sql-server

When connecting to a SQL Server DB using the latest SQLAlchemy release I get the following error "sqlalchemy.exc.InterfaceError: (pyodbc.InterfaceError) ('IM002', '[IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified (0) (SQLDriverConnect)')
(Background on this error at: https://sqlalche.me/e/14/rvf5)", using a previous version - works fine.
Code:
engine =
sqlalchemy.create_engine("mssql+pyodbc://#{server}/{database}?driver=SQL+Server+Native+Client+11.0?trusted_connection=yes")
In version 'SQLAlchemy-1.3.22' this works fine.
But in version 'SQLAlchemy-1.4.21', I get a horribly long error.
Has anybody else come across this, does anyone know the reason and/or fix (other than just using the old release version)?

Related

Alteryx connection to Oracle database

I am trying to connect to oracle database through Alteryx. I keep getting the same error message as below:
connection error im003 specified driver could not be found due to
system error 126: the specified module could not be found. (simba
oracle odbc driver, c:\program files\simba oracle odbc
driver\lib\oracleodbc_sb64.dll)
I tried downloading the Simba Oracle ODBC Driver which contains the oracleodbc_sb64.dll file. However I still get the same error.
any help is appreciated.
Thanks

Microstrategy 10.4 SQL ODBC Connection error

I've tried to connect an SQL database from a server with Microstrategy located in another server through an ODBC connector for SQL.
First I've checked that there is a connection between the two servers executing a ping sentence with the IP Address the other server and it went through.
After making sure the connection is stablished without issues, I've tried to connect through Microstrategy without success. The error I get is the following message:
"Connection test error: Connect failed. Error type Odbc error. Odbc operation attempted: SQLDriverConnect (08001:0: on SQLHANDLE)"
Using SQL Server 2017 for the databases and Microstrategy 10.4.
Please, anybody has any clue about what might be happening?
Thanks,
look at the type of connector to the db you have. It gave me the same error until I used: "with Native Client Driver".
Could you please share the complete error message, SQL Handle error are associated with multiple error scenarios like invalid username * password, connecting 64 bit server with 32 bit ODBC driver etc. Complete error message would help me to debug it.
In general follow the steps to debug the error, (any order)
Check the version of ODBC Connection (64bit / 32 bit), it should be the same as server version.
Try testing the ODBC connection that you have created using ODBC Administrator tools to see whether there is an problem with username & password/server name or database connection issue.
Check the Database Instance/Database Connection/User Login created under the Administration option to ensure everything is working and give the correct value.
if nothing works try using the native driver given by MicroStrategy, you can access this using Connectivity Wizard.
Hope it helps..

Classic ASP cannot connect to SQL database after TLS 1.0 removed from server

I have an IIS web application which connects to a SQL Server like this:
set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open("DRIVER={SQL Server};SERVER=servername;DATABASE=dbname;UID=username;PASSWORD=pwd)
Recently I started getting the following error:
[Microsoft][ODBC SQL Server Driver][DBNETLIB]SSL Security error
When I asked my server admin what this meant, he said that they had recently removed TLS 1.0 from the IIS server my web application is mounted on. He made sure the new SQL ODBC 13 drivers were installed on the web server, but it did not help.
Although the web app has never had a DSN before, we created one for it using the ODBC 13 driver. When I tried connecting like this:
objConn.Open "DSNname"
I got the following error:
[Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application
I looked up ConnectionStrings.com to see if there were a way of specifying a different driver. I tried this:
objConn.Open("DRIVER={SQL Server Native Client 13.0};SERVER=servername;DATABASE=dbname;UID=username;PASSWORD=pwd)
And this is the error message that was produced:
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
Don't know what else to do. Any ideas?
We had to update 3 servers that are running several Classic ASP websites. The main reason was we need to implement Twillio API SMS messaging wich required TLS 1.0 and TLS 1.1 to be disabled/removed.
It took several days and we had the websites go up and down through the process.
I wrote a blog post to document the process for other team members. I hope it helps.
https://dhali.com/programming/tls-1-2-with-classic-asp/
Here are the outlined steps:
https://www.ssllabs.com/ssltest to get the current TLS Configuration
Using IISCrypto Tool we updated the Registry Files on the server
Ran https://www.ssllabs.com/ssltest to prove TLS 1.0 and 1.1 removed
Update ODBC to the latest ver supports TLS 1.2 [Microsoft® ODBC Driver 13.1 for SQL Server]
Update the connection string to use the current ODBC SQL 13 driver
The specified DSN contains an architecture mismatch between the Driver and Application
You can create either a 32bit DSN or a 64bit DSN. You need to create one matching the bitness of your program. Probably 32-bit.

Cant query in Using Laravel 5.2 at MSSQL 2008 R2

I have this error. I searched at google for some possible solution and followed some steps but still I still get this error.
PDOException in Connector.php line 55:
SQLSTATE[08001]: [Microsoft][ODBC Driver 11 for SQL Server]TCP Provider: No connection could be made because the target machine actively refused it.
My .env looks like this
DB_CONNECTION=sqlsrv
DB_HOST=localhost
DB_PORT=1433
DB_DATABASE=database
DB_USERNAME=sa
DB_PASSWORD=1234
when I test my data source (ODBC) I get successful connection. But when I try to query at my program. I have this error. BTW I'm using Laravel 5.2 and MSSQL 2008 R2.
The database in installed locally.

TIBCO JDBC ERROR BW-JDBC-100034

I am trying to connect to my local MS SQL SERVER 2008 R2 using JDBC. I get the following error
BW-JDBC-100034 "Configuration Test Failed. Exception [java.sql.SQLException] occurred.
java.sql.SQLException: No suitable driver found
I have already verified the following
SQLJDBC.jar is in the path TIBCO_HOME\tpcl\5.8\jdbc & TIBCO_HOME\tpcl\5.8\LIB
The classpath tibco.env.STD_CP_EXT is set to the path TIBCO_HOME\JDBC in the designer.tra file.
Still I get the BW-JDBC-100034 error. Kindly advise
Could you please provide the jdbc driver you are using in this JDBC Connection activity? If you are using Microsoft driver you have to use the sqljdbc4.jar as you have already used. If you are using a tibco driver however, you need the TISql.jar which you can obtain by installing the product TIBCO-dbdrivers-2.0 from download.tibco.com.
Happy that you were able to fix the issue.

Resources