SSDT – Pre and Post Deploy Script Markers And Flava Flav


I admit, this post is primarily to provide a place for me to copy and paste my own code, but it’s so sweet I figured some of you other SQL Server Data Tool Users might find it handy.

When troubleshooting the generated deployment scripts I’ve always added a PRINT statement to indicate the beginning and ending of the pre and post deploy section. But, a post by SSDT kingpin Jamie Thompson made my realize I could bling out my pre and post deploy script with some sweet ASCII art fonts. For example:

 

Begin Post Deploy Script

 

Suddenly, I’m like the Flava Flav of the SSDT world! The secret sauce comes from the strangely addictive Text to ASCII Art Generator site. The only trick is if you’re planning on using your sweet new letters in actual code you’ll likely need to escape any single quotes (by using two single quotes in a row) which are used in the artwork.

If you like the idea but don’t want to mess around with all the different fonts available you can just cut and paste the following and know that imitation is the sincerest form of flattery… (The code looks a mess on the web page but when you cut and paste it into your favorite SQL tool you should be in good shape.)

 

PRINT'   /$$$$$$$                      /$$                 /$$$$$$$                        /$$           /$$$$$$$                      /$$                    '
PRINT'  | $$__  $$                    |__/                | $$__  $$                      | $$          | $$__  $$                    | $$                    '
PRINT'  | $$  \ $$  /$$$$$$   /$$$$$$  /$$ /$$$$$$$       | $$  \ $$  /$$$$$$   /$$$$$$$ /$$$$$$        | $$  \ $$  /$$$$$$   /$$$$$$ | $$  /$$$$$$  /$$   /$$'
PRINT'  | $$$$$$$  /$$__  $$ /$$__  $$| $$| $$__  $$      | $$$$$$$/ /$$__  $$ /$$_____/|_  $$_/        | $$  | $$ /$$__  $$ /$$__  $$| $$ /$$__  $$| $$  | $$'
PRINT'  | $$__  $$| $$$$$$$$| $$  \ $$| $$| $$  \ $$      | $$____/ | $$  \ $$|  $$$$$$   | $$          | $$  | $$| $$$$$$$$| $$  \ $$| $$| $$  \ $$| $$  | $$'
PRINT'  | $$  \ $$| $$_____/| $$  | $$| $$| $$  | $$      | $$      | $$  | $$ \____  $$  | $$ /$$      | $$  | $$| $$_____/| $$  | $$| $$| $$  | $$| $$  | $$'
PRINT'  | $$$$$$$/|  $$$$$$$|  $$$$$$$| $$| $$  | $$      | $$      |  $$$$$$/ /$$$$$$$/  |  $$$$/      | $$$$$$$/|  $$$$$$$| $$$$$$$/| $$|  $$$$$$/|  $$$$$$$'
PRINT'  |_______/  \_______/ \____  $$|__/|__/  |__/      |__/       \______/ |_______/    \___/        |_______/  \_______/| $$____/ |__/ \______/  \____  $$'
PRINT'                       /$$  \ $$                                                                                      | $$                     /$$  | $$'
PRINT'                      |  $$$$$$/                                                                                      | $$                    |  $$$$$$/'
PRINT'                       \______/                                                                                       |__/                     \______/ '

PRINT'   /$$$$$$$$                 /$$       /$$$$$$$                        /$$           /$$$$$$$                      /$$                    '
PRINT'  | $$_____/                | $$      | $$__  $$                      | $$          | $$__  $$                    | $$                    '
PRINT'  | $$       /$$$$$$$   /$$$$$$$      | $$  \ $$  /$$$$$$   /$$$$$$$ /$$$$$$        | $$  \ $$  /$$$$$$   /$$$$$$ | $$  /$$$$$$  /$$   /$$'
PRINT'  | $$$$$   | $$__  $$ /$$__  $$      | $$$$$$$/ /$$__  $$ /$$_____/|_  $$_/        | $$  | $$ /$$__  $$ /$$__  $$| $$ /$$__  $$| $$  | $$'
PRINT'  | $$__/   | $$  \ $$| $$  | $$      | $$____/ | $$  \ $$|  $$$$$$   | $$          | $$  | $$| $$$$$$$$| $$  \ $$| $$| $$  \ $$| $$  | $$'
PRINT'  | $$      | $$  | $$| $$  | $$      | $$      | $$  | $$ \____  $$  | $$ /$$      | $$  | $$| $$_____/| $$  | $$| $$| $$  | $$| $$  | $$'
PRINT'  | $$$$$$$$| $$  | $$|  $$$$$$$      | $$      |  $$$$$$/ /$$$$$$$/  |  $$$$/      | $$$$$$$/|  $$$$$$$| $$$$$$$/| $$|  $$$$$$/|  $$$$$$$'
PRINT'  |________/|__/  |__/ \_______/      |__/       \______/ |_______/    \___/        |_______/  \_______/| $$____/ |__/ \______/  \____  $$'
PRINT'                                                                                                        | $$                     /$$  | $$'
PRINT'                                                                                                        | $$                    |  $$$$$$/'
PRINT'                                                                                                        |__/                     \______/ '

 

 


Leave a Reply

Your email address will not be published.