Applicable to:
- Plesk for Windows
Question
How to enable remote connections to MS SQL server?
Answer
-
Connect to the server via RDP.
-
Press the Start button, go to Microsoft SQL Server XXXX (where XXXX is the MSSQL version) and click the SQL Server XXX Configuration Manager.
-
Open the SQL Server Configuration Manager (Local) > SQL Server Network Configuration menu and click the Protocols for MSSQLSERVERXXXX (where XXXX is the MSSQL version).
-
Make sure that the TCP/IP protocol has the Enabled status:
-
Double-click the TCP/IP protocol, go to the IP Addresses tab, and scroll down to the IPAll section.
-
Specify 1433 in the TCP Port field (or another port if 1433 is used by another MS SQL Server) and press the OK button:
Note: the specified port, e.g, 1433, must be opened in the firewall.
If you use Microsoft SQL Server Management Studio to connect to SQL server with a custom port, you should use coma with the port for connection address like 203.0.113.2,1433. -
Go to SQL Server Configuration Manager (Local) > SQL Server Services, right-click the SQL Server (MSSQLSERVER) service and press the Restart button to apply made changes:
-
Go to Tools & Settings > Database Servers > MSSQLSERVER > Settings and click OK to reset cached connection settings.
Comments
7 comments
I'd just like to make a correction here. The simplest way to restart the service is not to switch programs. You can do it from within SQL Server Configuration Manager; just select 'SQL Server Services' from the left-most pane, then right-click the service you need to restart, and click 'Restart'. No need to go find another program (Services), locate the service in a huge list and go through its menu options to restart it.
Hello @Jason, thank you for notice.
The article will be reviewed soon.
I connected to my server via RDC, but can't open SQL Server Configuration Manager.
Error message: "An attempt was made to reference a token that does not exist.".
@Marcela Rocha Santos
Try out the solution provided on Microsoft forum:
1. Open a Command Prompt and navigate to "%WINDIR%\System32".
2. Re-register the required DLL files using the following command:
I am receiving this:
Error: database_server_error__test__connection_error
Failed to connect to the database server: SQLSTATE[08001]: [Microsoft][ODBC Driver 17 for SQL Server]TCP Provider: No connection could be made because the target machine actively refused it.
I am receiving this error;
Error: database_server_error__test__connection_error
Failed to connect to the database server: SQLSTATE[28000]: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Login failed for user 'admin'.
I am also receiving the same error, please do provide some solution
Error: database_server_error__test__connection_error
Failed to connect to the database server: SQLSTATE[28000]: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Login failed for user
Please sign in to leave a comment.