Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

ssis package execution problem from c# Expand / Collapse
Author
Message
Posted Friday, July 18, 2008 2:00 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, June 11, 2009 5:39 AM
Points: 2, 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
Post #536542
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse