Showing results for 
Search instead for 
Did you mean: 

Running SQL Scripts After InstallFinalize

Hi All,

I have a need to run a SQL script during my install, then run a batch file to restore databases that were installed onto the machine, then run a different script against those restored databases. Is there a way to do this in IS? I have the first two steps running correctly, just need to run another SQL script after the databases have been restored.

Labels (1)
0 Kudos
1 Reply

Re: Running SQL Scripts After InstallFinalize

Note that the SQL Scripts view uses a single in-script custom action named ISSQLServerInstall to run SQL scripts. In order to accomplish your requirements, you would need to write your own code that will connect to your target database server and run your second SQL script after run a batch file that restores databases. If you want to run all of your SQL scripts using the SQL Scripts view, consider converting the batch file to a SQL script.

Hope that helps.
0 Kudos