ODBC Data Source Administrator with MS SQL Server - sql-server

I have scoured Stack Overflow and the internet in general for steps leading to an answer, but have as of yet been unsuccessful. My main goal is to use ASP scripts with MS SQL databases on my standalone Win7 PC, but the short term goal is to be able to configure an ODBC User or File DSN connection that tests successfully in the ODBC Data Source Administrator.
I have SQL Server 2012 installed and can successfully connect to the database engine from SQL Server Management Studio.
When I try to configure a DSN entry in ODBC, the error message reads
[Microsoft][SQL Server Native Client 11.0]Named Pipes Provider: Could not open a connection to SQL Server [53].
All attempts to test the data source lead to a 15-second time-out with the TESTS FAILED! message.
I have tried all of the usually recommended adjustments. What other details could I provide? HELP!!

Named pipes is disabled by default. You need to enable it from the Sql Server Configuration Manager if you want to connect over named pipes.
SQL Server 2017; SQLServerManager14.msc
SQL Server 2016; SQLServerManager13.msc
SQL Server 2014; SQLServerManager12.msc
SQL Server 2012 (11.x); SQLServerManager11.msc
You will need to use one of these .msc files from START > RUN to open the Sql Server Configuration Manager
I have SQL Server 2017 so I will give you steps for that.
1. Start
2. Run
3. Type in SQLServerManager14.msc and hit OK
The SQL Server Configuration Manager will open.
4. In the left pane of the Configuration Manager, look for "SQL Server Network Configuration" and expand it.
5. Find the "Protocols for {Your Server}" and double click it. There could be multiple options here if you have multiple SQL Server
Instances running on the server. Make sure you are updating the
Protocols for the correct instance(s).
6. Double click named pipes and change it from disabled to enabled
7. Restart your SQL Server services
You will now be able to connect over named pipes.

Related

SSIS OLEDB Connection Manager - Unable to connect to a database (No database names appear)

I am trying to create a connection manager in Microsoft SQL Server Data Tools for Visual Studio 2017 (SSDT) for an integration services project.
In the Connection Manager:
The Provider is set to: Native OLE DB\SQL Server Naive Client 11.0
The Server name is set to: the name of the local machine
Log on to the server is set to: Windows Authentication
Connect to a database is set to: Select or enter a database name. However no database names appear in the drop down box - the drop down box is blank. I am expecting the name of the database i am working on, including the master database etc to be present.
When I Test Connection, I get an error message which says:
'Test connection failed because of an error in initializing provider. Login timeout expired
A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.
Named Pipes Provider: Could not open a connection to SQL Server [2]..'
I am using SQL Server 2017 and Microsoft SQL Server Management Studio 18.
Allow remote connections has been ticked in SSMS.
The only thing i can see is the SQL Server Agent and SQL Server Browser has stopped / is not running and the TCP/IP Protocols for SQLEXPRESS is set to disabled - I am unable to enable it without a further Access is denied (0x80070005) error.
I have tried to follow all of the guides but cannot progress. Could somebody please offer some further guidance?
I have resolved the issue. It was an extremely silly oversight! On installation, the server name in the Visual Studio 17 Connection Manager was listed as: Local MachineName only. In SQL Server, the Server Name was listed as: LocalMachineName\SQLEXPRESS. The Server Name in VS17 has to be exactly the same as SQL Server. As i said, this is a very silly oversight on my part but have documented for future reference.
SQL Server Configuration Manager ==> SQL Server Services(Left sidebar) ==> Right Click and Start all Stopped services

Cannot connect to SQL Server when browser and protocols are already enabled

I've just reimaged a windows 10 box and installed SQL Server 2012 Management tools, client tools and it has its own SQL Server which works fine.
I'm trying to connect SSMS or Odbcad32 to a SQL Server instance on another machine on the same domain and both SSMS and Odbcad32 won't connect.
Odbcad32 gives this error message:
SqlState: '01000'
SQL Server Error:67
Connection Failed:
SqlState: '08001'
SQL Server Error: 17
SQL Server does not exist or access denied
The SQL Server browser is already started. Client protocols are all on for both 32 and 64 bit. i.e. shared memory, TCPIP and named pipes are all enabled, in that order.
I've googled a million threads on this topic and they all seem to find resolution when one of the two above paragraphs are satisfied, but not in this case.
Any other machine can connect to that SQL Server fine.
I can ping it fine.
Changing the SQL Server computer name to the ip address doesn't help, it still won't connect.
The remote server has an instance name of sql2008, which I am obviously including when I connect in the form machinename\sql2008.
Thanks in advance.
Edit: connecting via Windows auth or SQL Server auth is the same. I am logged in to Windows as domain\administrator. UAC is off on this box.

SQL Server always Stopped

While connecting to SQL Server 2012, I am getting the following error.
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2012, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (Provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2)
Here is what I did:
I installed SQL Server Management Studio normally but I can't get the server running. How do I set SQL Server correctly the first time?
I want to be able to install this server in my desktop locally and connect to it using Microsoft SQL Server. Any help would be appreciated. Thank you.
Screenshot of my server status as of now
SQLServer start - Log on as LocalSystem
You can try to replace the system databases with you system databases from somewhere else. If not, you can control the firewall.
If you are connecting from the remote server, you check this are.
From the section SQL Server Network Configuration;
TCP/IP Port : 1433 , Named Pipes : Enabled and restart SQLServer

