By using xp_cmdshell we can run the
Packages from the SQL server. Before to run the packages from the SQL Server we need
to enable xp_cmdshell by running below
script
EXEC sp_configure 'show advanced options', 1
GO
-- To update the currently configured
value for advanced options.
RECONFIGURE
GO
-- To enable the feature.
EXEC sp_configure 'xp_cmdshell', 1
GO
-- To update the currently configured
value for this feature.
RECONFIGURE
GO
Execute SSIS
package from MSDB database :
declare @excutePackage varchar(8000)
declare @cmdline varchar(8000)
set @cmdline='/DTS
"\MSDB\PackageLogging\Package" /SERVER "." /CHECKPOINTING
OFF /REPORTING V '
set @excutePackage='dtexec'
set @excutePackage=@excutePackage+@cmdline
declare @returncode int
exec @returncode= xp_cmdshell @excutePackage
select @returncode
Execute SSIS package from FILE System(from local D:\)
declare @excutePackage varchar(8000)
declare @cmdline varchar(8000)
set @cmdline='/F "D:Packages\Package6.dtsx"
'
set @excutePackage='dtexec.exe'
set @excutePackage=@excutePackage+@cmdline
declare @returncode int
exec @returncode= xp_cmdshell @excutePackage
select @returncode
1 comments:
Nice Article.... :)
ReplyI am waiting for some articles related to SSIS deployment methodology from you... :)
http://gouravsaxena.blogspot.in/