microsoft / azuredatastudio

Azure Data Studio is a data management and development tool with connectivity to popular cloud and on-premises databases. Azure Data Studio supports Windows, macOS, and Linux, with immediate capability to connect to Azure SQL and SQL Server. Browse the extension library for more database support options including MySQL, PostgreSQL, and MongoDB.
https://learn.microsoft.com/sql/azure-data-studio
MIT License
7.54k stars 898 forks source link

Restoring more than one database without restarting ADS is not possible #6587

Open peterlukerow opened 5 years ago

peterlukerow commented 5 years ago

Issue Type: Bug

Steps to reproduce:

  1. Start ADS
  2. Restore a database from a backup file that you select, note the data and log files on the files tab are correct.
  3. Start restore process for another database from a backup file that you select, BUG - the data and log files still show the same values as the earlier restore. The UI does not provide away to change data or log files like SSMS does and thus you have to close/reopen ADS or just use SSMS

Azure Data Studio version: azuredatastudio 1.9.0 (78a42e1d112ae3231777722b51eaf44f83ddbe55, 2019-07-10T04:31:36.998Z) OS version: Windows_NT x64 10.0.18362

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz (12 x 3192)| |GPU Status|2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: enabled
surface_synchronization: enabled_on
video_decode: enabled
webgl: enabled
webgl2: enabled| |Load (avg)|undefined| |Memory (System)|15.81GB (5.03GB free)| |Process Argv|| |Screen Reader|no| |VM|0%|
Extensions (6) Extension|Author (truncated)|Version ---|---|--- ssmskeymap|kev|1.1.0 admin-pack|Mic|0.0.2 agent|Mic|0.41.0 import|Mic|0.9.0 profiler|Mic|0.9.0 server-report|Mic|0.1.5
adsbot[bot] commented 5 years ago

Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

udeeshagautam commented 5 years ago

For reference this issues talks about these files on Restore Dialog--> file Tab image

peterlukerow commented 5 years ago

To be clear @udeeshagautam in your screenshot it's the column "Restore as" that is wrong and the UI doesn't let you change. The original file name will often not be correct, for example, when you are restoring a backup that was created on a different server.

udeeshagautam commented 5 years ago

@peterlukerow thanks for the clarification. So there are two issues if I am understanding correctly,

a. When you restore once from file/database X - the subsequent restores from database/file Y continues to show file info for X. b. There is no manual way to edit the Restore as file path.

I initally thought of this bug reffering to issue #a. Please let us know if #b is the actual issue that you would like fixed. Please correct me if I am missing something.

peterlukerow commented 5 years ago

@udeeshagautam The problem is both (a) and (b). a) should obviously never happen and b) is a clear oversight in the UI

If you had to prioritise fixing (a) or (b) then fixing (b) first would be best because you can workaround (a) if (b) is fixed whilst at the same time it gives you the option to rename the data/log file you are restoring to if you want to.

udeeshagautam commented 5 years ago

Thanks for the details. We will work on this. Meanwhile, hopefully the following workarounds help,

1) The issue (a) is fixed in latest insider builds. With this - changing the destination database name should update the restore as file name to same name as destination database.

2) To unblock the scenario a possible workaround is to update the restore as file name is to use Script option (in place of Restore), update the file name in the script and run the script.

peterlukerow commented 5 years ago

@udeeshagautam - it's good to hear that part of the issues are fixed. For (b) I just used SSMS as it's quicker.