Restoring SQL Database issue

Cai-Aaron Wing 1 Reputation point
2021-10-27T12:50:31.687+00:00

Hi There,
I am having an issue with restoring a database over another database. So our setup is that we have clients, and they have a live database and a test database. Occasionally we will need to copy the live one over the top of the test one. When trying to restore the live over test, we always will have to head to the files tab, and re-allocate the files. However it is only with one specific database which this happens with. I have identified that the issue is with the live database, however I can't work out how to fix it? Any advice would be appreciated.

Example of issue
144196-how-it-acts.png

Example of how it should be with a different database
144180-how-it-should-act.png

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,708 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Tom Phillips 17,716 Reputation points
    2021-10-27T18:40:51.013+00:00

    The screen shots are just of the file named which were backed up. There is nothing to "fix" for the file names in the backup.

    0 comments No comments

  2. Erland Sommarskog 101K Reputation points MVP
    2021-10-27T21:55:37.697+00:00

    Rather than using the UI, use the RESTORE command directly. The form is

    ´´
    RESTORE DATABASE db FROM DISK = '<backuppath>
    WITH MOVE '<logicalname1>' TO PATH = '<path1>',
    MOVE '<logicalname2>' TO PATH = '<path2>',
    MOVE '<logicalname3>' TO PATH = '<path3>'

    You do this once and save the script.
    
    0 comments No comments

  3. AmeliaGu-MSFT 13,961 Reputation points Microsoft Vendor
    2021-10-28T03:11:43.663+00:00

    Hi CaiAaronWing-1844,

    Welcome to Microsoft Q&A.
    Could you please check and make sure the following two important potions in Restore database page-> Options tag are unchecked?

    144382-image.png

    In my little test, once these two options are unchecked, we can restore database over another database successfully.

    Best Regards,
    Amelia


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments