cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
bbarton11
Level 5

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.

Thanks!
Labels (1)
0 Kudos
(1) Reply
hidenori
Level 17

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