How to Use Transact-SQL to write job scripts (Enterprise Manager)

Source: Internet
Author: User

Use Transact-SQL to write a job script

You can generate a Transact-SQL script to create the defined job. By writing a job script, you can:

    • Control job creationSource code.

    • Migrate jobs from testing to production.
    • Compile alert and operator scripts.

Scripts created on computers running Microsoft SQL Server 2000 instances can also be run on computers running SQL Server 7.0. If you select to create a script compatible with SQL Server 7.0, some SQL Server 2000 features will be ignored, such:

    • Column-level sorting rules.

    • User-Defined Functions and extended attributes.
    • Instead of triggers on tables and views.
    • View indexes (index view ).
    • Calculate the index of the column.
    • Descending index.
    • View.

      This option is only available on the computer that runs the SQL Server 2000 instance.

Use Transact-SQL to write a job script

Enterprise Manager

How to Use Transact-SQL to write job scripts (Enterprise Manager)

Use Transact-SQL to write a job script

    1. Expand the server group and then expand the server.

    2. Expand "management", and then expand "SQL Server proxyProgram".
    3. Right-click "job", point to the "all tasks" sub-menu, and click "generate SQL script" command.
    4. In the file name box, type the Script Name.
    5. Perform one of the following operations under "File Format:
      • Click MS-DOS Text (OEM) "option to save the script in OEM format.

      • Click the "Windows text (ANSI)" option to save the script in ANSI format.
      • Click "international text" (UNICODE) "option to save the script in unicode format.
    6. Perform one or two of the following operations under "SQL Generation Options": (optional)
      • Select the check box "replace a job if it already exists", which contains script commands to delete jobs with the same name as the job generated by the script.

      • Select the "include target server" check box, which contains the script command used to generate the target server allocation. This option can be used only when writing a multi-server job script.
    7. In the tsql batch processing separator box, enter the transact-SQL batch processing separator.

 

Create SQL Server 7.0 compatible scripts

Enterprise Manager

how to create SQL Server 7.0 compatible scripts (Enterprise Manager)

Create a SQL Server 7.0 compatible script

  1. Expand the server group and then expand the server.

  2. Expand the "Database" folder.
  3. right-click the database, point to "all tasks", and click the "generate SQL script" command.
  4. on the "General" tab, click "show all" to display all objects for script writing.
  5. select the object type of the script to be written, or select the "compile all object scripts" check box.
  6. click the "format" tab and select the "write scripts for functions compatible with version 7.0" check box.

    this option is only available on Microsoft SQL Server 2000 computers.


1988-2000 Microsoft Corporation. All rights reserved.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.