Hi, I am executing a SSIS package in T-SQL via xp_cmdshell, I am doing it this way because my client wants it to be done. I am using SQL Server 2008 R2 environment.
CREATE PROCEDURE [dbo].[USP_ExecuteSSIS] @SSISPath VARCHAR(500), @Server VARCHAR(500), @SSISConfig VARCHAR(500), @TableName VARCHAR(500), @File VARCHAR(500) AS SET NOCOUNT ON DECLARE @Cmd VARCHAR(4000), @ReturnCode INT, @Msg VARCHAR(1000) SELECT @Cmd = 'C:\"program files (x86)"\"Microsoft SQL Server"\100\DTS\Binn\DTEXEC.exe /FILE "' + @SSISPath + '\SSISPackage.dtsx" /CONFIGFILE "' + @SSISConfig + '" /MAXCONCURRENT 1 /CHECKPOINTING OFF /REPORTING EWCDI'+ ' /SET \Package.Variables[User::DBServer].Properties[Value];' + @Server+ ' /SET \Package.Variables[User::TextFile].Properties[Value];' + @File+ ' /SET \Package.Variables[User::DBTable].Properties[Value];' + @TableName EXEC @ReturnCode = xp_cmdshell @Cmd IF @ReturnCode <> 0 BEGIN SELECT @Msg = 'SSIS package execution failed - ' + @SSISPath + 'Instance Name: ' + @Server + '.dbo.DBName' END RETURN @ReturnCode GO
Well, when this stored procedure executes I just want it to return success or fail and suppress all the pipeline information. Could you please let me know if this could beachieved.
Thanks in advance....................
Ione