SQL Multi Script 1

Executing scripts

Once you've followed the instructions detailed in Configuring SQL Multi Script, you're ready to start executing scripts.

Executing scripts

You have several options:

  • To execute multiple scripts, select the check boxes for the scripts that you want to execute, then click 
  • To execute part of a script only, display the script and highlight the statements that you want to execute, then click 
  • To execute a single script, right-click on a script and select Execute This Script Only.
  • To execute scripts against a particular database, select the check boxes for the scripts that you want to execute then in the Database Distribution List pane, right-click on a database and select Execute Against This Database Only.

Scripts are executed in the order they're displayed in the Scripts to Execute pane. See Changing the order of scripts. It waits for each batch in a script to finish executing before it executes the next batch. When all the batches in a script have been executed against a database, SQL Multi Script executes the next script against the database.

If you are executing scripts against more than one database, the order in which scripts are executed depends on whether you have set the Optimization option to Serial execution or Parallel execution. See Setting database options.

Cancelling script execution

To stop executing or parsing scripts against all databases, click 

This may result in partial execution of scripts or of batches within scripts.The effect of cancelling a particular set of scripts depends on the order in which SQL Multi Script is executing the scripts and how many databases SQL Multi Script is executing against simultaneously.

 

Exiting SQL Multi Script while scripts are being executed or parsed has the same effect as clicking 

 

 


Do you have any feedback on this documentation?

Let us know at sqlmonitorfeedback@red-gate.com


Didn't find what you were looking for?