I'm writing a fairly long running script, which prints progress messages as it goes.
However, SQL Server Management Studio by default shows the resultset tab, not the messages tab, so the user will have to click the messages tab after starting the script to see the progress as it happens.
Is there a way for my script to tell SSMS to show the messages tab automatically?
I know SSMS will remove the resultset tab once the script is complete, since it doesn't generate any resultsets, but I want the messages tab shown immediately, not at the end.
I'm not looking for a setting within SSMS, since this script will not be run on my machine once released.