Setting up/troubleshooting ODBC connection for SQL Server 2014

I've set up ODBC connections to databases before, but I'm currently having problems and can't seem to figure out what I'm missing. This isn't my area of expertise, and the Microsoft help/documentation is less than 'user friendly'. Appreciate any pointers.
I have a locally running instance of SQL Server 2014, with a couple of test databases I'm using to develop another application. Here's the info on the setup:
SELECT HOST_NAME() AS 'host_name()',
##servername AS 'ServerName\InstanceName',
SERVERPROPERTY('servername') AS 'ServerName',
SERVERPROPERTY('machinename') AS 'Windows_Name',
SERVERPROPERTY('ComputerNamePhysicalNetBIOS') AS 'NetBIOS_Name',
SERVERPROPERTY('instanceName') AS 'InstanceName',
SERVERPROPERTY('IsClustered') AS 'IsClustered'
query returns:
host_name() ServerName\InstanceName ServerName Windows_Name NetBIOS_Name InstanceName IsClustered
DECATHLETE DECATHLETE\SQLEXPRESS DECATHLETE\SQLEXPRESS DECATHLETE DECATHLETE SQLEXPRESS 0
In the Windows ODBC Data Source Administrator (64-bit) - I'm running W10 in a VMWare VM on Mac, btw - the server shows up as available when I try to configure a new System DSN. Following is the setup info:
Microsoft ODBC Driver for SQL Server Version 12.00.2000
Data Source Name: TEST
Data Source Description:
Server: DECATHLETE
Use Integrated Security: Yes
Database: (Default)
Language: (Default)
Data Encryption: No
Trust Server Certificate: No
Multiple Active Result Sets(MARS): No
Translate Character Data: Yes
Log Long Running Queries: No
Log Driver Statistics: No
Use Regional Settings: No
Use ANSI Quoted Identifiers: Yes
Use ANSI Null, Paddings and Warnings: Yes
Testing connectivity generates the following error message:
Microsoft ODBC Driver for SQL Server Version 12.00.2000
Running connectivity tests...
Attempting connection
[Microsoft][ODBC Driver 11 for SQL Server]Named Pipes Provider: Could not open a connection to SQL Server [2].
[Microsoft][ODBC Driver 11 for SQL Server]Login timeout expired
[Microsoft][ODBC Driver 11 for SQL Server]A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.
TESTS FAILED!
I've confirmed access to the databases from SQL Server Management Studio. The login uses windows authentication with no password. I can get in, play with databases, run queries, etc. (See picture below).
I'm at a loss. I'd previously created ODBC connections with no problems. This seems to have cropped up as an issue since upgrading the virtual machine from W7 to W10. Hoping someone can point out an obvious oversight.
* Update *
Adding a screenshot of the ODBC configuration wizard below. Note that the SQL Server is showing up in the list of available servers on the wizard. So it seems to be seeing the server but failing to connect to it.
In the "Create a New Data Source to SQL Server" dialog/window, the incorrect "Server name:" is specified. Since you have a named instance of SQL Server, type in the name of the SQL Server host, a backslash, and the instance name. Here is the format: SQLHostName\SQLInstanceName.
Please check, whether you're allowing remote connections to the SQL Server using the 'Microsoft Sql Server 2014\Configuration Tools\Sql Server Configuration Tool' utility.
Go to Sql Server Network Configuration and make sure you allow TCP/IP for remote connections.
Also I'd try to play with Windows Firewall on the Sql Server PC.
I've been searching for a solution to this issue for a while now. I am trying to link SQL tables on another server to a Microsoft Access front end to make use of the Forms for data entry etc.
The comments here solved the issue and I thought I would provide a consolidated solution for clarity:
From the SQL Server Connection Manager:
Enable SQL Server Browser
From 'SQL Server Services', modify the Properties of the 'SQL Server Browser' and set the 'Start Mode' to 'Automatic'. Apply the changes and exit.
Start the 'SQL Server Browser'.
Enable TCP/IP
From 'SQL Server Network Configuration' -> 'Protocols for [your server name]', then enable TCP/IP.
Then create an ODBC connection from your local computer. From there I used the named ODBC connection in access to link the tables I needed.

Sql server 2000 remote connection

Hi i want to know how to enable remote server connection in sql server 2000. I have sql server 2000 installed in a system with windows server 2003 os. i want to create a dsn connection to the database through remote. I have created a dsn locally in the server it is working. but how to create dsn from the remote system and make it work.
To allow remote connections to the server, do the following:
In SQL Server Enterprise Manager, right-click the server and choose Properties.
On the General tab, click the Network Configuration button and enable Named Pipes, and TCP/IP in the new window. I'm not sure if you need to restart SQL Server after doing this.
After doing this, you should be able to connect to the SQL Server from a remote computer, by referring to e.g. MYSERVER\MyInstanceName.
It helped me.
BTW I've also added sqlservr.exe to my firewall exception list:
http://support.microsoft.com/kb/841251
Try installing MSDE/connectivity tools on remote system.

Resources