ODBC Driver 17 unable to establish connection to MSSQL 2008 R2 - sql-server-2008

I'm having an issue concerning my Debian 9 server on Apache2, php7.3, ODBC Driver 17, sqlsrv (7.3).
I can't connect it to my Microsoft SQL Server 2008 R2 running on a Windows Server 2003 R2.
I tried using
isql -v -k "DRIVER={ODBC Driver 17 For SQL Server};Server=SRV-WINDOS\MSSQLSERVER2008;UID=MyUser;PWD=MyPWD;Database=DB
on the Debian Server.
Outputs:
[08001][unixODBC][Microsoft][ODBC Driver 17 for SQL Server]TCP Provider: Error code 0x2746
[08001][unixODBC][Microsoft][ODBC Driver 17 for SQL Server]Client unable to establish connection
[ISQL]ERROR: Could not SQLConnect
The SQL server seems correctly set-up as I can connect to it with the same Symfony project on my local machine (Windows 10 running Wamp - apache2, php7.2.18, symfony4, doctrine and the sqlsrv extensions).
I also tried using the ODBC Driver 13 but I'm having issues with it,
[01000][unixODBC][Driver Manager]Can't open lib '/opt/microsoft/msodbcsql/lib64/libmsodbcsql-13.1.so.9.2' : file not found
since it seems like ODBC Driver 13 and lower are not supported on Debian 9`)
ODBC Driver 17 should enable me to establish a connection to my MSSQLSERVER 2008 R2 right ?
N.B: The Debian 9 server can indeed ping and resolves the domain of the MSSQLSERVER 2008 so it's not a networking issue.

Related

SQL Server Login works with DSN for ODBC driver 11 for SQL Server but unable to connect through connection string (Classic ASP Application)

We have a Classic ASP application hosted on server Win 2008 R2, Database - SQL server 2008 R2. The application was working fine until we disabled TLS 1.0 and enabled TLS 1.2 in app server. TLS 1.2 is enabled on Database server. We have installed SSMS on app server and are able to connect to DB. Created a system DSN and tested using ODBC drivers which is only successful when tried "ODBC driver 11 for SQL Server" driver. Performed UDL test in app server and the test connection failed while using both DSN and connection string with errors "Invalid Connection String Attribute" and "Data source name not found and no default driver specified" respectively. Instead of OLEDB we have tried SQLNCLI10 which also didn't work.
Tried all the drivers and the respective connection-strings, though able to establish connection using "ODBC driver 11 for SQL Server". Hence also tried the connection strings
SQL Server Native Client
Driver={SQL Server Native Client 11.0};Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;
SQL Server for ODBC
DRIVER={ODBC Driver 11 for SQL Server};SERVER=test;DATABASE=test;UID=user;PWD=password
DSN
DSN=myDsn;Uid=myUsername;Pwd=;
But unable to establish connection to database. Please suggest.
This works for my SQL Server 2008 R2 classic ASP application.
Driver={SQL Server};Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;

Unit Test Project and MySql Odbc Driver (Visual Studio Community 2013)

I created Unit Test Project in Visual Studio Community 2013.
I connect to MySql Database via MySQL ODBC 5.1 Driver.
When I run Unit Test Project as Console Application (exe), I connect to db succesufuly.
But when I run Unit Test from Visual Studio, error occured.
System.Data.Odbc.OdbcException: ERROR [IM002] [Microsoft] [ ... ODBC ] 'National language message'
I installed mysql-for-visualstudio-1.2.3.msi from Oracle, I connect to MySql from VisualStudio-ServerExplorer- DataConnection - MySql succesfully.
I try build Test Project as 32-bit,64-bit, but Test from Vs doesn`t work.
Self answering :-):
I have installed only 64-bit ODBC driver (see at c:\Program Files\MySQL\Connector ODBC 5.1). When I installed 32-bit ODBC driver (see at ODBC driver c:\Program Files (x86)\MySQL\Connector ODBC 5.1), UnitTestProject connect to MySql successfully.

microsoft odbc driver manager data source name not found and no default driver specified

I am trying to run a Classic ASP application on Windows 8.1. It keeps on failing with error: data source name not found and no default driver specified
I am using an Access database. I have the same problem using a MySQL database. I tried with both 32 bit and 64 bit MySQL drivers -- first installing one then uninstalling and then installing the other.
driver={MySQL ODBC 5.3 Driver};option=3;server=localhost;user=root;password=;DATABASE=test;
I'm using these MySQL ODBC drivers:
mysql connector 5.3.4 - win32
mysql connector odbc 5.3.2 - winx64
Access can't be accessed through the MySQL drivers (they're for MySQL not Ms Access), what you need is the Microsoft OLEDB database connections.
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\myFolder\myAccessFile.accdb;
Jet OLEDB:Database Password=MyDbPassword;
Source; https://www.connectionstrings.com/access/
Also for MySQL, if you're running a 32bit MySQL server on a 64bit machine the standard ODBC management tool won't work since it's the 64bit version by default.
You'd need to install in on the 32bit ODBC manager here c:\Windows\SysWOW64\odbcad32.exe
Once that's done you'd need the following connection string to work with a 32bit DB on a 64bit machine. Provider=MSDASQL;Driver={MySQL ODBC 5.2 ANSI Driver};Server=localhost;
Database=myDataBase;User=myUsername;Password=myPassword;Option=3;
Source; https://www.connectionstrings.com/mysql-connector-odbc-5-2/

Linking MySQL server on Sql Server 2008

In our application I have to transfer data from between a MySql Server deployed on Linux machine and a SQL Server deployed on a Windows machine, its both the ways.
We plan to do it by creating MySql as a linked server on SQL Server. I have created a DSN pointing to the Linux Server and it shows "Connection Successfull" when I "test" it.
I get the following error when I try to add the same MySql server as a linked server
Cannot initialize the data source object of OLE DB provider "MSDASQL" for linked server "MYSQLDNS".
OLE DB provider "MSDASQL" for linked server "MYSQLDNS" returned message "[MySQL][ODBC 5.1 Driver]Lost connection to MySQL server at 'waiting for initial communication packet', system error: 10060". (Microsoft SQL Server, Error: 7303)
The DSN I am using is a System DSN. I have tried with a User DSN too.
I can connect to the mysql instance using a MySQL Workbench. I can telnet into it too.
Our MySQL is installed on a 64 bit linux machine and the SQL Server is a 32 bit windows machine.
I was getting this error too - 64 bit ODBC version 8 driver from MySQL, using 64 bit Windows and 64 bit SQL Server. For me it was the Connection Timeout property on the linked server in SQL Server

visual studio 2010 odbc driver mysql, failed to call ODBC driver connection utility

n win7 64bits, I have Visual Studio 2010 SP1
MySql connector net 6.5.6
MySql connector odbc 5.2.5 winx64
On Localhost I have the MySql database and can connect with MySqlWorkbench.
I have made a user-DSN and a system-DSN on the MySQL database.
In VS2010 I try to make a server Explorer- Data Connection with Micorsoft ODBC Data Source (ODBC) and select the system-data-source name and click OK.
Then I get the message 'Failed to call the ODBC driver connection utility'.
I have tried connector net 6.7.4, but than on a click the window 'add connection' disappears. Connector odbc 5.1.12 does not fix the problem.
In VS2005 on winXP with MySQL odbc 3.51 I can make a connection.
Is there something I miss for VS2010 ?
Deperate looking for a solution, after 2 days of trying :-(
Regards