Can I list the packages , can I delete them?Yes, you can do this through the service interface on the Application Object.
Something like this:
Dim app As Application = New Application()
Dim pInfos As PackageInfos = app.GetPackageInfos("\\","yourserver",Nothing,Nothing)
For Each pInfo As PackageInfo In pInfos
Console.WriteLine("Name: {0}", pInfo.Name)
Next
Which will give you all the packages on the SQL Server instance.
For the packages on the IS Server, do something like this:
static void Main(string[] args)
{
Application app = new Application();
PackageInfos pInfos = app.GetDtsServerPackageInfos(@."File System", "yourserver");
foreach (PackageInfo pinfo in pInfos)
Console.WriteLine(pinfo.Folder + " " + pinfo.Description);
}
No comments:
Post a Comment