Home > Mobile >  Cannot connect to SQL Server remotely from Management Studio
Cannot connect to SQL Server remotely from Management Studio

Time:01-16

I have a SQL Server setup on one machine, where I have created a user and assigned a database to the user.

Now I want to access that server from client machine using management studio.

What I did:

  1. I enabled remote access from Management Studio on the server machine from server properties and set authentication mode as "Windows auth and SQL Server auth"
  2. I set TCP port as "1433" for IPAll in SQL Server Network Configuration and restarted SQL Server Services
  3. I created an inbound rule in firewall settings to accept all connections on port "1433"
  4. I added port forwarding in my router settings as follows: Router Port Forwarding (That's my private IP address in destination address)
  5. I types public IP (49.36.55.132\SQLEXPRESS) in client machine SQL Server Management Studio along with username and password with SQL Server authentication mode.

Getting this error on client machine:

Cannot connect to 49.36.55.132\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)

CodePudding user response:

Check out your port forwarding on your Server machine, you should add your port on your modem. change your port, 1433 is default port.so you need to have Dynamic Port for you service.

CodePudding user response:

First you have to completely disable firewall in server machine and check if client machine sees server. After that if it's ok, check connecting with sql server management studio from client and at last enable firewall with rules to check if error is from firewall port settings.

  •  Tags:  
  • Related