Can I connect with this driver - sql-server

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.

Related

ODBC Driver 11 for SQL Server not supported

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

[ODBC SQL Server driver][DBMSLPCN]SSL Security error

I am getting Error
"[microsoft][ODBC SQL Server driver][DBMSLPCN]SSL Security error"
while connecting throught SQLDriverConnect() using
connection string "DRIVER=SQLServer;SERVER=localhost\XXXSQLEXPRESS;DATABASE=xxxDB;UID=xxxxxx;PWD=xxxx;Trusted_Connection=No";
It was working earlier before re-installing
SQL Server 2014.
But able connect using SQLCMD and SQL Server management studio.
Thanks for your kind help in advance
You are using the legacy SQL Server ODBC driver, which is provided with Windows for backwards compatibility. Try using either the SQL Server Native Client or ODBC Driver 13.1 for SQL Server. Those support TLS 1.2.

Differences Between Drivers for ODBC Drivers

I was setting up the System DSN (64 bit) for my database in SQL server 2016 with Windows 10 64 bit pro. While I was asked to choose the driver to set up a data source, there are the following selections:
ODBC Driver 13 for SQL Server
SQL Server
SQL Server Native Client 11.0
SQL Server Native Client RDA 11.0
It seemed I can set up the data source with all of these drivers. Then which one should I choose in terms of speed and efficiency? What's the difference between them?
Thanks,
Jason
ODBC Driver for SQL Server
ODBC is the primary native data access API for applications written in C,C++, PHP, Python and others for connecting to SQL Server.
It's widely used in data integration scenarios.
Also, it's preferred if you are developing application on Windows and deploying it to Linux .
SQL Server
The full name of SQL Server Driver is SQL Server ODBC Driver. It’s an old driver since sql 2000.
You can use it to connect to SQL Server 2016, but you will not be able to access new features and functionality of SQL Server 2016
SQL Server Native Client
SQL Server Native Client is containing both the SQL OLE DB provider and SQL ODBC driver to support native connectivity to SQL Server and support all features of sql server 2016.
It's the best in windows environment
SQL Server Native Client RDA
Remote data access (RDA) in Microsoft SQL Server Compact 3.5 lets an application access data from a remote SQL Server database table.
It can also store, read, and update that data in SQL Server Compact 3.5, and then update the original SQL Server table.
RDA will be removed in the future release, so avoid using it.
So choose sql driver based on the criteria above.
Microsoft ODBC Driver for SQL Server (MSODBCSQL)
This driver was announced in 2013 as the successor to SQL Server Native Client. It is installed with recent SQL Server versions. There are standalone installers for clients. Driver history for Microsoft SQL Server recommends this driver in preference to "SQL Server" and "SQL Server Native Client" for ODBC. Added features over "SQL Server Native Client": driver-aware connection pooling, connection resiliency, asynchronous execution (polling), support for Always Encrypted, recent SQL Server compatibility (including Azure SQL), and more supported operating systems (including Linux and macOS). You can follow current development on the SQL Server Blog (with previous posts on the SQLNCli team blog).
Driver={ODBC Driver XX for SQL Server} (XX replaced by driver version. See System Requirements, Installation, and Driver Files.)
SQL Server Native Client (SQLNCLI)
Introduced with SQL Server 2005 and ships with SQL Server (also installable via sqlncli.msi from SQL Server feature packs). Added features over "SQL Server": Multiple active result sets (MARS), user-defined data types (UDT), query notifications, snapshot isolation, and XML data type support. The version for SQL Server 2008 also added support for the new date and time types.
Driver={SQL Server Native Client} (SQL Server 2005)
Driver={SQL Server Native Client 10.0} (SQL Server 2008)
Driver={SQL Server Native Client 11.0} (SQL Server 2012 and later)
SQL Server Native Client RDA
Remote Data Access (RDA) is a SQL Server Compact feature which "lets an application access data from a remote SQL Server database table." I can't find much documentation, but it appears this driver was intended to support replication scenarios with Compact Edition.
SQL Server (SQLSRV32)
Included in Microsoft Data Access Components (MDAC) (now called Windows Data Access Components (WDAC)). This driver is available by default on Windows (since 98 and NT 4.0).
Driver={SQL Server}
To check which drivers you have installed, fire up an powershell (32/64 bit - depending which driver architecture you want to use) and run
OLEDB
(New-Object System.Data.OleDb.OleDbEnumerator).GetElements() | select SOURCES_NAME, SOURCES_DESCRIPTION
ODBC
Get-OdbcDriver | select Name,Platform
Overview
https://learn.microsoft.com/en-us/sql/connect/connect-history#odbc
There are three distinct generations of Microsoft ODBC drivers for SQL Server.
The first "SQL Server" ODBC driver still ships as part of Windows Data Access Components. It is not recommended to use this driver for new development.
Starting in SQL Server 2005, the SQL "Server Native Client 10.x/11.x/12.x" includes an ODBC interface and is the ODBC driver that shipped with SQL Server 2005 through SQL Server 2012. It is not recommended to use this driver for new development.
After SQL Server 2012, the Microsoft ODBC Driver for SQL Server is the driver that is updated with the most recent server features going forward.
SQL Server
It's the old one from the MDAC-package (https://support.microsoft.com/en-us/help/899456) which now (since XP/2003) comes with the Windows-OS.
https://learn.microsoft.com/en-us/sql/connect/connect-history#mdacwdac-releases
https://learn.microsoft.com/en-us/sql/relational-databases/native-client/applications/updating-an-application-to-sql-server-native-client-from-mdac
...starting with Windows Vista, the data access components are now called Windows Data Access Components, or Windows DAC). Although both provide native data access to SQL Server databases, SQL Server Native Client has been specifically designed to expose the new features of SQL Server 2005 (9.x), while at the same time maintaining backward compatibility with earlier versions.
SQL Server Native Client
https://learn.microsoft.com/en-us/sql/connect/connect-history#odbc
SQL Server Native Client is a stand-alone library that is used for both OLE DB and ODBC. SQL Server Native Client (often abbreviated SNAC) was included in SQL Server 2005 through 2012. SQL Server Native Client can be used for applications that need to take advantage of new features introduced in SQL Server 2005 through SQL Server 2012. (Microsoft/Windows Data Access Components are not updated for these new features in SQL Server.) For new features beyond SQL Server 2012, SQL Server Native Client will not be updated. Switch to the Microsoft ODBC Driver for SQL Server or the Microsoft OLE DB Driver for SQL Server if you want to take advantage of new SQL Server features going forward.
SQL Server Native Client RDA
Came with .NET Compact Framework 3.5
ODBC Driver for SQL Server
https://learn.microsoft.com/en-us/sql/connect/connect-history#odbc
After SQL Server 2012, the primary ODBC driver for SQL Server has been developed and released as the Microsoft ODBC Driver for SQL Server.
MSOLEDBSQL - Microsoft OLE DB Driver for SQL Server
This driver has been deprecated and later undeprecated:
https://learn.microsoft.com/en-us/sql/connect/oledb/oledb-driver-for-sql-server#3-microsoft-ole-db-driver-for-sql-server-msoledbsql
The new OLE DB provider is called the Microsoft OLE DB Driver for SQL Server (MSOLEDBSQL). The new provider will be updated with the most recent server features going forward. To use the new Microsoft OLE DB Driver for SQL Server in existing applications, you should plan to convert your connection strings from SQLOLEDB or SQLNCLI, to MSOLEDBSQL.
https://blogs.msdn.microsoft.com/sqlnativeclient/2018/03/30/released-microsoft-ole-db-driver-for-sql-server/
Summary
Try to use the future proof drivers:
ODBC - https://learn.microsoft.com/en-us/sql/connect/odbc/bug-fixes
OLEDB - https://learn.microsoft.com/en-us/sql/connect/oledb/release-notes-for-oledb-driver-for-sql-server
SQL Server Native client vs .NET Framework Data Provider for ODBC
It seems that for last version for SQL Server Native client, the Microsoft® SQL Server® 2012 Native Client also named as SQL Server native client 11.0.
Doesn’t support new feature in SQL Server 2014 or later
Note that SNAC 11 does not support features released with SQL Server
2014 and SQL Server 2016 that were not available as part of SQL Server
2012, such as Transparent Network IP Resolution, Always Encrypted,
Azure AD Authentication, Bulk Copy and Table Value Parameters.
https://blogs.msdn.microsoft.com/sqlreleaseservices/snac-lifecycle-explained/
You have to use Microsoft® ODBC Driver 11 or 13 for SQL Server to enjoy new feature in SQL Server 2014 or later
As mentioned earlier in this post, the later version of the ODBC driver (13 and after) give you access to the more advanced features available in SQL Server 2014, 2016, etc.
However, there are conflicting Microsoft posts on whether the ODBC Version 17 driver supports SQL Server 2012 or not.
This link says you have to use ODBC 13 for SQL Server 2012:
SQL Server Driver Versions
However, if you look at the download for the ODBC Version 17, it indicates it support for SQL Server 2012 (and older versions of SQL Server).
Microsoft® ODBC Driver 17 for SQL Server® - Windows, Linux, & macOS
So perhaps the ODBC Version 17 driver is (at least) backwards compatible with older versions of SQL Server.
Hope this helps!
Jon

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.

