Running scripts
Running a script executes its SQL against a live database. For a single component you use the Run actions on the component grid; for a coordinated release you run the whole deployment.
Running is not gated by an environment flag; the script executes against whichever connection is active. The database name in the status bar is the ground truth. Glance at it before you click Run.
The two run actions
Both are on the row's right-click Run submenu, and on the toolbar.
| Action | Behaviour |
|---|---|
| Run with Current Connection (Ctrl+E) | Runs against whatever connection is active in the status bar. |
| Run with Connection… | Prompts for a connection from your saved list, runs there. The workspace's active connection does not change. |
The Run Script dialog
Both actions open the Run Script dialog. It has:
- A Mode dropdown with two values:
- COMMIT. Changes are permanently applied to the database.
- ROLLBACK. The script runs inside a transaction that is rolled back at the end. Useful for testing without persisting anything.
- Run and Cancel buttons.
Pick the mode, click Run. The resulting log opens in a new tab.
What happens next
When the script completes, the log tab shows:
- Each statement and its outcome.
- Row counts, messages, errors (with line numbers).
- The final commit or rollback.
If the script errors, DataStar rolls back automatically; you don't get the choice at the end.
Running a whole deployment instead
Single-component run is for development and checks. For a release, build a deployment basket and run the whole thing: ordered, logged, and recorded in deployment history.