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.
Related
I have tried every conceivable permutation for hours to try to connect to a remote SQL Server 2017 using SSMS. I keep getting:
Logging failed for user xxx. (Microsoft SQL Server Error 18456)
I know SQL Server is running on the remote machines since I can log
in locally there using SSMS.
SQL Browser is running.
TCP/IP is enabled. There are no dynamic
ports in IP All.
I know the firewall is not a problem since I can
telnet to port 1433 from the remote machine, and I added the rule to allow access.
I have "Enable Remote Access" turned on in SQL Server.
I have both Windows and SQL Server Authentication enabled.
I have user mappings for the given databases.
I can connect locally using SSMS with the Sql Server Auth user/passwd that I am trying to use remotely.
When logging in from the remote client in SSMS:
I use an IP address for the server (although I can also browse to the server as I have UDP 1434 open).
I use SQL Server Authentication.
I looked at Event Viewer on the SQL Server machinee to see if it gives me more clues as to why the log in is failing, but it is worthless.
I saw this, but it is of no help.
What on earth could be left that is the problem?
At my 'wits end' here and looking for some help.
I have a Sever (Win Server 2016) running SQL Server 2016.
I have configure one client machine on the network to successfully access SQL Server using Ole DB Provider with connection string as:
Provider=SQLOLEDB.1;Password=secret;Persist Security Info=True;User ID=frustrated;Initial Catalog=companydb;Data Source=MySERVER\SQLEXPRESS
Everything is running 'swimmingly' on this client (Windows 7 Ultimate).
The problem is, when I install same code on the 2nd machine and attempt with same connection protocol, I get the following message back from SQL Server:
[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.
What I have done/determined as far as troubleshooting...to no avail:
Computers one and two are both running Windows 7 Ultimate O/S
I lowered UAC to 'Never'.
Enable access to port 1433 specifically to the Server Firewall.
I disabled the Firewall completely on the Server to see if that was the issue.
Established an alternate SQL Server user and attached them to the target database
This is driving me crazy. Any help would be greatly appreciated.
Thanks,
Scott
Software:
Windows 2012 server R2
SQL Server express (64 bit), installed by choosing all defaults
SQL Server 2014 Management Studio, installed on the same machine
When I connect from SQL Server Management Studio to SQL Server, it works fine as long as I have "Network protocol" on the connection tab set to <default>.
When I set the protocol to TCP/IP, the connection fails:
A network related error ... The server was not found or was not accessible...
I checked with the SQL Server Configuration Manager that TCP/IP is enabled on the server as well as on the client. I can't find help from Google.
One observation: after the installation, the SQL Server Configuration Manager would not come up (Configuration Manager Cannot Connect To WMI Provider). I followed this advise (https://www.youtube.com/watch?v=igl-CB0qP_c) and got it to work.
I am unable to post a comment due to reputation score so I had to post an answer.
Some things to try/check:
Start the SQL Browser Service if it is not running
Check the SQL Error Log to ensure it is running on port 1433
Are you connecting to servername\SQLEXPRESS in the connection dialog
Try telnet to connect telnet servername port
if it goes to a blank screen instead of giving you a failure to connect then it is communicating. Ctrl + ] to cancel the connection.
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.
A little background on what has been going on. I have been in the process of upgrading our sql server from 2008 R2 to 2012. The way I have been doing this is by taking the server to upgrade, lets call it Server A. Then taking a server a new server, lets call it Server C.
Moving all databases from Server A to Server C.
Renaming Server C to Server A and Server A to Server C.
Completely blowing away the Server C (old Server A).
Installing windows 2012, and SQL Server 2012 on Server.
Rename both servers to their original name.
The network team actually installed Windows server, got it on the network, etc. I only installed SQL Server 2012. I have done this with 8 servers and have had no problems from them so far. Both servers are running SQL Server 11.0.3373 windows version 6.2 build(9200). I also am sysadmin on all sql servers, but not a domain admin.
The issue
I am trying to create a link server from Server A to Server B. I can create the link server without an error, but i get an error when i use it in a query.
More relevant information
The firewall is turned off on Server B on all these tests.
I am able to ping Server A from Server B and vice versa.
I did a tracert and it comes up with the correct server and ip address( from both servers)
When I create the link server with *Other data source*
“Microsoft OLE DB Provider for SQL Server” or “SQL Server native Client 11.0”
I am able to query the master database when I query a user created database I get this error:
Msg 7314, Level 16, State 1, Line 1
The OLE DB provider "SQLNCLI11" for linked server "SERVER_B" does not contain the table ""UserDB"."dbo"."Table1"". The table either does not exist or the current user does not have permissions on that table.
SSMS
When I RDP into the Server A, run SSMS, try to connect to Server B I get this error:
"A transport-level error has occurred when receiving results from the server (Provider TCP Provider, error: 0- The specified network name is no longer available.) (Microsoft SQL Server Error: 64)"
RDP
When I try to RDP into Server B from Server A. I get an error that says "This computer can't connect to the remote computer. I also had a domain admin try and gets the same error.
Server B to A errors
I tried going the other way with it.
I RDP into Server B. In SSMS I try to connect to Server A. Below is the error i get.
A connection was successfully established with the server, but then an error occurred during the login process. (provider: TCP Provider, error: 0 - The semaphore timeout period has expired.) (.Net SqlClient Data Provider)
Any help would be appreciated.