StarDomain

Creating and Managing MSSQL Databases in Plesk

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

  1. Log in to Plesk
  2. Go to Websites & Domains > select your domain
  3. Click Databases
  4. Click Add Database
  5. 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

  1. Click OK to create the database

Managing Database Users

Adding a User

  1. Go to Databases in Plesk
  2. Click on your database name
  3. Click Add User
  4. Enter the username and password
  5. Click OK

Changing User Password

  1. Go to Databases
  2. Click the database name
  3. Click the user name
  4. Enter the new password
  5. 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

  1. Go to Databases > select your database
  2. Click Import Dump
  3. Upload your .sql or .bak file
  4. Click OK

Via SQL Server Management Studio (SSMS)

If you have remote access:

  1. Connect to the server
  2. Right-click the database > Tasks > Import Data
  3. Follow the wizard

Exporting Data

  1. Go to Databases > select your database
  2. Click Export Dump
  3. 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)

Need help? Contact our support team at {{SUPPORT_EMAIL}} or open a ticket at {{SUPPORT_URL}}.