Feature Request - Prevention of unwanted executions

Today i managed to run the wrong scripts (which i used previous day for testing environment) on the live environment.
Fortunatelly i just truncated 4 tables instead of much more. Of course this was a dumb action, but it took me just a few clicks, like you can see in the exact description:

Previous day:
  1. Prepare test environment with truncate + fill script (several connected to that project) but only 1 was checked in the script list. 
  2. Tested, everything was fine.
Today:
  1. Nothing related to the previous task, opened multi script, selected a different script from list and changed content
  2. Changed distribution list to live environment
  3. Hit F5 on Keyboard and mess was done, because truncate script was checked, but window was a select

Solution:
I am thinking on only forgetting the checked scripts (or uncheck all of them on app close) and also mandatory select the distribution list. This makes the user more aware what he is doing.
On top i would appretiate a safety network with questions like:
  • A question like in Data Compare, like: Are you sure to run these scripts (content) on those computers (distribution list)
  • Additional i would like to see a "You are going to truncate tables / update, delete rows. Are you sure?" question on top

Compared to Data Comparer a mistake can be much more easy done and the effect is (from my POV) much more serious. With Data Compare i just "merge/sync" data, with multi script i could drop tables, views whatever...

What do you think, folks?

Answers

  • Hi @MartinT,

    I can see what you mean - when you press F5, if you are used to SSMS running the current query in the current window, that having it run only the checked items in the "Scripts to execute" list rather than the current query can be confusing.

    The only problem I can see is that this has been the behavior of SQL MultiScript for a while so changing it now will affect everyone who is used to the behavior, but perhaps, as you say, adding an optional warning for truncation or drops etc may be possible.

    I've brought this up with the team to see what they think and will update here when I have more information!

    Kind regards,
    Alex
    Product Support Engineer | Redgate Software

    Have you visited our Help Center?
  • Hi @MartinT,

    I've raised this with the team as SE-827.  It is something they are interested in doing but do not currently have the capacity to implement so it will not be in the immediate future.  Please keep an eye on the release notes and I have also added a reference to this post in that issue so there will hopefully be an update here when they are able to implement it.

    Kind regards,
    Alex
    Product Support Engineer | Redgate Software

    Have you visited our Help Center?
Sign In or Register to comment.