Online Documentation for SQL Administrator for SQL Server

Execute T-SQL statement


Use the Execute T-SQL Statement Task dialog to customize your maintenance plan by adding Transact-SQL statements of your choice to this maintenance plan.

The General tab allows you to set common properties for this task. To set relationships between tasks use the Precedence constraints tab.

 

Maintenance plans - Maintenance Plan Editor - Managing tasks - Execute TSQL statement

 

 

Name

Enter the task name.

 

Enabled

Check this option to enable task execution.

 

Connection

Specify which server connection should be used for task execution. You can choose among existing connections or create a new one.

 

Execution timeout, seconds

Define the time (in seconds) to wait for task completion before timing out (terminating task).

 

SQL

Specify in the Transact-SQL statement to execute.

 

 


See also:

Backup database

Check database

Rebuild indexes

Reorganize indexes

Shrink database

Update statistics

Execute job

Notify operator

Clean up history

Clean up maintenance log

Precedence constraints