Unable to migrate MSSQL database: MSSQL database 'db_name' does not exist on target. Its content will not be copied

Created:

2017-03-17 17:58:26 UTC

Modified:

2017-08-16 16:16:42 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Unable to migrate MSSQL database: MSSQL database 'db_name' does not exist on target. Its content will not be copied

Applicable to:

  • Plesk for Windows

Symptoms

  • There are several instances of Microsoft SQL Server running on destination server.

  • While performing migration database is not created on destination server.

  • The following message is shown is Plesk Migrator interface:

    Failed to perform an action on subscription 'example.com': MSSQL database 'db_name' does not exist on target. Its content will not be copied.
    
  • The following messages are present in debug.log :

    [2017-03-13 12:20:05][INFO] [example.com] Deploy databases
    [2017-03-13 12:20:06][INFO] [example.com] Database db_name' already exists, so skip it
    [2017-03-13 12:20:06][INFO] [example.com] Deploy database users
    [2017-03-13 12:20:07][INFO] [example.com] Database user 'db_name' already exists, so skip it
    Copy databases will failed because target database does not exist:
    [2017-03-13 12:20:54][INFO] [example.com] Copy databases
    [2017-03-13 12:20:54][ERROR] [example.com] Failed to perform an action on subscription 'example.com': MSSQL database 'helpnet_' does not exist on target. Its content will not be copied.
    Additional Plesk restore problems:
    |- warning: Plesk restore report problem:
    |  
    |  Execution of "C:\Program Files (x86)\Plesk\admin/bin/backup_restore_helper" --restore-database example.com -ignore-nonexistent-options failed with return code 1.
    |  Stdin is
    |  <?xml version="1.0"?>
    |  <database-info><database type="mssql" id="35" name="db_name" deployer-action="update">
    |          <db-server type="mssql">
    |            <host>localhost\MSSQLSERVER2016</host>
    |            <port/>
    |          </db-server>
    |          <dbuser default="true" role="readWrite" id="36" name="db_name" deployer-action="update">
    |            <password type="sym">password</password>
    |          </dbuser>
    |          <related-sites/>
    |        </database></database-info>
    |  Stderr is
    |  Database 'db_name:mssql:125:9' was not found
    `- warning: Plesk restore report problem:
    
       Execution of "C:\Program Files (x86)\Plesk\bin\database.exe" --update helpnet_ -update_user dbuser -server localhost\MSSQLSERVER2016: -type mssql -print-id -user-role readWrite -passwd "" -passwd_type sym -ignore-nonexistent-options failed with return code 1.
       Stderr is
       database does not exist
    

Cause

Database was created on the wrong instance of Microsoft SQL Server. This behavior caused by a bug with ID PMT-3541 which considered to be fixed in one of the next Plesk Migrator updates.

Resolution

As a workaround, perform the following:

  1. Remove all databases that were created on wrong instance of Microsoft SQL server.
  2. Stop migration and remove migration session.
  3. Start a new migration.
Have more questions? Submit a request
Please sign in to leave a comment.