Creating and Managing MSSQL Databases in Plesk
Microsoft SQL Server (MSSQL) is available on our Windows hosting plans. This guide covers creating, managing, and connecting to MSSQL databases through the Plesk control panel.
Creating a New MSSQL Database
- Log in to Plesk
- Go to Websites & Domains > select your domain
- Click Databases
- Click Add Database
- Configure the settings:
- Database name — Enter a descriptive name
- Database server — Select the MSSQL server
- Database user — Create a new user or select an existing one
- Password — Set a strong password
- Click OK to create the database
Managing Database Users
Adding a User
- Go to Databases in Plesk
- Click on your database name
- Click Add User
- Enter the username and password
- Click OK
Changing User Password
- Go to Databases
- Click the database name
- Click the user name
- Enter the new password
- Click OK
Connection Strings
Use these details to connect from your application:
ADO.NET (C#)
csharp
string connectionString = "Server=localhost;Database=YourDB;User Id=YourUser;Password=YourPass;";ASP.NET Web.config
xml
<connectionStrings>
<add name="DefaultConnection"
connectionString="Data Source=localhost;Initial Catalog=YourDB;User ID=YourUser;Password=YourPass"
providerName="System.Data.SqlClient" />
</connectionStrings>PHP (via sqlsrv)
php
$serverName = "localhost";
$connectionOptions = array(
"Database" => "YourDB",
"Uid" => "YourUser",
"PWD" => "YourPass"
);
$conn = sqlsrv_connect($serverName, $connectionOptions);Node.js (mssql package)
javascript
const sql = require('mssql');
const config = {
server: 'localhost',
database: 'YourDB',
user: 'YourUser',
password: 'YourPass',
options: { trustServerCertificate: true }
};Importing Data
Via Plesk
- Go to Databases > select your database
- Click Import Dump
- Upload your
.sqlor.bakfile - Click OK
Via SQL Server Management Studio (SSMS)
If you have remote access:
- Connect to the server
- Right-click the database > Tasks > Import Data
- Follow the wizard
Exporting Data
- Go to Databases > select your database
- Click Export Dump
- Choose the format and download
Database Size Limits
Database size counts toward your hosting disk quota. Monitor usage in Plesk under Databases.
Troubleshooting
Cannot Connect to Database
- Verify connection string parameters
- Check database user credentials
- Ensure the database server is running (contact support if needed)
- Check if remote connections are allowed (shared hosting typically uses localhost)
Database Full
- Check your disk quota in Plesk
- Delete old or unused data
- Optimize database by removing unnecessary tables
Permission Denied
- Ensure the database user is assigned to the correct database
- Check the user has the required permissions (db_owner for full access)
Related Articles
Need help? Contact our support team at {{SUPPORT_EMAIL}} or open a ticket at {{SUPPORT_URL}}.