MicroStrategy ONE

Executing a script

Once a script has been composed, it can be executed.

Command Manager executes scripts asynchronously, so that other actions, such as editing, connecting, or executing other scripts, can be carried out while a script executes. However, a given Script window executes only one statement at a time. Each statement in a script must finish executing before the next statement executes. To execute multiple scripts simultaneously, you must open them in separate Script windows.

When you execute a script, Command Manager checks the syntax of each statement immediately before executing it, to ensure that the statement is a well-formed Command Manager instruction. To check the syntax of the entire script before execution, see Checking the syntax of a script.

Beginning with MicroStrategy 9.0, Command Manager does not automatically lock a project or configuration when it executes statements. To avoid metadata corruption, use the LOCK PROJECT or LOCK CONFIGURATION statements in any Command Manager scripts that make changes to a project or server configuration. For more information about locking and unlocking a project or configuration, see Project and configuration locking.

To execute a Command Manager script

  1. Connect to a project source or Narrowcast Server. (How?)

  2. Compose a script, or open a previously existing script. (How?)

  3. Click the script's tab in its Script window.

  4. From the Connection menu, choose Execute. The script executes.

To execute only part of a script

  1. Connect to a project source or Narrowcast Server. (How?)

  2. Compose a script, or open a previously existing script. (How?)

  3. Click the script's tab in its Script window.

  4. In the Script window, select the portion of the script you wish to execute.

  5. From the Connection menu, choose Execute. The selected instructions execute.

Related Topics

Halting the execution of a script

Script output

Script errors: Syntax errors

Script errors: Execution errors

Command Manager and prompted objects

Viewing the results of a script

Executing a script from the command line