Sql ошибка 258

  • Remove From My Forums
  • Question

  • Hi Everyone,

    Please check the below screenshot once, One of my client getting this error he was unable to connect to the server.

    As I checked TCPIP protocol was enabled and i’m able to access the server as well but the guy getting below error message.

    Please suggest me how to troubleshoot this issue..Thanks in advance!

    Regards

    V


    DBA

Answers

    • Proposed as answer by

      Tuesday, March 22, 2016 6:51 PM

    • Marked as answer by
      Lydia ZhangMicrosoft contingent staff
      Thursday, March 31, 2016 7:02 AM
  • Windows authentication or SQL authentication?

    The message as such is the standard message when the instance cannot be reached. However, error 258 is unusual in this context. And it is not an SQL Server error, it’s an OS error; NET HELPMSG 258 says
    The wait operation timed out.

    This could possibly indicate that you are arriving somewhere, but no one is actually listening. That is, the port is open but the process is busy with something else. (And that is necessarily not an SQL Server process.)

    Try connecting by IP-address and port number in case there is some DNS problem.

    • Proposed as answer by
      Naomi N
      Wednesday, March 23, 2016 10:20 PM
    • Marked as answer by
      Lydia ZhangMicrosoft contingent staff
      Thursday, March 31, 2016 7:02 AM

I get the following message when trying to connect to SQL database from a remote machine using MS Management Studio with Server Name [ XX.XXX.XXX.XXX,1433\MyServerName ] and SQL authentication:

Cannot connect to XX.XXX.XXX.XXX,1433\MyServerName.

ADDITIONAL INFORMATION:
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 — The wait operation timed out.) (Microsoft SQL Server, Error: 258)

The wait operation timed out


I have done the following:

  • Allowed remote connection in Server Properties window in SQL Management Studio
  • Configured server machine to have static IPv4/DNS addresses.
  • Enabled TCP/IP in SQL Configuration Manager (in SQL Server Network Configuration)
  • In TCP/IP properties, adjusted [ Protocol -> Listen All -> No ] & set IP[1-8] to TCP port 1433 and IPAll port to 1433 (TCP dynamic ports left blank)
  • Set Inbound/Outbound enable connection (Domain, public, private) rules in Windows Firewall for ports TCP 1433, UDP 1434 (should make no difference, since port is specified), service executables: sqlbrowser.exe in C:\Program Files (x86)\Microsoft SQL Server\90\Shared (not used I think because port is specified) and sqlservr.exe in C:\Program Files\Microsoft SQL Server\MSSQL13.MyServerName \MSSQL\Binn
  • Set NAT actions in server-side router for ports 1433 (TCP), 1434 (UDP) (again, should not matter) to server’s local IPv4 address and ports 1433, 1434 accordingly.
  • Made sure SQL service is running, ports are open and listening on server machine.

I can connect to the database on server machine using Windows or Sql credentials with either PC name, or machine’s local IPv4.

Interesting thing is, when >telnet XX.XXX.XXX.XXX 1433 is run, it takes about 10-12 seconds to fail (Could not open connection to the host, on port 1433: Connect failed), but I can see the 2 packets coming to the router itself. Same with the login using SQL Manager — packets come to the router, but either server machine refuses (doesn’t resolve?) the connection, or it doesn’t even get to the machine.

Appreciate your suggestions.


Versions used:

  • MS SQL Server 2016 Express, MS SQL Management Studio 17, SQL Server 2016 Configuration Manager, Windows 10 Pro.
  • Remove From My Forums
  • Question

  • Hi Everyone,

    Please check the below screenshot once, One of my client getting this error he was unable to connect to the server.

    As I checked TCPIP protocol was enabled and i’m able to access the server as well but the guy getting below error message.

    Please suggest me how to troubleshoot this issue..Thanks in advance!

    Regards

    V


    DBA

Answers

    • Proposed as answer by

      Tuesday, March 22, 2016 6:51 PM

    • Marked as answer by
      Lydia ZhangMicrosoft contingent staff
      Thursday, March 31, 2016 7:02 AM
  • Windows authentication or SQL authentication?

    The message as such is the standard message when the instance cannot be reached. However, error 258 is unusual in this context. And it is not an SQL Server error, it’s an OS error; NET HELPMSG 258 says
    The wait operation timed out.

    This could possibly indicate that you are arriving somewhere, but no one is actually listening. That is, the port is open but the process is busy with something else. (And that is necessarily not an SQL Server process.)

    Try connecting by IP-address and port number in case there is some DNS problem.

    • Proposed as answer by
      Naomi N
      Wednesday, March 23, 2016 10:20 PM
    • Marked as answer by
      Lydia ZhangMicrosoft contingent staff
      Thursday, March 31, 2016 7:02 AM

