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"' |