Scripting Jobs Using Transact-SQL

Administering SQL Server

Administering SQL Server

Scripting Jobs Using Transact-SQL

You can generate Transact-SQL scripts to create the jobs that you have defined. With job scripting, you can:

  • Control versions of job creation source code.

  • Migrate jobs from test into production.

  • Script alerts and operators.

It is also possible to create a script on a computer running an instance of Microsoft® SQL Server™ 2000 that can be run on a computer running an instance of SQL Server version 7.0. If you choose to create a SQL Server 7.0 compatible script, certain SQL Server 2000 features are ignored, such as:

  • Column level collation.

  • User-defined functions, extended properties.

  • INSTEAD OF triggers on tables and views.

  • Indexes on views (indexed views).

  • Indexes on computed columns.

  • Descending indexes.

  • Reference permissions on views.

    This option is only available on an instance of SQL Server 2000.

To script jobs using Transact-SQL