Execute the following Microsoft SQL Server T-SQL training script in SSMS Query Editor to create a sproc for DTSRUN execution :
CREATE PROC ImportFinanceData
AS
BEGIN
DECLARE @SQLCommand varchar(1000)
AS
BEGIN
DECLARE @SQLCommand varchar(1000)
-- Replace it with your code
SET @SQLCommand = 'DTSRUN /S 140.242.136.106 /E /U "user" /P "password" /N
"DailyFinanceImport" '
SET @SQLCommand = 'DTSRUN /S 140.242.136.106 /E /U "user" /P "password" /N
"DailyFinanceImport" '
PRINT @SQLCommand -- test & debug
EXEC master..xp_cmdshell @SQLCommand, NO_OUTPUT
END
GO
END
GO
-- Execute stored procedure
EXEC ImportFinanceData
GO
GO
Related articles:
No comments:
Post a Comment