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

Can't enter a .bak file name when doing a backup. #6969

Open peterlukerow opened 5 years ago

peterlukerow commented 5 years ago

Issue Type: Bug

Steps to reproduce:

  1. Right click a DB in the server explorer pane and choose backup
  2. By default the backup name is generated as the DB name followed by -- and the current date and time. Similarly in the backup files list a absolutely path has been added in the default backup location using the backup name as the backup file name.
  3. Click the [-] button to remove the backup file that was auto added to the list.
  4. Click the [+] button to add a backup file - BUG! You are forced to choose a file, but if this is the first time you've backed up this database there is not existing file to pick. The only choices available to you are to select a folder!

Not sure how something this trivial was missed during initial implementation of ADS.

Azure Data Studio version: azuredatastudio 1.10.0 (5fdb967ffcea41df0335ec17cfa396a694bb174e, 2019-08-14T18:28:10.311Z) 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
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: enabled
skia_deferred_display_list: disabled_off
skia_renderer: disabled_off
surface_synchronization: enabled_on
video_decode: enabled
viz_display_compositor: disabled_off
webgl: enabled
webgl2: enabled| |Load (avg)|undefined| |Memory (System)|15.81GB (3.39GB 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:

erinstellato-ms commented 2 years ago

@peterlukerow Hi there - I was re-testing this in ADS 1.34 and have confirmed that you can now remove the default entry provided for a backup file name, and then manually type in a filename for the new backup. Can you please confirm you now see this same behavior? Thank you!

peterlukerow commented 2 years ago

@erinstellato-ms I do see the same behavior, maybe it was like this all along.

The UI is a little misleading in that you click button to add file and you get a tree view. Like I said if you have never backed up the database in question there is no existing file. Under the tree view is a textbox labelled "selected path", which implies this is the folder to put the file in. It seems like there should be a separate textbox for the filename or "Selected path" is changed to "Filename".

erinstellato-ms commented 2 years ago

@peterlukerow Thanks for taking the time to explain the issue, I didn't understand it initially, but I was able to step through and I think I see the challenge. For my own reference in the future:

  1. Create a new database.
  2. Backup the database in ADS.
  3. Remove the default backup file (via the - icon).
  4. Use the + icon to add a new file.
  5. The Selected path dialog defaults to the default backup folder for the instance, but the filename is not populated.
  6. Further, if you select discard and then Cancel out of the backup window, and then try to backup the database again, the defaults are populated again for the path and filename, but the remove button ( - icon) is grayed out, and you cannot change the path or file name. (If you add another filename, then the remove button becomes accessible.)
  7. Lastly, if you cancel out of the backup dialog and then try to drop the database, you cannot. A shared database lock exists for the database (can be seen by running DROP DATABASE and then querying sys.dm_exec_requests while it's trying to complete)