I'm new to SQL Server. I'm trying to create a new data source through ODBC Data Source Administrator for accessing a SQL Server database file (.mdf).
I first experienced an error msg
[TCP/IP Sockets]Specified SQL server not found
when running SQL Server ODBC Data Source Test.
After following all the steps in http://www.ceus-now.com/how-to-connect-to-ms-sql-express/, the previous error msg disappears and the tests are successful.
The connection seems to be successful. But then I experienced another problem is that, I could not choose the database. According to https://www.mssqltips.com/sqlservertip/1471/sql-server-dsn-and-odbc-configuration/ .
The problem might be "If using Windows security, you as the DSN creator, do not have rights to the database". Could someone help me solve this problem please? I really appreciate it! Thank you in advance!
I'm using Windows NT authentication. I'm using SQL Server 2014 (v12.0.2000). SQL Server connect to WORKSTATIONNAME/SQLEXPRESS.
Related
Hi,
I am trying to connect Azure sql database from Access database . However its giving me the following error.
When I try with the same credential from SSMS its connects perfect however, can't connect through ODBC.
Can anyone had the same experience or anyone has any input to resolve this issue?
Thanks in advance!
You need to install ODBC driver 17 for SQL Server. You need to restart computer after installing the driver or the connection won't work. Create a Machine ODBC DSN using this driver.
Provide now the Azure SQL server name:
Use SQL authentication.
On the next screen specify the database name (catalog).
Make sure you set Encrypt=True
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.
I have a Firebird Database (v2.5) which lives on a server with hostname "FBDEVDB". I am working on a separate server on which I have installed SQL Server to begin the process of migrating the tables and data into a SQL Server database.
I saw several posts discussing that this can be done using the Import Data feature of SSMS with an ODBC connection to the Firebird DB. So, I have downloaded and installed the Firebird ODBC Driver 64-Bit. When I went to configure my DSN I first got an error regarding a missing gds32.dll. Looking into it further, I realized I needed the fbclient.dll from the Firebird files. I've copied it over to my SQL Server machine, and now the gds32.dll error is gone, and I can tell it is TRYING to connect to the Firebird instance because if I provide an incorrect username/password it tells me my login is incorrect.
However, when I use a valid login/password, I get the following error message
I have defined the following fields in the ODBC setup
Database: FBDEVDB::C:\Firebird\MYDATABASE.FDB
Client: C:\Temp\fbclient.dll
Database Account: SYSDBA with VALID PASSWORD
What am I missing? I can not seem to find any information on what this error means.
Thank you!!!!!
!
I've tried using ADODB connection string and also in the Excel Data Connection Wizard.
I'm getting this error:
[DBNETLIB][ConnectionOpen(Connect()).]SQL Server does not exist or access is denied.
I can see the server created in Visual Studio with its databases fine, no worries, in SQL Server but not connect in Excel. I can connect in Excel to databases created in SQL Server but not those created in VS (2015).
It's seems like a server issue rather than database one but here's the connection string's anyway:
This works fine for database's created in SQL Server:
Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=True;Data Source=DESKTOP-ODUI05F\MSSQL2012;Initial Catalog=MyDatabase
but the same string generates the above error when connecting to the server/database created in VS.
Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=True;Data Source=(LocalDB)\MSSQLLocalDB;Initial Catalog=aspnet-Widly-20160823125202
The server name is: (LocalDB)\MSSQLLocalDB.
The database is generated in VS using EF.
Please help - driving me nuts.
Thank you, Simon
Solved!
Followed the solution linked below.
Even though it's an MSSQL Server DB you're trying to connect to, using Excel Data Connection Wizard you have to ignore SQL Database connection option and choose "Other/Advanced" instead. I recorded it in a macro which produced all the vital parts for the connection string as follows:
How to connect to localDB in Excel
Provider=SQLNCLI11;
Integrated Security=SSPI;
Persist Security Info=False;
Data Source=(LocalDB)\MSSQLLocalDB;
Initial Catalog=aspnet-PTL-20160827031609
Besides doing the dishes this is my biggest and only achievement today! :)
I'm failing to connect to a SQL server SQLExpress. The connection worked fine a few days ago.
This is how I tried to connect (I'm using Microsoft SQL server management studio):
connection = pyodbc.connect("DSN=sqlServer; UID=myuser;PWD=mypassword")
cursor = connection.cursor()
The error I get:
('HYT00', '[HYT00] [Microsoft][ODBC SQL Server Driver]Login timeout expired (0) (SQLDriverConnect)')
In the ODBC Data Source Administrator, when I test the data source I get:
I got the similar issue.
The problem was actually I was using "SQL Server" as the driver in my ODBC settings in my DSN.
The driver should be "SQL Server Native Client 11.0".
It fixed the issue for me.
Because you are having the same issue in the ODBC Data Source Administrator I would try to focus on that first not on your code.
Here you can find a list with possible problems
Maybe this can help you find out what the problem is.
I also would try to connect with the SQL Server Management Studio.
Maybe it is possible to connect with a different user or via Windows login.
That would mean that your user might not exist anymore (maybe because you renewed tha database or something).
Also I sometimes have the problem that the SQL Server is not started either locally or on the server.
Maybe you could check if the service is started and the database is running.