Monday, March 12, 2012

Run external application

How can I read the path from some table and run external application from
SQL Server Agent (Job)?
Hi David,
EXEC a step with a TSQL statement in it:
DECLARE @.Path VARCHAR(4000)
SELECT @.PATH = PathColumn FROM Yourtable WHERE <SomeCondition>
--SELECT @.PATH = 'dir' Just for testing
EXEC master..xp_cmdshell @.Path
HTH, Jens Suessmeyer.

No comments:

Post a Comment