SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


ssis package execution problem from c#


ssis package execution problem from c#

Author
Message
madhu15583
madhu15583
Grasshopper
Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)

Group: General Forum Members
Points: 14 Visits: 45
Hi all
below code is working fine in my local machine.
but in production server the last package(SSASPackage) is not executing from the application but if i execute it manually its working fine.

Application app1 = new Application();
Package pack = app1.LoadPackage(Server.MapPath(ConfigurationManager.AppSettings["DTSExcelPackage"].ToString()), null);
if(FileName.ToLower().EndsWith("xls"))
{
pack = app1.LoadPackage(Server.MapPath(ConfigurationManager.AppSettings["DTSExcelPackage"].ToString()), null);
}
if (FileName.ToLower().EndsWith("csv"))
{
pack = app1.LoadPackage(Server.MapPath(ConfigurationManager.AppSettings["DTSCSVPackage"].ToString()), null);
}
Variables vars = pack.Variables;
vars["con"].Value = ConfigurationManager.ConnectionStrings["DBConnection2"].ToString();
vars["Filepath"].Value = FileName;
vars["RapportRunID"].Value = RunID;
vars["TableName"].Value = Table;
vars["ExecuteSchema_SP"].Value = " EXEC sp_starschema '" + Table + "', '" + RunID + "' ";
DTSExecResult res = pack.Execute();
string status = res.ToString();

if (status == "Success")
{
pack = app1.LoadPackage(Server.MapPath(ConfigurationManager.AppSettings["SSASPackage"].ToString()), null);
DTSExecResult result = pack.Execute();
}


any one plzzzzz help.....

Regards
Madhu
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search