SQL import is changing name of the .mdf file for the existing database

Discussion in 'Plesk Automation Suggestions and Feedback' started by astearns64, Jun 29, 2016.

Thread Status:
Not open for further replies.
  1. astearns64

    astearns64 Bit Poster

    When exporting a database with Plesk and then importing it to a new database, for some reason the .mdf and log file names for the new database are being changed. For example:

    1) I created two empty databases .... test_db and test_db2.

    2) I confirmed that the following two .mdf files were created:

    C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\test_db
    C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\test_db2

    3) I exported the test_db using Plesk.

    4) I then imported that file to the test_db2 database and found that the name of the mdf file for the test_db2 changed to the following:

    C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\test_db2_test_db_3e7101bb90b04fc9a84c431d386beba4


    Why is this happening, is there a setting somewhere that can change this behaviour?

    NOTE: I fully understand that there is a "copy" option within plesk which can be used to accomplish the same thing without modifying mdf file names, but in some cases when a database contains fields with large amounts of data the "copy" (or clone) option fails to work.

  2. dkolvakh

    dkolvakh Odin Team

Thread Status:
Not open for further replies.

Share This Page