Unable to restore database in Azure Data Studio

John Kennedy 0 Reputation points
2025-07-24T11:27:45.4466667+00:00

I click on the restore database(Preview button). after spinning for a while. I get this error message: "An error occurred while opening the restore database dialog. Cannot read properties of undefined (reading 'currentValue')Screenshot 2025-07-24 at 6.26.10 AM

Screenshot 2025-07-24 at 6.25.00 AM

"

Azure Data Studio
Azure Data Studio
A cross-platform database tool for data professionals using on-premises and cloud data platforms on Windows, macOS, and Linux.
{count} votes

1 answer

Sort by: Most helpful
  1. Erland Sommarskog 124.3K Reputation points MVP Volunteer Moderator
    2025-07-24T12:42:15.2366667+00:00

    First beware that Azure Data Studio is being retired 2026-02-28. You should over to VS Code (since you are on a MacBook.)

    I see that the database is in simple recovery, so this is not a database in Azure, at least not Azure SQL Database. Thus, you cannot use the portal as Saraswathi suggested.

    Then again, you can use T-SQL. It may be as simple as this:

    RESTORE DATABASE db FROM DISK = '<pathtobackup>'
    

    But if the backup comes from another server, you may get errors on the file locations. In this case, first to:

    RESTORE FILELISTONLY FROM DISK = '<pathtobackup>'
    

    Make note of the names in the first column. For simplicity, assume that the names are db and db_log.

    Then you do:

    RESTORE DATABASE db FROM DISK = '<pathtobackup>'
    WITH MOVE 'db' TO '<newfilepath\db.mdf'>',
    MOVE 'db_log' TO '<newfilepath\db.ldf>'
    

    As for the value of newfilepath, run sp_helpdb on any of your existing databases, and use the folder that you find.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.