Use commands in SQLServer To Call The SSIS package

Source: Internet
Author: User
Tags ssis
You can use the dtexec command in SQLServer to run the SSIS package (Version 2005 or later). Of course, you can also use the system process: xp_mongoshell to call dtexec to run the SSIS package. The procedure is as follows: 1. First, you must design the package in BusinessIntelligence and debug the package. 2. You can use either of the following methods in SQLServer.

You can use the dtexec command in SQL Server to run the SSIS package (Version 2005 or later). Of course, you can also use the system process: xp_mongoshell to call dtexec to run the SSIS package. The procedure is as follows: 1. First, you must design the package in Business Intelligence and debug the package. 2. You can use either of the following methods in SQL Server:

You can use the dtexec command in SQL Server to run the SSIS package (Version 2005 or later). Of course, you can also use the system process: xp_mongoshell to call dtexec to run the SSIS package.

The procedure is as follows:

1. First, of course, we need to design the package in Business Intelligence and debug it.

2. There are two ways to run the SSIS package using commands in SQL Server.

The first is to directly execute the ssis package file. The command is exec xp_mongoshell 'dtexec/f "c: test. dtsx "'

The second is to publish or import the package file to the Integration Services service and then execute the package.

A release package is used to generate a release file in Business Intelligence and publish it to the Integration Services Service. After generating the release file, double-click the release file, select [deploy to SQL Server], enter the Server name, user name, and password, and select the package path "/", select [encrypt by using server storage], click [next], and select the location to install.

The import package is in Managemenet Studio. Select Integration Services, select "stored package"-"MSDB", right-click the import package, select the file system, and specify the package to import, for protection level, you need to select [access control by server storage and role].

Both publish and import packages serve the same purpose and purpose, so as to put the packages into the Integration Services service.

After the package is published or imported, you can use the following command to call it:

Exec xp_cmdshell 'dtexec/DTS "MSDBtest"/SERVER "servername"/MAXCONCURRENT "-1"/checkpointing off/REPORTING V'

Note:

1. The system process xp_cmdshell used in the preceding operations is disabled by default. To use xp_cmdshell, you must enable it first.

2. when releasing or importing a package, you must select the correct protection level. When releasing a package, select [encrypt by using server storage]. when importing a package, select [access control by server storage and role]. Otherwise, an error occurs: [Description: The protected XML node cannot be decrypted "DTS: Password ", error: 0x8009000B "This item is not suitable for use in the specified state. ". You may not be authorized to access this information. This error occurs when an encryption error occurs. Ensure that the correct key is provided.]

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.