By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,481 Members | 1,213 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,481 IT Pros & Developers. It's quick & easy.

TCP Provider errors in SQL Server

P: 46
Hi,

I have a SQL Clustered instance in a hyper-v, virtualized environment. Every server (5 of them) except for one server cannot connect to the default SQL Cluster Instance via TCP/IP on port 1433 using just the name of server (i.e. SQLDEVCLUSTER) in the connection string. I keep getting the following error. It can't be the SQL Cluster since all other servers are connecting to it just fine and everything works normal. Not having a lot of luck with connections this month.

Steps I have taken to determine issue:
  • Test with telnet to the server using the IP:Port - successful
  • Test with packet Sender, send packets to the IP:Port - successful
  • Run powershell script to connect to SQL Cluster Instance using just the Servername - fails
  • Run powershell script to connect to SQL Cluster Instance using Servername:Port - successful
  • Turned off firewall completely
  • All TCP\IP protocols are enabled in SQL Config
  • Verified the port in SQL Config
  • Started, stopped, disabled, enabled SQL Browser several times
  • Verified the port is listening using netstat -an and netstat -ano

At first I thought something with the cluster was off, but 4 machines have no issues. So I have to surmise that it's that one application server. If I can't figure it out, I am blowing the server away and just building new. Any thoughts? Just wondering if there is a setting on the app server VM that I missed.


Error associated with connection failure when Powershell fails most it has to do with not being able to obtain the data for the query I posted that script below:
Exception calling "Fill" with "1" argument(s): "A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that
the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - No such host is known.)"

At line:16 char:2
+ $SqlAdapter.Fill($DataSet)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : SqlException




Expand|Select|Wrap|Line Numbers
  1.  $SqlServer = “SQLDEVCLUSTER”
  2.  $SqlCatalog = “MASTER”
  3.  
  4. #########-----Check connection and grab some data-------------------
  5.  $SqlQuery = “Select top 1 object_id from sys.objects"
  6.  $SqlConnection = New-Object System.Data.SqlClient.SqlConnection
  7.  $SqlConnection.ConnectionString = “Server = $SqlServer; Database = $SqlCatalog; Integrated Security = True”
  8.  $SqlCmd = New-Object System.Data.SqlClient.SqlCommand
  9.  $SqlCmd.CommandText = $SqlQuery
  10.  $SqlCmd.Connection = $SqlConnection
  11.  $SqlAdapter = New-Object System.Data.SqlClient.SqlDataAdapter
  12.  $SqlAdapter.SelectCommand = $SqlCmd
  13.  $DataSet = New-Object System.Data.DataSet
  14.  $SqlAdapter.Fill($DataSet)
  15.  $DataSet.Tables[0]
  16.  $RunDateLong = Get-Date
  17.  $RunDateShort = $RunDateLong.ToShortDateString()
  18.  
  19.  
  20.  $results = $DataSet.Tables | format-table -autosize | out-string
  21.  $body1 =”$results”
  22.  
  23.  
Oct 1 '15 #1

✓ answered by Vikki McCormick

Okay as a follow up. I found the issue.

I ran c:\windows\system32\cliconfg.exe

Someone put in an incorrect alias with incorrect data. I fixed it, and it worked.

Now that is the best answer. Figuring it out! Thanks me. :)

Share this Question
Share on Google+
2 Replies


P: 46
We rebuilt the server everything works. No solution. Something in the install must have messed up or a setting got changed.
Oct 4 '15 #2

P: 46
Okay as a follow up. I found the issue.

I ran c:\windows\system32\cliconfg.exe

Someone put in an incorrect alias with incorrect data. I fixed it, and it worked.

Now that is the best answer. Figuring it out! Thanks me. :)
Oct 6 '15 #3

Post your reply

Sign in to post your reply or Sign up for a free account.