Install SQL Scripts via GUI Wizard

  • Hallo all!

    My problem is this:

    I have quite a bunch of TSQL scripts to install several tables, procedures, jobs, etc. into SQL databases.

    Depending on the local system, some changes (e.g. parameters) have to be made in those scripts.

    So far, each script has to be installed manually one by one, which is quite annoying.

    So I'm looking for a way, to install those scripts with some kind of "GUI Installation Wizard" to simply click through the process - browse for SQL Servers, select database, chosse features to install, maybe add/change some parameter ... aaaaand Go!

    I already looked into "Advanced Installer", but obviously I'm unable to handle this ...

    Any advice/recommendation, to get this done? Or maybe a template for "Advancerd Installer" I could use? Anything?

    Thanks a lot in advance!

    PS: DACPAC is not an option, neither is PowerShell

    Love, Science & Rock 'n Roll

  • have a look at SQLCMD !

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data and code to get the best help

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Who am I ? Sometimes this is me but most of the time this is me

  • A GUI sems like a good approach until you have to build one lol.  What about a stored procedure to generate the scripts?  Step 1: tokenize the parameters in the scripts.  Step 2: document and store the input tokens in a JSON document or db table.  Step 3: create a stored procedure that accepts a JSON array of the parameters.  You get the idea...  Parse the input JSON, generate the scripts, and log the results/outputs to a table.  Not pretty to look at but the PITA factor is a lot less 🙂

    I've never messed around with SQLCMD.  There are two slightly different versions of it which seems annoying to me.  But afaik it could be a better solution to parameterize and run scripts

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Thank you very much for your response!

    No, SQLCMD is definitely not an option. But I like the approach with JSON/SP!

    Though, still not a convenient GUI-Wizard but as you say, a way less "PITA factor" 😉

    I'll look into this ...

    Again, thanks a lot!

    Love, Science & Rock 'n Roll

  • just wondering: why is sqlcmd not an option ?

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data and code to get the best help

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Who am I ? Sometimes this is me but most of the time this is me

  • If you are set on having a GUI, you might look into using template prompting.  It doesn't give you the ability to use drop-down lists, but can give you a screen prompting for the parameters you need to supply.  You can use it to initialize variable values or it can replace actual text within your script.

  • Johan Bijnens wrote:

    just wondering: why is sqlcmd not an option ?

    Ok, well, thats not fully true. If I have to go the "Shell" way, I'd rather user PowerShell (which I currently do) as I have to modify the code of the scripts before executing this. With PS I can easily do that - tokenized scripts now!

    But finally the PS scripts also does "Invoke-Sqlcmd", so indeed I am using SQLCMD.

    Love, Science & Rock 'n Roll

  • richardm-1037631 wrote:

    If you are set on having a GUI, you might look into using template prompting. It doesn't give you the ability to use drop-down lists, but can give you a screen prompting for the parameters you need to supply. You can use it to initialize variable values or it can replace actual text within your script.

    Well, I dumped that GUI idea ... too much hassle ...

    Now all my scripts are tokenized, and I have a PowerShell script that can be parameterized, then repaces the tokens, then executes the script - one by one in the correct order etc.

    This works fast & easy, and the source code is better "mainatainable".

    Thank you all for your input, most appreciated!

    Love, Science & Rock 'n Roll

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic. Login to reply