Getting SSIS Package Path property from SMO SQL Agent job step
Is there a way to do this, I just want to enumerate the package path of each package in sql agent. Is there a way to do this. I have this so far: namespace SSIS_SMO_Jobs { class Program { static void Main(string[] args) { ServerConnection serverConn = new ServerConnection(); serverConn.LoginSecure = false; serverConn.Login = "compdts"; serverConn.Password = "mypass"; serverConn.ServerInstance = "myserver.com"; Server server = new Server(serverConn); JobServer jobServer = server.JobServer; foreach (Job job in jobServer.Jobs) { foreach (JobStep jobStep in job.JobSteps) { Console.WriteLine(jobStep.Name); if (jobStep.SubSystem.ToString() == "Ssis") Console.WriteLine(jobStep.SubSystem); } } } } }
January 17th, 2012 5:47pm

Hmm, so in your case all the packages in the Agent jobs are being called off the file system, are they? Never tried this, but what if you just script the jobs will you get the path to the package? And then if you do, why not to then parse the resulted file for the string containing the following wildcard: *.dtsx?Arthur My Blog
Free Windows Admin Tool Kit Click here and download it now
January 17th, 2012 10:37pm

Hmm, so in your case all the packages in the Agent jobs are being called off the file system, are they? Never tried this, but what if you just script the jobs will you get the path to the package? And then if you do, why not to then parse the resulted file for the string containing the following wildcard: *.dtsx?Arthur My Blog
January 18th, 2012 6:20am

Hmm, so in your case all the packages in the Agent jobs are being called off the file system, are they? Never tried this, but what if you just script the jobs will you get the path to the package? And then if you do, why not to then parse the resulted file for the string containing the following wildcard: *.dtsx?Arthur My Blog
Free Windows Admin Tool Kit Click here and download it now
January 18th, 2012 6:20am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics