How to connect to SQL Server using ODBC driver? - sql-server

I am trying to open a connection to a Microsoft SQL Server, I opened the ODBC and went to the System DSN->add->selected SQL Server. However there are no SQL Servers to connect to.
This is probably a simple fix, but this is the first time I'm dealing with microsoft SQL Server

Just type in the name of the SQL Server instance you want to connect to. If it's a default instance type the servername. If it's a named instance type in servername\instancename. You'll then be able to configure the DSN as needed.
The control for list of available servers is notoriously unreliable for what is actually available/reachable.

Related

Connect SQL Server from SQL Developer

I searched through all threads on the web available, but none could help me.
I am trying to connect to SQL Server engine from SQL Developer. In order to do that I enabled Named Pipes and TCP/IP from SQL Configuration Manager.
Then I tried different drivers:
I tried Microsoft JDBC driver for SQL Server - I cannot choose in connection manager SQL Server database type, so it does not work..
I tried jTDS driver instead, and it worked - I can choose SQL Server database type, but then all I get is an error informing that it cannot connect to Microsoft SQL Server on localhost (I tried localhost, name of my computer, none of which worked).
Is there anything more I can do?
EDIT
This is what I have so far:
SECOND EDIT
I had more problems:
With error saying
Status: Failur-I/O Error: SSO Failed: Native SSPI library not loaded. Check the java.library.path system property
Using windows authentication, I still got asked for username and password.
(All details and solutions in my answer below)
We only support the jTDS driver for SQL Server and Sybase ASE connections, so that's the way to go.
After that, it's up to you to get a correct connection string to your SQL Server system.
Make sure you have the right port in addition to your 'localhost' network location for your SQL Server instance.
This is using version 19.1 of SQL Developer to connect to a SQL2012 instance overseas..
Actually there were more problems, which I'll post here along with solutions:
In order to ba able to connect SQL Server database type from SQL developer it is needed to install jTDS driver, as already mentioned. Other types are not supported by SQL Developer.
Next thing was to configure with SQL Configuration Manager (the easiest way IMO) SQL Server to listen on IP port 1433, not dynamic, as was previously set. In order to do that in configuration manager I had to go to SQL Server Network Configuration and make appropriate changes. More here.
Next I had problem:
Status: Failur-I/O Error: SSO Failed: Native SSPI library not loaded. Check the java.library.path system property
Which was the fault of missing file, solution was placing file ntlmauth.dll to the /jdk/bin in SQL Developer directory.
I chose Windows authentication, which apparently is not supported by jTDS, so I needed to create user in SQL Server, which I use to connect SQL Server from SQL Developer.
After all that, I had it working.

How do I resolve encryption error connecting to SQL Server from Oracle SQL Developer

