Fail to add ODBC Data Source to a SQL Server - sql

I use an online database which I am able to connect through altium or dbVisulizer. I want to add an instance to that database using ODBC Data source in windows, but it fails. The steps I followed are pictured below:
Any idea why is this happening?
Additional information:
Altium use the following information: ConnectionString = Provider=SQLNCLI11.1; User ID=alib_WFC5AKIMTQCL; Password="*********"; Initial Catalog=altium_library; Data Source=db.altiumlibrary.com,1433; Initial File Name=""; Server SPN=""
After connecting through dbVisulizer I have the following information: The server version is: Microsoft SQL Server 14.00.2027 Microsoft JDBC Driver 9.2 for SQL Server 9.2.1.0

I don't believe this is possible. However, in most cases, if you can connect to sql server via jdbc drivers, then you can connect to the same sql server with odbc.
Access does not support jdbc, and in most cases that driver is Java, and thus you would be talking about a java enabled client side software.
For example, I have a instance of SQL server. I direct connect from Access over the network to SQL server - using ODBC drivers.
However, my android phone? Well, I use jdbc type 4 drivers, and thus my android phone can also direct connect to that same instance of sql server on the network.
However, there is no support for Access to connect to SQL server using jdbc drivers, but then again, if that is SQL server in question, then both jdbc, and odbc should be able to connect to that running instance of SQL server.
Now, you might be able to setup and run what is called a jdbc "bridge" connection. This would require that you install + setup a bridge on your computer. (and that bridge runs like a mini web server - it is NOT just a driver, but a web like "service"/"server" that you have to have running. In fact, it quite much the reverse that such a bridge is for. So, for example, if you running that bridge, then it would be possible for jdbc drivers to in fact connect to the access database (this would be a type 2 (or 3???) jdbc driver/connection.
So, to be clear, a jdbc type 4 connection is NOT possible to Access, since they require a so called "socket" (tc/ip) connection. Access is file based, so you don't ever connect to a access database, but you OPEN IT as a file. However, as noted, you are talking about Access connecting to the server anyway.
However, Access does not support, nor use nor have any means to use and consume a jdbc driver. But then again, it stands to reason that any database from MySQL, Oracle, PostgrSQL, SQL server, and more ALL HAVE ODBC drivers.
So it begs the question, why a ODBC driver would not be used here?
But, as noted, since Access supports ODBC drivers, and not jdbc drivers, then the answer is no - Access cannot use such drivers.

Related

What is the difference between Microsoft SQL Server Connection and Generic DB connection provided in DB connector from Mule 4.3?

In the current project we are already using generic db connection and now we found that there is Sql Serve connection available but we have never used that so want to explore that option.
Is it going to give better performance than generic connection?
One observation from my experience is Generic Connection is working for Windows Authentication where as SqlServer Connection is not working for the same and working for Sql Account.
The Microsoft SQL Server Connection provides some database specific configurations to simplify the configuration of the connection. For example an instance name. With the Generic Connection you can only use generic JDBC configurations. There should not be a difference in performance. Depending on how did you configure Windows Authentication in the generic connection it may or not be possible to replicate it in the Microsoft SQL Server Connection. If you are happy with your current connection configuration there is no need to change it.

Connection to SQL database failed because of an error in initializing provider

I am trying to connect to an internal SQL database which allows TLS 1.2 protocol only.
I am able to log-in to the database using the SQL Server Management studio.
I'd like to connect to that same database using Excel 2013 (for a more graphic report). I have read a lot on Excel having problems with TLS1.2 and the use of ODBC Driver instead since that is the only one which supports tls 1.2.
Sadly when entering the credentials and testing the connection we receive the following error:
TEST CONNECTION FAILED BECAUSE OF AN ERROR ININITIALIZING PROVIDER. UNSPECIFIED ERROR
Does anybody have experience with using Excel to connect to SQL Server using TLS1.2? Am I doing something wrong? I'm using the Data link: Microsoft OLE DB Provider for ODBC drivers. The normal SQL way of adding things doesn't work either but I believe that's because TLS1.2 isn't supported there.
If I recall correctly, Management Studio will connect on port 1433 by default and use the TDS protocol and really have nothing to do with TLS. So it is not surprising that it works in SSMS.
From https://blogs.msdn.microsoft.com/sql_pfe_blog/2017/09/27/microsoft-excel-tls-sql-server-important-considerations/
For all NEW workbooks, do not use that menu option. Instead use the
"From Data Connection Wizard" and select a compliant driver from the
list. A requirement is that you have the SQL Native Client (2008 or
2012) or ODBC drivers with appropriate patches per TLS 1.2 support for
Microsoft SQL Server below.
So it seems like just using ODBC will not work unless ODBC on your machine has been patched to handle TLS 1.2.
I believe the ODBC update you need is below.
https://www.microsoft.com/en-us/download/details.aspx?id=36434&751be11f-ede8-5a0c-058c-2ee190a24fa6=True

Requirements to run SQL Server on other computers

Suppose that I've created a project using MS SQL Server.
Now if somebody asks me to run my application on their brand new PC, should I install the entire SQL Server management studio on their computer? Or are there any other choices?
Please note that I just want to run my app (.exe template) not to debug it or anything else.
If your application is intended for standalone use on a PC, you can include the redistributable version of SQL Server Express in your installer. It's a limited but functional version of SQL server intended to be included with application programs like yours free of charge.
https://www.microsoft.com/en-us/sql-server/sql-server-editions-express
If your application program is designed for either shared or standalone use, and you have time to polish up your installer, you can ask your users whether they want to use a shared SQL Server instance. That will let you skip the installation of SQL Server Express when it's not necessary.
No they don't need SQL server or management studio , however they a database driver to access the server. ADO, ODBC and JDBC are the types of drivers you would look at. This depends on the language you wrote your application in and the connection string.
You clients would use the server's address and connect to it using the driver which is specified in a connection string. See the examples below:
.Net Framework Data Provider For SQL Server:
Server=myServerAddress;Database=myDataBase;User Id=myUsername;
Password=myPassword;
SQL Server Native Client 11.0 OLE DB Provider:
Provider=SQLNCLI11;Server=myServerAddress;Database=myDataBase;Uid=myUsername;
Pwd=myPassword;
If you application only connect to the database that you have a two-tier client server architecture. For the server to be reachable it needs to be on a network or network endpoint that the clients(people running your software) can see. The server needs to be on as well(your comments).

How can I monitor all SQL commands that go through a ODBC User DSN

How can I monitor all SQL commands that go through a ODBC User DSN?
the datasource is using the SQL Server native Client 10.0 driver.
I have an access app with hundreds of confusingly complex reports. Over the last 3 years We have ported the app to ColdFusion and MS Sql server and one of the reports has some inconsistencies with the access version of the app.
I've tried tracing the code through in the access app to discern exactly what is going on but I've been unable to figure it out. The access app uses an ODBC user DSN with the SQL Server native Client 10.0 driver. Is there some way I can monitor the datasource and see all the sql commands that are executed over that channel?
Setup a SQL Server profile trace and capture the command being executed on the server. I assume you are using MSSQL as the backend?
https://expressprofiler.codeplex.com
It's free profiler in case you use SQL Server Express version.

ODBC via ssh tunnel to a 3rd machine

At work we have a SqlServer database that cannot be connected to from outside our internal network. If we want to work remotely we can ssh into several other servers on our network and then work via X Forwarding so the development applications have access to the database.
This is annoying for a bunch of obvious reasons such as latency in the IDE and I'm wondering how I could tunnel the database connnections back to my machine. It seems like this should be possible but I'm not sure how to do it since there's has to be an intermediate step in between. This question is similar to what I want to do but only works for going directly to the db server if I understand it correctly.
I'm asking specifically about ODBC because that's the driver the application already uses. If there is a more general solution I would of course be open to that.
What I want to do is
Local machine (Linux) -> Server (Linux) -> Database connection to DB (Sql Server)
Well, as you say, if you wanted to directly use a encrypted connection to SQL Server you could just use Linux driver that give you that, and most I think do. You could use a bridge as already suggested. But It might be possible using socat. What driver are you using on the local machine? I will have a quick play and see how it works.
The OpenLink Software - Multi-tier ODBC Driver for SQL Server might help you out here...
It has a client server architecture as which can easily be configured in a three-tier (client/proxy/server) architecture as follows --
Linux Client -
ODBC Application
OpenLink Generic ODBC Driver (Multi-tier client component)
Linux Proxy -
OpenLink Request Broker (Multi-tier server component)
OpenLink Database Agent for SQL Server (Multi-tier server component)
Windows Server -
SQL Server DBMS