How to Connect to a Microsoft SQL Server Database Using SSMS in Plesk Windows Hosting
Overview
If your website is hosted on a Windows hosting plan with Plesk and uses a Microsoft SQL Server database, you can connect to the database remotely using Microsoft SQL Server Management Studio (SSMS).
SSMS allows you to execute SQL queries, view database tables, and manage database records according to your database permissions.
Follow the steps below to connect to your database.
Step 1: Download and Install Microsoft SSMS
-
Visit the official Microsoft SQL Server Management Studio download page: https://learn.microsoft.com/en-us/ssms/install/install
-
Download the SSMS installer.
-
Run the installer and follow the installation instructions.
-
Once installed, open Microsoft SQL Server Management Studio.
Step 2: Get Your Database Connection Details
Log in to your Plesk control panel and follow these steps:
-
Navigate to Websites & Domains.
-
Click Databases.
-
Select the database you want to access.
-
Note your database name and database username.
-
Make sure you have the correct database password.
You will also need the SQL Server IP address or hostname and the port number, if applicable. These connection details may need to be obtained from your hosting provider.
Step 3: Connect to SQL Server Using SSMS
-
Open Microsoft SQL Server Management Studio.
-
In the Connect to Server window, enter the following details:
-
Server type: Database Engine
-
Server name: Enter the SQL Server IP address or hostname provided by your hosting provider.
-
Authentication: SQL Server Authentication
-
Login: Enter your database username.
-
Password: Enter your database password.
-
-
If your hosting provider has specified a custom port, enter the server address in the format
ServerIP,Port. -
Click Connect.
If the connection is successful, the connected SQL Server will appear in Object Explorer.
Step 4: Select Your Database
-
Expand the connected server in Object Explorer.
-
Expand Databases.
-
Locate your database and select it.
-
Right-click the database and select New Query.
You can now enter and execute SQL queries against your database.
Step 5: Run SQL Queries
To verify the selected database, execute the following query:
SELECT DB_NAME() AS CurrentDatabase;
To list the available tables in the current database, execute:
SELECT TABLE_SCHEMA, TABLE_NAME
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_TYPE = 'BASE TABLE'
ORDER BY TABLE_SCHEMA, TABLE_NAME;
Click Execute or press F5 to run the query. The results will appear in the Results panel.
You can execute other SQL queries as required, provided your database account has the necessary permissions.
Troubleshooting
Unable to Connect to SQL Server
If SSMS cannot establish a connection:
-
Verify the SQL Server IP address or hostname.
-
Confirm that you are using the correct port.
-
Check whether remote SQL Server connections are supported and enabled for your hosting service.
-
Ensure that the required port is allowed through the server firewall.
-
Contact technical support if remote access needs to be enabled.
Login Failed
If you receive a login failure error:
-
Verify your database username and password.
-
Ensure that the database user has the required permissions.
-
Contact technical support if you need assistance verifying your connection details.
Database Is Not Visible
If your database is not visible in Object Explorer:
-
Confirm that you are connected to the correct SQL Server.
-
Verify the database name in Plesk.
-
Ensure your database account has the required access permissions.
Connection Timeout
If the connection times out:
-
Check your internet connection.
-
Verify the server address and port.
-
Confirm whether your public IP address needs to be allowed for remote database access.
-
Contact technical support if the issue persists.
Important Notes
-
Remote SQL Server access depends on your hosting plan and server configuration.
-
The SQL Server address and port may differ from your website's IP address.
-
Not all hosting environments permit direct remote database connections.
-
Always verify your SQL queries before executing them, especially queries that modify or delete records.
-
Keep your database credentials confidential.
Conclusion
You can use Microsoft SQL Server Management Studio to connect to a supported Microsoft SQL Server database associated with your Plesk Windows hosting account and execute SQL queries remotely.
