SQLUSA
SQLUSA

Microsoft SQL Server 2005 Best Practices

Microsoft SQL Server 2000 Best Practices

How to create a stored procedure for DTSRUN?

 

Execute the following script in Query Editor to create a sproc for DTSRUN execution :

CREATE PROC ImportFinanceData
AS
BEGIN
DECLARE @SQLCommand varchar(1000)

SET @SQLCommand = 'DTSRUN /S 140.242.136.106 /E /U "user" /P "password" /N
"DailyFinanceImport" '

EXEC master..xp_cmdshell @SQLCommand, NO_OUTPUT
END
GO

The Best SQL Server Training in the World
The future is just a click away! Your Future!
SQLUSA.com Home Page