Cannot connect to SQL Server From Clients in LAN - sql-server

Yesterday I had no problems. Now when any client (even MSSMS from a client machine) tries to access sql server located on a server in the domain I get the following error: TITLE: Connect to Server
Cannot connect to SERVER\Instance
A network-related or instance-specific error occurred while establishing a connection to SQL Server. ...
SQL server is 2014 on a Windows 2012 R2 Server which also hosts the Active Directory.
I can connect using MSSMS from the server itself to the database. The log states that the service started and is listening on port 63782. I can also connect to sql server from the host machine using ip:port (192.168.0.2, 63782). But I cannot connect to it this way from the clients. (I made no changes to the firewall and the rule for lan-lan is allow all services and all connections).
Shared Memory, TCP/IP and Named Pipes are enabled on the sql server configuration Manager.
I can ping to the server from the clients and to the clients from the server.
The main difference between yesterday and today is that I had to reinstall the DNS on the server. The DNS appears to be working very well and I can't find any DNS errors on the server. I don't think its the firewall but I added two rules that allow UDP and TCP specifically within the local network (even though there is a policy which allows all traffic within the local network).
I am at a loss and would appreciate some assistance into solving the problem or even where to look.

Related

Connecting to Azure DB from SQL management studio is failing MSSQLSERVER_10060

I'm trying to connect to the sql server that has been created on Azure using SQL management studio, but i'm getting the following error.
Error message: An error has occurred while establishing a connection to the server. When connecting to SQL Server, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: TCP Provider, error: 0 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.) (Microsoft SQL Server, Error: 10060)
I have enabled the client IP in the SQL server firewall settings.
Please let me know if anything else need to be taken cared. Thank you
To resolve this error, try one of the following actions:
Make sure that you have configured the firewall on the computer to allow this instance of SQL Server to accept connections. That is, If you are trying to connect from within a corporate network, outbound traffic over port 1433 may not be allowed by your network's firewall. If so, you cannot connect to your Azure SQL Database server unless your IT department opens port 1433. On the Azure Side, you also need to check if the NSG (associated with that subnet the Azure SQL server sitting in) allows the client IP with the specific port 1433.
Add the client IP in the SQL server firewall settings if you enable a server-level firewall.
Telnet the current IP of your Azure SQL Database server with the port to verify the network connection.
Ensure the server name you are connecting to is correct.
Check that your own firewall allows your connection across the internet to the instance.
Typically if it was the Azure firewall side, it would prompt you to add your IP to the firewall rules, provided you're connecting with an admin account.
This cause by network restriction in your lan. you can try by switching your network connnection. It worked for me.

Can't access SQL Server Instance

i moved my website on a server, it have installed web application and SQL server instance (this site is only for private network), if i try to access sql instance from SSMS it connect without problem, but when i try to access data from my website or SSMS installed on another pc connected to the same network it's says me that instance name is not correct or firewall block sql server ports. Sql connection string is correct, both SQL Server and SQL Browser services are active, named pipes and TCP are enabled, and i've added rules to firewall to allow connection from port 1433 and 1434(this one is for UDP) but i've the same problem, any help?

IIS can't connect to SQL Server using SQL Server authentication

I have a very strange problem that I have tried to figure out for some time now but unsuccessfully. At work I am using a laptop for development. We have our application run locally on each developer's laptop, but we all use the same dev database. So when I take my work laptop home and connect it to our vpn, my laptop's IIS connects to SQL Server and everything works just fine.
The problem is when I try to use my personal desktop for work I connect it to the same vpn I connect my laptop to run the same code that is on the laptop with the same connection strings, but IIS can't connect to SQL Server and I get this error:
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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
On both computers I am able to connect to SQL Server using SSMS with no problem. On both computers I can run Integration Tests that hit the database just fine (integration tests use the exact same connection string that the application is using), but if I try to run the application it can't connect. I have tried changing all sorts of settings in IIS but to no avail.
Thanks for your help in advance.
Make sure SQL Server Service is running
If a named instance, make sure SQL Server browser service is running
Make sure SQL Server is configured to allow remote connections
Examine the SQL Server error log for messages confirming that SQL is listening on the expected network interfaces and ports
Test server connectivity with PING from the client machine
Test port connectivity using TELNET or PowerShell to the server and port (from step 4) from the client machine. For example
a. TELNET 1433
b. PowerShell: 1433 | % { echo ((new-object Net.Sockets.TcpClient).Connect("YourServerName",$)) "server listening on TCP port $" }
Check firewall settings if step 5 or 6 connectivity test fails

Connecting to SQL Server from a different network

I recently set up SQL Server locally and have followed the numerous guidelines on this website and others to connect to it from a different network:
Connect to MS SQL Server 2014 from a computer on a different network
Connect to MS SQL Server 2014 from a computer on a different network
Firewall rules to allow remote connection to SQL Server in a different domain
How to use SQL server from a different network
This is what I have tried so far:
Ports 1433 and 1434 have been enabled in SQL Server Config Manager
Based on these suggestions in the links above, I have added inbound rules to my firewall to create exceptions for SQL Server and its associated ports (Ports: 1433 & 1434).
When I try using telnet to connect, I get the following:
Connection closed by remote host
When I try checking the status of my port from the following website:
http://ping.eu/port-chk/
It indicates that my port is closed (both 1433 & 1434).
When I try connecting from a different machine on the same network, I am able to do so without issue.
I do not understand what other layer of protection exists that is blocking connections to my local version of SQL Server.
Any guidance is greatly appreciated.
Thanks.

SQL Server 2005 Remote Connection ( Over Internet )

I have installed SQL Server 2005 in mixed mode.
I am able to connect to Database "locally" i.e.
(Server-name/Instance or internal-ip/Instance) using both kinds of Authentication.
I have configured SQL Server for remote connection by following below steps
Steps:
Enable remote connections on the instance of SQL Server that you want to connect to from a remote computer.
Turn on the SQL Server Browser service.
Configure the firewall to allow network traffic that is related to SQL Server and to the SQL Server Browser service. Ref: http://support.microsoft.com/kb/914277#method3
In addition, I have turned off my firewall.
I am able to ping my computer through the External IP.
But when it comes to connecting to sql server, its giving the error.
"TITLE: Connect to Server
Cannot connect to <ip address>\SQLEXPRESS.
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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (Microsoft SQL Server, Error: -1)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=-1&LinkId=20476
Please help me,
I have referred many article and tested all possible solution, but nothing seems to be working for me.
It turned out to be an issue with Port Forwarding from my Modem/Router to respective Machine IP.
To resolve this issue, I just configured my Router so that it can accept the request on some specific port [External IP:port_number] and then map that request to my machine's [Internal IP:port_number] as multiple computers were connected to a single router.
Also, please make sure that Firewall on your server is configured correctly to accept the inbound network traffic on that specific port.

Resources