Batch BAT file execution timed by MSSQL job

Source: Internet
Author: User
Tags mssql

Objective

There are times when we may need to execute batches for a certain purpose, such as scheduled backups of Oracle databases, and of course Oracle can implement scheduled backups via Rman. Most of the time we perform batch processing through scheduled tasks of the operating system.

But when we want to get relevant execution details, MSSQL's job is a good choice.

Specific programmes

First we need a batch file that meets our needs. such as Oracle's scheduled backup batch processing

This batch can back up the Oracle database to an offsite server.

The batch is then scheduled to run through the MSSQL's job

First of all, to open the Xpcmdshell MSSQL, such as:

The steps to create a new job are ignored. Specifically, also under the operation of the type of step properties to write, such as:

where exec xp_cmdshell followed the string is where the batch is to be executed.

Then set the execution cycle of the job.

Subsequent

Most of the time, it may be possible for the system to schedule tasks that do not meet our needs. I hope this article is helpful to you, if you feel good please point a wave of praise.

Reprint please indicate source: http://www.cnblogs.com/smallprogram/

Batch BAT file execution timed by MSSQL job

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.