MS SQL databases in Plesk
Windows hosting offers Microsoft SQL Server databases in several versions. Each version is a separate server instance: MSSQLSERVER2012, MSSQLSERVER2014, MSSQLSERVER2016, MSSQLSERVER2017, MSSQLSERVER2019, MSSQLSERVER2022.
Creating a database
- Open Databases and click Add Database (more on creating a database).
- In the Database server list, choose the MS SQL instance. The default for MS SQL is 2012 — new projects usually use MSSQLSERVER2022.
- Set the database name, user name and password.
- Click Create Database.

The instance is chosen when you create the database. Remember which one you chose: you need it in the connection string.
Connection string
In the database card, click Connection info. The panel shows Host as .\MSSQLSERVER2022:0, plus the database name and user name.

In your site code, specify the server as localhost\<instance name> — the instance you chose:
Server=localhost\MSSQLSERVER2022;Database=client01_app;User Id=appuser;Password=YourPassword;TrustServerCertificate=True;If you use plain Server=localhost, the connection goes to the 2012 instance, where your database does not exist, and you get Login failed for user (18456).
TrustServerCertificate=True is needed by newer versions of the Microsoft.Data.SqlClient driver, which encrypt the connection and validate the certificate by default.
Managing the database
There is no web admin tool for MS SQL in the panel. The database card offers Export dump, Import dump and Copy database (export and import). To work with tables and queries, use SQL Server Management Studio on your computer: in Server name, enter the server address from the hosting welcome email or from the panel, followed by a backslash and the instance, for example server_address\MSSQLSERVER2022. Authentication — SQL Server Authentication with the database user's login and password.
