SQL Server database engine remote connection - sql-server

I have a PC with SQL Server installed.
I have created a VB.NET application to connect to SQL Server.
When I connect the SQL Server from development machine I can access the remote SQL Server database easily without any problem.
But from the client machine when I try to connect the same SQL Server I get an 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)
Firewall is disabled
TCP/IP is enabled
Port 1433 is defined in the same way as on the development PC
I have tried with Ip: port and IP only to access the remote SQL Server database server.

Related

Connect to SQL Server from another computer - SQL network-instance related issue (with error 258)

When I try to connect to SQL database from another computer using SQL Server Management Studio with Server Name [ my_ip_address,1433\MyServerName ] and SQL authentication, I get this error:
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 all of the needed steps:
Allowed remote connection in Server Properties window in SQL Management Studio
Enabled TCP/IP in SQL Configuration Manager (in SQL Server Network Configuration)
Set Inbound/Outbound enable connection (Domain, public, private) rules in Windows Firewall for ports
TCP 1433
This tuto solved the problem for me:
Allow SQL Server through Windows Firewall (
https://www.youtube.com/watch?v=3jVTUll4PXs)
I had to add the paths of the sql server and sql server browser services to the allowed apps by the firewall.

Connect to remote SQL Server - network-related or instance-specific error

I can't connect to a remote SQL Server.
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 the remote machine, the SQL Server is running and port 1433 is open.
In my Visual Studio Server Explorer, the data connection to the remote database shows a little red cross. The state is closed. - I can't see the remote pc in the server name select field. But I can successfully ping the remote computer.
How to connect to the server?
EDIT:
My connection string: {Data Source=wsbd0311\SQLEXPRESS;Initial Catalog=rms;User ID=sa;Password=mypassword} (I can login with this Id and password.)
I allready set "Allow remote connctions to this server" on the remote SQL Server.
EDIT No.2:
Do I need to have an open port 1434 on the remote SQL Server?
Make sure the server is running on the remote pc. Connect to the remote pc and check whether the SQL server instance is running on it by All Programs -> SQL Server -> SQL Server Configuration Manager -> Under SQL Server Services check whether the SQL Server service is on running state. If not try starting the service and connecting.
Furthermore Enable TCP/IP under the Protocols for MS SQL Server which comes under SQL Server Network Configuration.
You may be able to ping the server if the machine is turned on, but in order to connect to the SQL server instance, you should make sure that the SQL server is up and running on the server machine. Check this link for more details
How to Start, stop or restart SQL Server Instance

SQL Server 2008 R2 remote connection error

I am getting an error while trying to connect to SQL Server with public IP.
I tried many things Adding port 1433in firewall but still it is showing the below error.
TITLE: Connect to Server
Cannot connect to XXX.xxx.xx.xx ,1433.
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 - No connection could be made because the target machine actively refused it.) (Microsoft SQL Server, Error: 10061)
No connection could be made because the target machine actively refused it

Fail to connect to a remote SQL server with SQL Server 2008 Management Studio

I'm trying to connect to a remote database with SQL Server 2008 Management Studio. I got the following 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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Erreur : 53)
I think that I have wrong with my config:
Can someone help me please ?
Steps to find out what the reason is:
Does the SQL server allow remote connections? Main settings SQL Server
Is TCP/IP enabled for client connections and listen on correct IP address / NIC?
Does the firewall on the server allow incoming traffic for the SQL Server port (default 1433)
It is normally one of the 3 points above.

Connecting to SQL server on the same machine using the server's IP

I am using SQL SERVER 2012. I have set up my web server and SQL SERVER. Remote connections (using the server IP address) from other machines are working perfectly.
When I connect to SQL server on the same server using localhost, internal ip and machine name, these are all working flawlessly.
However, when I try to make a connection to SQL server on the same server, and using the server's IP as the server name, I get the following 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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 53)"
What can be the reason for this?
Are there any settings that can be changed in order for this to work?
Thank you.

Resources