Saturday, January 29, 2011

SSIS Pacakge Execute

1. http://msdn.microsoft.com/en-us/library/ms162810.aspx
2. http://www.codeproject.com/KB/database/Call_SSIS_from_SP.aspx

--Using Stored procedure
http://geekswithblogs.net/stun/archive/2009/03/05/mapping-stored-procedure-parameters-in-ssis-ole-db-source-editor.aspx
http://geekswithblogs.net/stun/archive/2010/02/24/execute-ssis-package-from-stored-procedure-with-parameters-using-dtexec-utility.aspx


Syntax

dtexec /option [value] [/option [value]]...

Using dtexec from the xp_cmdshell
You can run dtexec from the xp_cmdshell prompt. The following example shows how to run a package called

UpsertData.dtsx and ignore the return code:
EXEC xp_cmdshell 'dtexec /f "C:\UpsertData.dtsx"'

The following example shows how to run the same package and capture the return code:
DECLARE @returncode int
EXEC @returncode = xp_cmdshell 'dtexec /f "C:\UpsertData.dtsx"'

SSIS Pacakge - Exit codes returned from dtexec utility

Value        Description

0           The package executed successfully.

1           The package failed.

3          The package was canceled by the user.

4          The utility was unable to locate the requested package. The package could not be found.

5          The utility was unable to load the requested package. The package could not be loaded.

6          The utility encountered an internal error of syntactic or semantic errors in the command line.

ASCMD Command-line Utility -- SSAS