ThanksIn theory, you could run DTSRUN from inside a stored procedure, like so:
CREATE PROCEDURE usp_ImportData ASDECLARE @.DTSRUNCommand varchar(255)
TRUNCATE TABLE MyTable
SET @.DTSRUNCommand =
'DTSRUN /N ' +
'MyImportPackage /E /S ' +
@.@.SERVERNAMEEXEC master..xp_cmdshell @.DTSRUNCommand
This is using xp_cmdshell, so the SQL user will have to have rights to run it...|||Cool...I will try using it and see if i can get it to work.
Thanks|||It worked awsome...
Thanks
No comments:
Post a Comment