ODBC Driver 11 for SQL Server not supported - sql-server

I have a windows 10 machine that I need to set an odbc connection to sql server. When adding the new connection in odbc, there is no odbc driver for SQL Server, so I went and downloaded it from Microsoft both versions and and when I try to install it I receive an error of the following:
Microsoft_Error

Related

Unable Connect to SQL Server 2019 using PYODBC

Using PYODBC I am trying to connect to SQL Server 2019 which is not installed locally.
But I am getting below error:
pyodbc.InterfaceError: ('IM002', '[IM002] [Microsoft][ODBC Driver
Manager] Data source name not found and no default driver specified
(0) (SQLDriverConnect)')
My Connection String is:
MSSQL_conn_str = "DRIVER={ODBC Driver 18 for SQL Server};DATABASE=<>;UID=<>;PWD=<>;SERVER=<IP>;"
MS SQL Server Installed in Windows Server 2019. Below ODBC Driver are there:
ODBC Driver 18 for SQL Server, ODBC Driver 17 for SQL Server, SQL Server, SQL Server Native Client 11.0.
Ports are open, telnet responds successfully.
I thought I should do it via DSN. So I tried.
While creating DSN I am getting below error.
Any solution how to solve this ?

ODBC Driver 11 for SQL Server does not support connections to SQL Server 2000 or earlier versions

I'm trying to connect my laravel to SQL Server and it show the error below
SQLSTATE[08001]: [Microsoft][ODBC Driver 11 for SQL Server]ODBC Driver 11 for SQL Server does not support connections to SQL Server 2000 or earlier versions.
I'm using php 7.3 and I already download the dll for 7.3.
How can I solve this?

Connecting to SQL2000 from SSIS

I can't get my SSIS package to connect to a SQL2000 database - I keep getting
SQL Server does not exist or access denied.
I've tried connection strings like the following:
<ConfiguredValue_1>Data Source=xxx;Initial Catalog=xxx;Provider=SQLNCLI10.1;User ID=xxx;Password=xxx;</ConfiguredValue_1>
<ConfiguredValue_2>Data Source=xxx;Initial Catalog=xxx;Provider=SQLOLEDB.1;Integrated Security=SSPI;</ConfiguredValue_2>
<ConfiguredValue>Data Source=xxx;Initial Catalog=xxx;Provider=SQLOLEDB.1;User ID=xxx;Password=xxx;</ConfiguredValue>
Actually, the SQLNCLI10.1 option gives:
The requested OLE DB provider SQLNCLI10.1 is not registered
For the Integrated Security option, I have set up a proxy & credential that the step is using, which is the same as my login.
However, I can connect to the database using Windows Authentication or a SQL username via an SSMS query window. What am I missing?
I will try to give some suggestions:
(1) Download SQL Server 2008 Native client
To download SQL Server Native Client 10 you should download and install the following package which is a part of the SQL Server 2008 feature pack:
Download SQL Server Native Client
Microsoft® SQL Server® 2008 R2 Feature Pack
Also try removing .1 from provider name: SQLNCLI10
(2) Use Microsoft OLE DB Driver for SQL Server
OLE DB Driver for SQL Server is a stand-alone data access application programming interface (API), used for OLE DB, that was introduced in SQL Server 2005 (9.x)
This provider can be used to connect to SQL Server 2000 instance.
Official documentation: Microsoft OLE DB Driver for SQL Server
Download link: Microsoft® OLE DB Driver 18 for SQL Server (i think it can be found in SSIS providers list without the need to download)
Connection string example:
Provider=sqloledb;Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;
(3) Use ODBC connections
Another way to connect to SQL Server 2000 is using ODBC Driver for SQL Server
The Microsoft ODBC Drivers for SQL Server are stand-alone ODBC drivers which provide an application programming interface (API) implementing the standard ODBC interfaces to Microsoft SQL Server.
Official documentation: Microsoft ODBC Driver for SQL Server on Windows
Download page: Download ODBC Driver for SQL Server
Connection string example:
Driver={SQL Server};Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;
(4) Using SQL Native Client 9.0 OLE DB Provider
Try using the version 9.0 of OLEDB provider which works only for SQL Server 7.0, 2000, 2005 version.
Connection string example:
Provider=SQLNCLI;Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;
References
SQL Server 2000 connection strings
Microsoft SQL Server ODBC Driver connection strings

Can I connect with this driver

One of my laptops still has Windows XP and SQL Server ODBC driver version 2008.85.1132.00.
Unfortunately this laptop has a software that I can't put on the machine where I have SQL Server 2012 and it looks like there is no ODBC driver for WinXP anymore for Server 2012.
So, I'm wondering if I can get a connection with that driver to my Server. Or the driver will be incompatible.
Thank you.
All versions of Windows ship with a legacy SQL Server ODBC driver named "SQL Server". That ODBC driver may be used to connect to SQL Server 2012 as well as older and newer versions of SQL Server. However, it may nto fully support the newer SQL Server data types.
According to the SQL Server Native Client Support Policy, the most recent Microsoft-supplied ODBC driver supported under Windows XP SP2 is the SQL Server 2008 R2 Native Client.

Connect to LocalDB with new ODBC Driver for SQL Server

UPDATE: Thanks to Dan Guzman, the problem has been solved.
I'd made a mistake and used the old legacy Driver={SQL Server}; assuming it is the new driver. Instead, I should have used Driver={ODBC Driver 11 for SQL Server} which is the actual new ODBC driver.
I can connect to (Localdb)\v11.0 with the new driver.
TL;TR: Why I can not connect to (Localdb)\v11.0 using the new Driver={SQL Server}; in connection string, but I can connet if I switch the driver to the old Driver={SQL Server Native Client 11.0}; ?
The remaining connection string parameters I use are (if used in C++ code, backslash escaped):
Server=(localdb)\v11.0;Integrated Security=True;
I'm trying to access SQL Server via ODBC and calling SQLDriverConnect with DSN-less connection string. If I switch the driver to SQL Server Native Client 11.0, then I suddenly can connect.
I have also tested generating FILEDSN using %systemdrive%\Windows\System32\odbcad32.exe and I observed exactly the same issue.
The only local database I can connect with the new Driver={SQL Server} is Server=DEVBOX\SQLEXPRESS (if used in C++ code, backslash escaped, of course).
I couldn't find any confirmation that the new ODBC Driver for SQL Server does not support LocalDB.
It is only indicated in the FAQ of ODBC Driver for SQL Server for Linux
Which features of SQL Server 2012 does this version of the driver
support?
The ODBC driver on Linux supports all server features in SQL Server 2012 except LocalDB.
How can I connect to LocalDB with the new ODBC driver on Windows?
UPDATE:
I'm using Windows 10 Pro + VS2015.
I can connect to both, (localdb)\v11.0 and DEVBOX\SQLEXPRESS with SQL Server Management Studio 2016 (CTP).
(The same question has been asked on MSDN Forums, here.)
The ODBC driver SQL Server is the legacy SQL Server ODBC driver that ships with Windows for backwards compatibility. The latest SQL Server ODBC driver is ODBC Driver 11 for SQL Server. I believe this ODBC driver is installed with SQL Server 2016 CTP. The released version is available as a separate download.

Resources