I used the following script inside the Execute SQL Task component to make it work:
DECLARE @Server SYSNAME
DECLARE @SQL NVARCHAR(500)
SET @Server = @@SERVERNAME
SET @SQL = 'EXEC xp_cmdshell ''SQLCMD -S ' + @Server + ' -d <DBNAME> -q "<SomeProc>"'
EXEC sp_executesql @sql
This comment has been removed by the author.
ReplyDelete