Unable to migrate MSSQL database: Failed to copy content of database 'dbname_'

Created:

2017-03-11 18:52:35 UTC

Modified:

2017-08-17 15:09:27 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Unable to migrate MSSQL database: Failed to copy content of database 'dbname_'

Applicable to:

  • Plesk for Windows

Note: This article has the reference to the issue with the fix available:

  • #PMT-3547 "Microsoft SQL Server databases could not be migrated if the Microsoft SQL Server instance on the source server was configured to use a nonstandard port."
    Fixed in:
Please consider updating your server:

Symptoms

Plesk Migrator shows the following error:

Failed to copy content of database 'dbname_' Migration tools tried to perform operation in 3 attempts: Failed to execute SQL query: Net-Lib error during Unknown error Query: BACKUP DATABASE [helpnet_] TO DISK=%(file)s Arguments: {'file': 'C:\\migrator\\mssql-dumps\\db_backup_example.com_examplecom_.sql'}

Or

[Migration] Failed to copy content of database 'dbname_' 
Migration tools tried to perform operation in 3 attempts: Failed to execute SQL query: Connection to the database failed for an unknown reason.
Query: BACKUP DATABASE [dbname_] TO DISK=%(file)s
Arguments: {'file': u'C:\\migrator\\mssql-dumps\\db_backup_example.com_dbname_.sql'}
Server: 127.0.0.1\SQLExpress,1435
User: sa
Tried to connect from: 203.0.113.2

Check that:
1) MSSQL server is running.
2) SQL server browser is running.
3) You can connect to the SQL server with MSSQL Management Studio
(from the server from which migrator tried to connect to the server).
4) Database (if specified) exists on the server.
5) Database user (if specified) can login to the server.
6) There are no firewall rules that could break connection.
7) SQL query is valid.

Also, migrator's debug log shows the following message:

MSSQL database 'dbname_' does not exist on target. Its content will not be copied.

Subscription is migrated incompletely. MS SQL database has been not migrated.

On the source server, MS SQL default port 1433 has been changed to a custom value.

Cause

This is Plesk bug with ID #PMT-3547 which was fixed in Plesk Migrator 2.7 .

Resolution

Plesk Migrator is updated automatically, no special actions are required.

In case the Plesk Migrator is updated but the issue persists, apply a workaround:

  • Move MSSQL server to default port 1433 at the Plesk > Tools & Settings > Database Servers .

or

  • Identify Server ID of the affected MS SQL server at the psa.databaseservers table. Specify MS SQL server port at the SQL server host name in psa.databaseservers table on the source server:

  mysql> update databaseservers set host ='localhost,1435' where id = Server ID
 

Then restart the migration.

Have more questions? Submit a request
Please sign in to leave a comment.