Sql Developer connector to Sql Server 2012 - error "Vendor code 207"

I am trying to connect from Sql Develper 4.0.3.16 to Sql Server 2012, with jTDS connector jtds-1.3.1.jar.
OS: Ubuntu 14.04
Java:
~$ java -version
java version "1.7.0_72"
Java(TM) SE Runtime Environment (build 1.7.0_72-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.72-b04, mixed mode)
In the create connection window, when I test the connection it is successful.
When I open the connection I can see all the databases. When I try to open a database that I am supposed to have a permission to open, I am getting the following error window:
Any ideas?
P.S. if Microsoft has a JDBC driver sqljdbc4-4.0.jar (which works for me when I connect from Java code to Sql Server 2012), then why do I have to use jTDS in order to connect Sql developer to Sql Server? It seems like the Microsoft jdbc driver is not accepted by Sql Developer when I try to used it as a connector.
Before clicking on +
After clicking on +
As it's explained here, so far sql developer supports only up to sql server 2012. In my case I'm using 2014 version, which isn't supported.
UPDATE
There've been several updates, which provide support to newer databases. Check them out, now I'm able to connect to my servers using SQL Developer.
Download latest version of Oracle SQL developer which works flawlessly to connect SQL server. Make sure you export all your connections before being downloaded the newer version which is 19.2, etc.

Resources