Script

Script runs one SQL query or script across many servers and databases at once. The ribbon tab itself is captioned OmniScript; these docs refer to it as Script, matching where the page lives.

Choosing servers and databases

Tick the servers you want to run against in the server explorer. Each open tab remembers its own database selection, so you can run the same script against a different database on each tab. Servers and databases run concurrently, so a script runs against every selected server-and-database pair at the same time rather than one after another.

On the Free tier a run is limited to two servers. A paid licence removes the limit.

You can save a named selection of servers as a bookmark and load it again later, rather than re-ticking the same servers each time.

Running and cancelling

Run the script from the toolbar. A run in progress can be cancelled; each command still in flight is cancelled individually rather than waiting for the whole run to finish. A deadlock (SQL Server error 1205) is caught and reported per server so you know to retry, rather than failing the whole run silently.

Safe mode

Safe mode is a per-tab toggle, off by default. When it is on, Studio inspects your SQL before running it and blocks INSERT, UPDATE, DELETE and DROP statements, and any stored procedure it cannot resolve well enough to check.

Safe mode is a static check of the SQL text, not a transaction. Studio does not wrap your script in a transaction, so Safe mode cannot roll back anything that does run. It only stops the statements it recognises as unsafe from running in the first place.

The first time you turn Safe mode on, Studio shows a one-time explanation of what it does. You can also set it to be on by default for new tabs.

Results and export

Results can be viewed as a grid or as text; the toggle is on the toolbar and Studio remembers your choice. A Performance tab alongside them reports the timings and row counts for the run.

Rows are kept for the first 100 result sets on each server and database. A large run, such as a batch repeated with GO 1000, can produce more than that. Later result sets still run and still count towards the timings and row counts on the Performance tab, but their rows are not kept, and Studio says how many were dropped rather than leaving the grid quietly short.

Export buttons on the results toolbar cover CSV, JSON, tab-delimited text and a Markdown table. The CSV and text exports ask whether to include column headers; JSON and Markdown do not.

Working with scripts

Open and save scripts as plain .sql files. There is no snippet or template library, just your own files.