My objective is to use the migration tool in SQL Developer to migrate 2 SQL Server databases to Oracle. I am attempting to connect to a SQL Server database at a remote location using Oracle SQL Developer 4.0.
I have installed jtds.1.3.0.jar per instructions, and get the SQL Server and Sybase tabs in the connection properties window.
I have entered the user, pw, hostname, port, and database name. When I try to Retrieve Database, or connect, I get the error message:
Status : Failure -Test failed: I/O Error: DB server closed connection.
The SQL Server DBA tells me her error logs contain the following error message:
Encryption is required to connect to this server but the client library does not support encryption; the connection has been closed. Please upgrade your client library. [CLIENT: (my computer's IP address)] Error: 17835, Severity: 20, State: 1.
When I look at SQL Server documentation about this error message, it talks about certificates and SQL Server Connection Manager. Some relevant information to show that I've covered the basics:
Using the same connection parameters, I am able to connect to the SQL Server database using Toad for SQL Server.
Using the same connection parameters, a DBA set up an Oracle Transparent Gateway, and I can connect to the SQL Server database using the gateway and a database link. (As far as I know, neither of these methods required a certificate to connect.)
Both of these use ODBC; SQL Developer uses jdbc with TCP/IP.
The DBA assures me TCP/IP connection is turned on for the SQL Server databases.
I have gone into the XML file where SQL Developer stores the connection string. It has the form jdbc:jtds:sqlserver://sql-xxx-xxx.mw.nos.xxx.com:1433/my_db, which looks correct. I have tweaked it by adding the instance name, but no difference. The database has a default instance name, anyway, so it shouldn't be necessary.
A co-worker has been able to connect to a local SQL Server database on the same machine where SQL Developer was running (both on his laptop).
As a workaround, I am also pursuing the possibility of installing SQL Server on a local workstation, and copying the databases there for processing, but I don't know if I can get approval. If you know another tool for migrating from SQL Server to Oracle, please also let me know.
Thanks in advance.

How to connect to SQL Server 2014 installed on one PC from a 2nd PC without Windows server and domain involved?

I have a Toshiba laptop with Windows 7 on which I have installed SQL Server 2014 for my database and use Microsoft Access 2016 to manage the data in a user-friendly way.
Everything worked perfectly fine till I tried to connect to the database from another PC on the same network, also with Windows 7.
I am able to connect to the database from the second PC using Microsoft SQL Server Management Studio and SQL Server Native Client 11.0, logging in as sa using SQL Server authentication.
However, when I open the Microsoft Access database file from the second PC, a window pops up, saying that:
See this image.
And when I press OK a second window pops:
See this image.
I have configured the database to use a specific TCP/IP = 1433
Also made new inbound rules in windows firewall for all SQL Server services.
Please note that there is no domain involved here. I don't have a Windows server and the SQL Server is installed on PC #1.
If you require more information, please tell me, I'll be happy to provide
Hope someone will be able to help!
try to use LINKSERVER
Using SQL Server Management Studio
To create a linked server to another instance of SQL Server Using SQL Server Management Studio
In SQL Server Management Studio, open Object Explorer, expand Server Objects, right-click Linked Servers, and then click New Linked Server.
On the General page, in the Linked server box, type the name of the instance of SQL Server that you area linking to.
SQL Server
Identify the linked server as an instance of Microsoft SQL Server. If you use this method of defining a SQL Server linked server, the name specified in Linked server must be the network name of the server. Also, any tables retrieved from the server are from the default database defined for the login on the linked server.
Other data source
Specify an OLE DB server type other than SQL Server. Clicking this option activates the options below it.
Provider
Select an OLE DB data source from the list box. The OLE DB provider is registered with the given PROGID in the registry.
Product name
Type the product name of the OLE DB data source to add as a linked server.
Data source
Type the name of the data source as interpreted by the OLE DB provider. If you are connecting to an instance of SQL Server, provide the instance name.
Provider string
Type the unique programmatic identifier (PROGID) of the OLE DB provider that corresponds to the data source. For examples of valid provider strings, see sp_addlinkedserver (Transact-SQL).
Location
Type the location of the database as interpreted by the OLE DB provider.
Catalog
Type the name of the catalog to use when making a connection to the OLE DB provider.
http://www.quackit.com/sql_server/sql_server_2014/tutorial/linked_servers.cfm

Connecting to MS SQL database using ODBC drivers from local machine

Currently we are using the odbc driver to connect to our MS SQL Server. We however want to be able to pull a directory down to our local machine, make changes, and push back to the server. We are able to connect to the MS SQL Server from our server but we cannot make the connection from our local machines. Does anyone know how to do this? We want to still use the odbc driver as that is what we are using on our server for connections.
thanks!
You may not be able to connect to the Server via ODBC because of network issues. When you are creating your ODBC connection, have you tried to use the IP address of the SQL Server as opposed to the server name? You may also need to use the DOMAIN\Server syntax.
There are quite a number of potential reasons you cannot create the ODBC connection. This link addresses some of those issues:
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/b479cb4a-99a8-437a-8796-7d9f77910ec8/cant-create-an-odbc-connection?forum=sqlexpress
Hope this helps. Let me know if you still have issues.

Microsoft SQL Server IP/server login

I have installed many SQL Server setups but I want to know how to install SQL Server without an instance name i.e. i want to connect to SQL Server with IP or server name only.
Installing an instance and connecting to an instance of SQL Server are two different things.
Every time you attempt an SQL Server installation you have to specify an instance (create a new one or select an existing one)
Connecting to an instance is a different thing.
For example if you want to connect to an instance through MS Management studio without writting the name of the instance you can define the connection in following manner:
ComputerName\IP,port
e.g:
MyPC\192.168.1.1,1433
In order to do this you need to install SQL Server as the default instance on the machine. When it is set as the default instance you no longer need to specify an instance name when connecting to it.

Resources