Execution warnings

The Studio analyzes the script for the presence of DELETE, DROP, TRUNCATE, and UPDATE statements and produces a blocking message if the statements are used in certain types of environments. For example, it alerts you if the DELETE statement targets a production database. This feature helps prevent accidental or intentional data loss caused by untested code, unintended commands, leftover statements, or other errors that could irreversibly damage data or objects.

Execution warning example

Configure execution warnings

To configure the behavior of execution warnings:

1. Select Tools > Options.

2. Select Environment > Documents > Execution Warnings.

3. In Max script size to analyze, enter the maximum size (in kilobytes) of scripts that will be analyzed.

4. In the table, select the environments and statements to enable execution warnings for.

Execution warnings options

To disable execution warnings for a specific piece of code, wrap it with the nowarn and endnowarn tags.

--nowarn
<code>
--endnowarn

Tags to disable execution warnings

Execution notifications

Execution notifications inform you about the query execution result. They appear in the lower-right corner of the screen.

The notification contains the following information:

  • The name of the document.
  • The duration of a query.
  • Query execution status:

    • Query completed with errors.
    • Query executed successfully.
    • Query canceled.

The Query executed successfully notification

Configure execution notifications

1. Select Tools > Options.

2. Select Environment > Documents > Notifications.

3. Adjust the settings:

  • Notify if query execution exceeds – Specifies the maximum allowed query execution time (in seconds) before a notification is shown. To disable this notification, clear the checkbox.
  • Notification duration – Specifies the duration (in seconds) that the notification remains visible.

Execution notifications options

Note

If a query exceeds 23:59:59 in execution time, the duration in the notification includes days.

Uncommitted transaction notifications

If there are open transactions during the query execution, a notification appears in the lower-right corner of the screen.

The notification contains the document name and the number of open transactions.

Uncommitted transaction notification

Note

The VIEW DATABASE STATE permission must be granted on the database for this feature to work properly.

Disable uncommitted transaction notifications

1. Select Tools > Options.

2. Select Environment > Documents > Notifications.

3. Clear Notify if execution contains open transactions.

Uncommitted transaction notification options