question

HaniMansour-0890 avatar image
0 Votes"
HaniMansour-0890 asked XinGuo-MSFT commented

SQL Server never login remotely

Hi There,

I have a problem where i installed my SQL Server but wanted to access it remotely using SMO and VB.NET. I did all the necessary steps to have the server available remotely, I added the inbound rules and it is showing to the other devices on the network but, the problem is that, When I come to login with the login and password of the remote server, an error appears saying: "Cannot connect to "Server Name""!

The problem appears when I try to login with both of Windows and SQL Server Authentication!

Can anyone help me on this please?

Thanks in advance,
Hani Mansour

msc-service-manager
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

XinGuo-MSFT avatar image
0 Votes"
XinGuo-MSFT answered XinGuo-MSFT commented

Hi,

Please try the following steps

  • Windows Firewall ->Advanced Settings->Inbound Rules

Add a rule to enable TCP port 1433 (default port for SQL Server)

Read this article for details: Configure the Windows Firewall to Allow SQL Server Access

  • Run SSMS (SQL Server Management Studio) on SQL Server machine

Server Properties -> Security -> SQL Server and Windows Authentication mode (Enable)


  • Enable SQL Service to listen on TCP/IP

Check SQL Server version and run appropriate version of SQL Configuration Manager to enable TCP.

Enable Remote Connections to SQL Server using IP address

Note: Microsoft provides third-party contact information to help you find technical support. This contact information may change without notice. Microsoft does not guarantee the accuracy of this third-party contact information.


· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi,

I tried all the steps that you kindly pointed to but, Still I cant have my SQL Server available remotely.

If necessary, I can allow you to remotely connect to my computer and do the necessary actions, because, I am developing an application and I really need the other devices to access my central database remotely!

BTW, I am using MICROSOFT SQL SERVER 2012 ENTERPRISE CORE.

Thanks,
Hani

0 Votes 0 ·

Well, It worked now! My Antivirus firewall was blocking the incoming connections and I dealt with that issue!

Thanks XinGuo, I received a great support from you especially the information you provided about the UDL, A brilliant solution from Microsoft!
Hani

0 Votes 0 ·

Glad to hear that and thanks for your feedback.

Have a nice day.

1 Vote 1 ·
XinGuo-MSFT avatar image
0 Votes"
XinGuo-MSFT answered HaniMansour-0890 edited

Hi,

Here is a simple ways to test SQL connectivity.

Create a simple text file, rename the extension from TXT to UDL.

Double-click on the .UDL file and type the hostname or IP of your SQL server, then select a user account with permission to the SQL server and select a database. Then click on “Test Connection”.

udl4.png


· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks XinGuo,

Will that way work even if SQL server is not installed on the tested machine? because, I tried it on my other laptop which has no SQL servers are installed on it and no remote servers were listed!

There must be something wrong because, The server is listed on some devices but it is inaccessible!

Is there anything that I can do to solve this issue please?

Thank you,
Hani

0 Votes 0 ·

Hello XinGuo,

Well, Still the remote server is not visible even after using the UDL or installed the OLE DB Driver for SQL Server!

Could you please advise on how to make my SQL Server available for remote access over the network please?

Thanks,
Hani

0 Votes 0 ·