Restoring a database in Microsoft SQL Server
Unfortunately restoring a .BAK directly to the server is not supported (primarily due to security). However, you can still export and import your database using the Generate Scripts option in SQL Management Studio.
By default, Generate Scripts does not export the data, just the database schema. However, the data, triggers and methods can all be exported during the Set Scripting Options stage.
- Right click the database which is to be exported and navigate to Task -> Generate Scripts in SQL Management Studio
- Click Next until at the Set Scripting Options
- Click the Advanced button
Set the following options:
Types of data to script: Schema and data
Script triggers: True
- Click OK and then Next to run the task
This will generate a usable SQL file which then be executed on our server using SQL Management Studio. In order to connect to our server using SQL Management Studio, you'll simply need to connect to your server's hostname (or IP address) with a MSSQL username and password that you've created within Plesk or Enkompass.