September 1, 2015 by Sameer

Possible Root Cause: Unstable Network connectivity to database server or problems with a server in the route

Steps Taken To Confirm Root Cause: 

Setup traceroute at regular intervals using the batch file below

@ECHO OFF

set SERVER=DBServerName.domainname.com

set INTERVAL=60

:TRACEINTERVAL

tracert %SERVER% >> C:\DBServerNametracert.txt

timeout %INTERVAL%

GOTO TRACEINTERVAL

In my case, no issues were found, was able to connect to DBServerName continously. This would indicate there are no network connectivity issues.


Possible Root Cause: Issues connecting to Active Directory Server

Steps Taken To Confirm Root Cause: Tried connecting via a SQL id using SSMS & SQLCMD encountered the same issue.


Possible Root Cause: DNS Problems

Steps Taken To Confirm Root Cause: Tried connecting via IP, still encountered the same issue


Possible Root Cause: Issues connectiving via IPv4 or IPv6 address

Steps Taken To Confirm Root Cause:

Checked TCP/IP properties in configuration manager on database server; server was listening to all IP’s.

Tried connecting manually using the IPv4 addresses as well as IPv6 addresses; Encountered the same error in both, so issue was not related to this cause.

C:\Users\sameer\Desktop>sqlcmd -S DBServerName.domainname.com -E

Sqlcmd: Error: Microsoft SQL Server Native Client 11.0 : TCP Provider: Timeout error [258].

Sqlcmd: Error: Microsoft SQL Server Native Client 11.0 : Login timeout expired.

Sqlcmd: Error: Microsoft SQL Server Native Client 11.0 : Unable to complete login process due to delay in prelogin response.

C:\Users\sameer\Desktop>sqlcmd -S fe40::d0f8:6600:8b2:625b%14 -E

Sqlcmd: Error: Microsoft SQL Server Native Client 11.0 : Named Pipes Provider: Could not open a connection to SQL Server [53]. .

Sqlcmd: Error: Microsoft SQL Server Native Client 11.0 : Login timeout expired.

Sqlcmd: Error: Microsoft SQL Server Native Client 11.0 : 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.


Possible Root Cause: TCP/IP Port Exhaustion

Steps Taken To Confirm Root Cause:n netstat -ao on the database server while connecting to it from a client server. Consistently observed a TCP connection was being established between both servers, even when the SQL error message was occuring. This means the TCP connection is fine, and there is no TCP/IP port exhaustion.


 Possible Root Cause: Resource Constraints on DBServerName server can cause login denials

Steps Taken To Confirm Root Cause:Checked RAM, CPU usage on the database server; CPU was under 10% and RAM was around 60%


Possible Root Cause: AntiVirus software running on database server

Steps Taken To Confirm Root Cause:

Trend Micro was running on the database server. Removing this fixed the issue

Asked

Viewed
14k times

Can’t connect to a sql server instance over the network, and all SSMS gives me is a 258 error.

Everything is supposed to be correct.

  1. Both machines are inside a domain and the user was added to the
    security\logins during installation.
  2. Server Authentication is set to «SQL Server and Windows Authentication mode»
  3. Firewall has the following ports open: 1433, 1434, 4022, 135, 2383, & 2382 TCP, and 1434, & 1433 UDP.
  4. Both «SQL Server (INSTANCE)» and «SQL Server Browser» services are running.
  5. «Allow remote connections to this server» is enabled.
  6. TCP/IP is enabled in Protocols for INSTANCE.

Am I missing something? I am double checking the configuration in other servers inside the network and there doesn’t seem to be anything missing.

asked Oct 4, 2021 at 21:45

thexbuttonisntworking's user avatar

I managed to get it working. Named instances use dynamic ports by default. I needed to change the firewall rule so that it allows traffic for the program instead of specifying the actual ports.

answered Oct 5, 2021 at 17:44

thexbuttonisntworking's user avatar

You must log in to answer this question.

Not the answer you’re looking for? Browse other questions tagged

.

Понравилась статья? Поделить с друзьями:
  • Sql ошибка 2003
  • Sqlyog ошибка 2058
  • Sql ошибка 1950
  • Squad ошибка видеопамяти
  • Squad ошибка 33м