MSSQL - Synchronizing data to a database.

This document contains information on how to transfer the structure and data of a Microsoft SQL Server database to a database on your service, from the Plesk panel or with SQL Server Management Studio.

If you have a Microsoft SQL Server database on your computer or on another server and want to transfer it to your service, you can do it in two ways: by importing a dump from Plesk, or by generating a script with SQL Server Management Studio (SSMS) and executing it on the destination database.

Before you begin: create the destination database and its user. To do this, log in to the client portal, open your service, and click Log in to Plesk. Then go to Websites & Domains → Databases.

Option 1: Import a dump from Plesk

If the database comes from another service with Plesk and you have a dump exported from that panel:

  1. In Databases, locate the destination database and click Import Dump.
  2. Choose Upload and select the dump ZIP file from your computer.
  3. If you want to replace all the content of the destination database, check Recreate the database.
  4. Click OK.

Important: with Recreate the database, the destination database is deleted and recreated with the same name, so everything it contained is lost. If it has information, first make a backup with Export Dump.

Option 2: Generate a script with SQL Server Management Studio

This is the recommended way for small or medium databases that are on your computer or on another server. To install SSMS and connect to your database, search for Management Studio in the knowledge base.

Generate the script from the source database

  1. In SSMS, connect to the server where the source database is located.
  2. In Object Explorer, right-click on the database and choose Tasks → Generate Scripts.
  3. Click Next and choose whether you want the entire database or only certain tables.
  4. In Set Scripting Options, choose Save as script file and indicate where to save the file on your computer.
  5. Click Advanced and configure:
    • Types of data to script: Schema and data, to copy the structure and data.
    • Script for server version: the destination server version. If you don't know it, ask us via a support ticket.
    • Script USE DATABASE: False, because the destination database has another name, with your account prefix.
  6. Click OK, then Next until finished, and finally Finish.

Execute the script on your service database

  1. In SSMS, connect to your destination database.
  2. In Object Explorer, select the destination database.
  3. Open the file with File → Open → File.
  4. Verify that your destination database is selected at the top in the toolbar, and click Execute.
  5. Check the Messages tab to confirm there are no errors.

Important: with large databases, the script can be very heavy and SSMS may run out of memory. In that case, generate the script in parts, selecting a few tables at a time, or ask us via a support ticket.

Common issues

  • Permissions error or database does not exist when executing the script: check that Script USE DATABASE is set to False and that your destination database is selected.
  • Syntax or unsupported function errors: the script was generated for a newer version. Regenerate it by choosing the destination server version in Script for server version.
  • Errors for objects that already exist: the destination database already has tables with the same name. Use an empty database, or make a backup and delete those tables first.
  • I cannot connect with SSMS: search for Management Studio in the knowledge base to review the connection details.
  • The database does not fit within your service space: you can upgrade it by contacting the sales department from the client portal or via the online chat.

If you need help transferring your data, open a ticket from the client portal or ask via the site's online chat.

  • sincronizar datos base de datos plesk
  • 52 Users Found This Useful
Was this answer helpful?

Related Articles

MSSQL Administration via Management Studio.

This document contains information on how to connect to your Microsoft SQL Server databases from...

Copia de bases de datos en Plesk

Este documento contiene información para copiar una base de datos completa o solo su estructura...

Database access with connection string using Plesk

This document contains information about what a connection string is and what data you need to...

Creating MySQL and MSSQL databases

This document contains information for creating MySQL or Microsoft SQL Server databases and their...

Plesk database access

This document contains information to access your MySQL or Microsoft SQL Server databases from...