Proxy for SSIS pkg

I have created a proxy that sucessfully runs a SSIS pkg.  Now, I would like to use that proxy in a program to run the package from a program on a user's pc.  Does anyone know how to do this?  
Who is Participating?
Jason Yousef, MSConnect With a Mentor Sr. BI  DeveloperCommented:
Schedule an agent job using the package and the proxy, and let the application call that sql agent job.

that way you don't need to hard code the proxy and package in the application.
Christopher GordonSenior Developer AnalystCommented:
By "proxy', do you mean that you've scheduled a SSIS package as Job in SQL Agent


have you created some custom code (in Visual Studio perhaps) that has been designed to execute the Job or the SSIS package directly?

Thanks for the clarification!
Alpesh PatelAssistant ConsultantCommented:
Just load the package in Application using code and execute it.
Alpesh PatelConnect With a Mentor Assistant ConsultantCommented:
Microsoft.SqlServer.Dts.Runtime.Application app;
                app = new Microsoft.SqlServer.Dts.Runtime.Application();
                WindowsIdentity UserID = WindowsIdentity.GetCurrent();
                List<SectionMaster> objSubSections = new List<SectionMaster>();

                objSubSections = new DMA.Base.BusinessLogic().GetSubSectionByParentID(parentSectionID);

                foreach (SectionMaster item in objSubSections)
                        Package pkgIn = new Package();
                        DTSExecResult pkgResults_Sql;
                        string strSectionName = item.sectionName;

                        strCurrentpackage = strSectionName;

                        pkgIn = app.LoadFromSqlServer("\\Server\\" + strSectionName, ConfigurationSettings.AppSettings["ServerIp"].ToString(), "", "", null);

                        pkgIn.Variables["InsuranceCompanyIDs"].Value = strSelectedCompanies;//"1,2,3,4,5,6,7";

                        SSISEventListener Listerner = new SSISEventListener();

                        pkgResults_Sql = pkgIn.Execute(null, null, Listerner, null, null);

                        if (strProcessIDs == "")
                            strProcessIDs = pkgIn.Variables["ProcessIDList"].Value.ToString();
                            strProcessIDs = strProcessIDs + "," + pkgIn.Variables["ProcessIDList"].Value.ToString();

                        int EventCount = Listerner.EventCount;

                        Package pkgIn_Archive = new Package();
                        DTSExecResult pkgResults_Sql_Archive;
                        pkgIn_Archive = app.LoadFromSqlServer("\\Server\\ServerDB", ConfigurationSettings.AppSettings["ServerIp"].ToString(), "", "", null);

                        pkgIn_Archive.Variables["InsuranceCompanyIDs"].Value = strSelectedCompanies;//"1,2,3,4,5,6,7";
                        pkgIn_Archive.Variables["SectionID"].Value = item.sectionID;//"1,2,3,4,5,6,7";

                        SSISEventListener Listerner_Archive = new SSISEventListener();
                        pkgResults_Sql_Archive = pkgIn_Archive.Execute(null, null, Listerner_Archive, null, null);



Open in new window

All Courses

From novice to tech pro — start learning today.