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 899 forks source link

Selecting create alter script on sproc produces output from incorrect database #9786

Open rexxmagnus opened 4 years ago

rexxmagnus commented 4 years ago

Issue Type: Bug

I have multiple databases on the same server with the same structure. Selecting a stored procedure in one of the databases and choosing script as alter results in the alter script being for a different database ie, if I have a prelive database and want to get the alter script for a sproc there to run on the live database in order to update it, it might result in the alter script actually being one for the live database with the old procedure.

Azure Data Studio version: azuredatastudio 1.16.1 (16801c522df68e63218b39ccb5b4a7431f9bf667, 2020-03-23T22:08:06.892Z) OS version: Windows_NT x64 10.0.18363

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i5-4570 CPU @ 3.20GHz (4 x 3193)| |GPU Status|2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off_ok
webgl: enabled
webgl2: enabled| |Load (avg)|undefined| |Memory (System)|11.94GB (3.72GB free)| |Process Argv|| |Screen Reader|no| |VM|0%|
Extensions (6) Extension|Author (truncated)|Version ---|---|--- admin-pack|Mic|0.0.2 agent|Mic|0.46.0 dacpac|Mic|1.3.0 import|Mic|0.14.0 profiler|Mic|0.11.0 schema-compare|Mic|1.3.0
adsbot[bot] commented 4 years ago

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