Calling SSIS Package From C# Code

Apr 10, 2007

I am using the following code to run my SSIS package:

Package package = app.LoadFromSqlServer
("\EPSROI\dts_Client_Eligibility_Import", "SQL32", "username",
"password", null);

Variables vars = package.Variables;
vars["InputFile"].Value = txtInput.Text;
vars["OutputFile"].Value = txtOutput.Text;
vars["Client"].Value = cboClientName.SelectedValue.ToString();
vars["Chopper"].Value = Chopper;

DTSExecResult result = package.Execute();

It runs fine on my machine; however, on anyone elses machine "result" comes back as "failure". We have figured out that it is loading the package and variables fine but failing before the first step of the package. Does anyone know why this would be? Or how to fix it? I am totally stumped considering it works fine on my machine.

Thanks.
Danielle

View 3 Replies


ADVERTISEMENT

Calling SSIS From .net Code

Dec 2, 2007


Hi

I created an Integration Services from project which loads flat files to an OLEDB destination. It works fine for me.

But I do not want to run this from the Integration Services Project. What I need to do is run this project from Console

Application. That is when I run the console application in VB, It must execute the SSIS package and the flat files should

be loaded in SQL SERVER. I have created the SSIS package. How should I do Invoke this package from .NET code.

Thanks

Sai

View 1 Replies View Related

Passing Execute DTS Package Result (success/failure) To Calling SSIS Package

Mar 6, 2008

I have a SSIS job, one of the last steps it performs is to execute a SQL 2000 DTS package. This has to be done as a SQL 2000 DTS package as it is performing rebuilds of SQL 2000 Analysis Services dimensions and cubes. We've found that when the DTS fails the SSIS job is happily completing showing as a success, we would prefer to know it went wrong.

As far as I'm aware SSIS merely starts the DTS off and doesn't care about it's result. I've taken a look in to turning on the logging for the execute DTS package and thought that the ExecuteDTS80PackageTaskTaskResult would give me the answer I need...but is merely written to the log not available as an event-handler. It also looks like it is not safe to put a SQL task in as the next item to go look at the SQL 2000 system tables to look at the log for the DTS package as the SSIS documentation warns that the DTS package can continue to run after the execute DTS package task has ended.

Ideally I want any error raised within the DTS package to cascade up to be an error in the SSIS job, I can then handle it appropriately. I cannot find a way to do this. Is there a way?

If not, can anyone suggest how in the remainder of the SSIS tasks I can be sure that the DTS has completed before I start any other tasks that will check for the SQL 2000 log of its execution?

View 5 Replies View Related

SSIS Called From Agent Job Not Calling New Child SSIS Package Addition

Oct 29, 2007

I have an SSIS package (TransAgentMaster) that I recently modified to include a call to a child package via the file system. The child package creates a text file. When I run the package in dev studio then the child package/text file is produced.

I then imported the TransAgentMaster as a stored packagesfilesystem package into SQL SSIS and executed the package. The child package produced the text file.

I then ran the SQL Server Agent to see if the child package would work and it did not generate the text file. Thus after updating a SSIS package importing the package into SSIS the job that calls the package will not call the child package. Please not that the TransAgentMaster package calls 7 children packages €¦ just not my new one.


Any thoughts why the agent will not run the child newly crated childe package?

View 3 Replies View Related

Calling SSIS Package From Asp.net 2.0.

Feb 15, 2008

Hello All

I have tried to execute SSIS Package using,


Using a Web Service or Remote Component to Run a Remote Package Programmaticallyas per following msdn example.
http://msdn2.microsoft.com/en-us/library/ms403355.aspx

my SSIS .dtsx file is on the Server having SQL Server & SSIS Installed. (Database Server)

and asp.net web service & web application is on another server, which is Application Server.

the .dtsx does simple process like executing existing Sql view from Database Server to the .csv file on the Application Server.

when I implemented the Code explained in msdn its works fine from my development machine.

but as soon as i tried to execute from running from the website, it gives following error.

The following exception occurred: Retrieving the COM class factory for component with CLSID {E44847F1-FD8C-4251-B5DA-B04BB22E236E} failed due to the following error: 80040154.

I am sure this forums must have been answered already for the this kind of problem.

If anyone can guide me for the above problem, ASAP pls.

thanks

View 6 Replies View Related

SQL 2012 :: SSIS Package Not Calling SP

Jun 18, 2015

We had a scenario where we used to run the Process from front end thru application. on the back ground the the process call the SP & from there it calls the SSIS package then again to SP.

after SSIS package ran succesfully it will be updated on a table with sucess then call the SP & deletes the entry from the other table but in one scenario Package was success but the entry was not getting deleted as the process takes almost 2-3 hours loading 60 millions records. but the process was running in SQL 2008 but once we upgraded to SQL 2012 its not working for one application. its not returning any error as timeout also. we tried changing the server level setting for remote query time out also to 0 but no luck .

View 0 Replies View Related

Calling A SSIS-Package From A COM+-Application

Oct 3, 2007

Hello

I have a SSIS-Package stored in the SQL Server. This package works fine when i execute it from the SQL Server. But if I try to execute the package from a COM+-Application, nothing happens.


Here is my code snipped:

Public Function ExecutePackage €¦
Dim myPackage As New Package
Dim app As New Application
Dim pkgResults As DTSExecResult


'----- Execute the package from SQL Server
myPackage = app.LoadFromSqlServer("\PackageName", "ServerInstance", Nothing, Nothing, Nothing)
pkgResults = myPackage.Execute()
€¦

End Function

In a Windows Forms Application I can execute the package with this code snipped succesfully. Therefor I think that the problem is my COM+-Application.

Can anybody help me?


Thank's

Jürgen Paulus

View 4 Replies View Related

Calling A SSIS Package From Web Services

Jan 2, 2008

Can you call a SSIS package from Web services?
I would like to create a web services that can call a SSIS package ( generate a text file)..
If it is possible, Can someone show me code examples?

View 6 Replies View Related

SSRS Calling SSIS Package

Feb 12, 2008






Hi All,

I'm trying to call a SSIS package as my data source for SQL reporting service but I keep getting the error "Cannot create a connection to data source 'DsSSIS'.

My DsSSIS consists of the following in the connection string.

="/file c:FarmBillTesting.dtsx /Set Package.Variables[User::FilterValue].Properties[Value];" & Parameters!FilterValue.Value.ToString()


I have tried everything that I know to make this work but I have been unable to do so. Any help from the group would be great.


Thanks

Ham

View 3 Replies View Related

Calling A SSIS Package Via SQL ServerAgent

Sep 30, 2006

Hi,

I was looking at a previos thread in this very queston and the answers given to it, I tried a SSIS package that works fine on its own but on creating a new job and invoke it, the JOB fails ,it says its not able to locate the file specified,

I tried copying the package to the server machine wher am creating the job,but again the same error; and when i try to alter the protection level of the SSIS package to Server Storage its throwing an error like '' This protection level cant be applied to this destination,The system can't verify that the destination supports storage capacity. this error occurs when saving to XML."

I am using OLE DB Destination in the dataflow task of the SSIS package I ve created. Please guide whr am going wrong. Some detailed steps which has some screenshots depicting step by step procedure of creating a JOB that calls a SSIS package will be highly helpful

Thanks in Advance,

View 4 Replies View Related

Calling SSIS Package In A Different Project

Dec 7, 2005

I have written package which goes through a directory and load all the files with certain criteria. I have set the package to run using package configuration. It does work fine.

View 4 Replies View Related

Calling An SSIS Package From A Trigger Causes It To Run For Ever

Oct 26, 2007

hi,

when calling an SSIS package from a trigger causes it to run for ever. Know why??


In Detail;


Consider that there are two tables with the same schema in a db. Lets name that Test1 and Test2.
I develope a package whihc will transform data from Test1 to Test2. I initiate this package from a Trigger for Insert on Test1. For eg.



CREATE TRIGGER Trigger_Test1

ON Test1

AFTER INSERT

AS

BEGIN




EXEC xp_cmdshell 'dtexec /FILE "C:TestTestPackage1.dtsx"'

END


This runs for ever when a record is inserted into the Test1 table.

But, when the trigger is on someother table , everything works fine.For eg, if the trigger is on the table TT1 & this trigger initiates the same package while inserting a record into TT1, everything is fine.

Can anyone help me on this.

Thanks
Man

View 4 Replies View Related

Calling SSIS Package Through Command Prompt

Feb 24, 2008

All, I am developing the data mart refresh task in SSIS. I wanted to call the package in command prompt. I need help. Can any one give any tips on it. Thanks and appricate in advance.

Regards
Govind

View 2 Replies View Related

Calling SSIS Package From Stored Procedure

Mar 28, 2008

I'm trying to create a stored procedure which will run 2 SSIS packages before it runs some other SQL code. I read [url=http://msdn2.microsoft.com/en-us/library/ms162810.aspx]this[/url] article. I'm trying to use the package from the file system.

Here is the my code:

CREATE PROCEDURE usp_participant_limits_report
AS
dtexec /f "C:....Activity_Limits.dtsx"
GO

The error message says it doesn't like the "/". Anyone?

View 1 Replies View Related

Calling SQL Server Agent JOB From A SSIS Package

Feb 9, 2007

Hello

do ne one know how to call a SQL SERVER agent job from a SSIS package?

regards,

Anas

View 1 Replies View Related

T-SQL (SS2K8) :: Calling SSIS Package Through Store Procedure

Dec 4, 2014

I am calling Store Procedure from my C# Code and inside the SP, I am calling my SSIS Package.It is working fine. On my local because I have all rights to run xp_cmdshell COMMAND. Now I have to transfer this SP to QA and Prod and I don't have rights to run xp_cmdshell COMMAND.

Here is my SP.

declare @cmd varchar(1000)
SET @ssispath = 'SSIS Package Path where my .dtsx package'
set @ExcelF = 'Passing My source file name and full path'

select @cmd = 'C:"program files (x86)""Microsoft SQL Server"100DTSBinnDTEXEC.exe /F "' + @ssispath + '"'
select @cmd = @cmd + ' /X86 /SET Package.Variables[User::ExcelF].Properties[Value];"' + @ExcelF + '" /X86 '
exec master..xp_cmdshell @cmd

My question is, is there other way to run/execute above Store Procedure/SSIS without XP_CMDSHELL Command?

View 6 Replies View Related

Calling An SSIS Package From A Service Broker Queue

Feb 26, 2007

Posted the same message to the Service Broker forum. But the board is neither responsive nor active. So I am trying this forum. Hope someone can help.

I would like to call an SSIS package from a Service Broker Queue.

There is one way that I am aware of -

Using xp_cmdshell from within an activation stored procedure and using DTEXEC.

Is there a more elegant way of executing an SSIS package from within SSB?

Also,
I am not interested in writing a .NET external activator to process my
messages in the queue. I would like this operation to be strictly
database oriented. Having said this, I am also trying to avoid triggers
processing the messages in the queue.

Thank you!

View 5 Replies View Related

Calling Oracle Package And Select Command Together In SSIS

Jan 14, 2008

hi,

Below are 2 oracle commands




1. (calls an oracle package) - call lpaarchive.pibrdg.setlastbridgeruntime(sysdate);

2. (selects rows) - select timestamp ,



pitag ,

rtlmp from LPAARCHIVE.I_PIBRDG_BUS5MINRTLMPS

where timestamp <= (sysdate + 0.002777778)

order by TIMESTAMP ASC;
I need to execute these 2 statements together. I tried using Execute SQL task to call the package and then an OLEDB source that calls a variable with the select statement. But it does not retrieve any rows. It seems like the result of calling the package is used by the select statement to give the final rows. Could anyone please help me resolve this issue.

View 5 Replies View Related

SSRS Calling SSIS Package As A Data Source

Feb 12, 2008

Hi All,

It's been a while since I post here. Anyway, I'm trying to call a SSIS package as my data source for SQL reporting service but I keep getting the error "Cannot create a connection to data source 'DsSSIS'.

My DsSSIS consists of the following in the connection string.

="/file c:FarmBillTesting.dtsx /Set Package.Variables[User::FilterValue].Properties[Value];" & Parameters!FilterValue.Value.ToString()


I have tried everything that I know to make this work but I have been able to do so. Any help from the group would be great.


Thanks

Ham

View 11 Replies View Related

Calling A AS400 (IBM DB2) Stored Procedure From Within SSIS Package

Nov 9, 2006

Hi:

I would like to find out how would I call an AS400 (IBM DB2) iSeries Stored Procedure from within my SSIS Package. What tasks should i be using? and do I need any additional adapters installed on my machine to access AS400(IBM DB2). Thanks.



MA

View 1 Replies View Related

Calling SSIS Package From Web Service - Security Issue

Nov 15, 2006

I am trying to call a SSIS package from a web service hosted on the same machine as the package file is sitting. All that the package does is a simple Execute SQL task with one datasource connection.

I have set impersonation as true. When I run the package from the web service on the virual port (through Visual studio IDE) it runs fine.

http://localhost:4609/WebServiceRunSSIS/LaunchSSISPackageServiceCS.asmx

In the above case I don't think impersonation means anything coz it runs successfully even when there is no impersonation set!

I then run the same service (asmx page) from the browser after making it a web service on my machine

http://localhost/WebServiceRunSSIS/LaunchSSISPackageServiceCS.asmx

I get an error indicating package failure.

I have enabled logging in SSIS. The package log indicates the following:

Failed to acquire connection "APNetDS". Connection may not be configured correctly or you may not have the right permissions on this connection.

Effectively, my web service impersonated account (which is my admin account) is not being authenticated for any of the db connection (uses windows integrated authentication) and I find that odd. To impersonate, I have set the Impersonation to true in the web.config file. The authentication mode is windows.

Please tell me what bit of security I am missing? In case if it helps, the database connection is to my local database and hence should not deny access to my own account. And yes, I think my impoersonation is working because when I debug, the user.identity shows my user id.

Thank you,

Sumeet

View 9 Replies View Related

Reporting Services :: Calling SSIS Package From SSRS

Jul 23, 2008

Need some clarification on calling an SSIS package from SSRS.  I have managed to get this to work, but only if I actually build the SSIS package on the report server machine.My SSIS package is very simple it.  The control flow is a single data flow task. Within the data flow task is an ole db data source and a data reader destination.  I verified that the package works in BIDS.
 
If I build it and deploy it on the report server I can execute it just fine from integration services (using the dtexec UI panel) in SSMS, no validation errors and no execution errors.If I try to build a dataset (specifying SSIS as the data source type) then immediately on referencing the package I get a "Package failed to validate error".  However, if I bring the whole project over to the report server and build it then I can reference it from my Report Services project.
 
I'm using package deployment security of "Don't Save Sensitive" for the SSIS package with the 'sa' login.  After the deployment package is built I edit the connection string to include the password.The remote execution account for the Report Server is set to the administrator of the box.  I know these account permissions are overkill, but I'll iron all that out once I get the basic pieces in place and working.

View 11 Replies View Related

SSIS OnError Calling Package Level Event Handler Twice..little Help Here!

Oct 6, 2006

My project currently has task which have their own individual event handlers that get called onError (setup event messages). I also have a package level event handler that performs a generic task (sending events to the windows eventviewer) In the package level event handler there is a script task that decides on a boolean variable whether to "Success" or "Failure" to different task. When I fail one task of the main control flow, the task level event handler runs, then the package level event handler runs, and then it also runs again for some unknown reason. The second time it runs it picks up the value of a variable set in the variables window. However, I change this value at runtime to the value from a database. I can't understand why it would run the second time, and if it did run why it would have the value from the variables window and not the value that is set in memory. It's like the event handler runs with the value from memory and then runs and picks the values back out of the variables window, replacing the db values and re-runs.

Maybe the package itself is failing all together and then re-runing the package level event handler?

Any help would be greatly appreciated.

-Chris

View 1 Replies View Related

Error Running SQL 2005 SSIS Package When Calling It From MS Access

Dec 17, 2007


I am trying to execute an SSIS package from an MS Access 2003 database that imports a table from the Access database into a target table in SQL 2005. I saved the package in SQL 2005 and tested it out. If I run it from the Management Studio Console with Run->Execute ... everything works just fine. However, if I try to run it using "Exec master.dbo.xp_cmdshell 'DTExec /SER DATAFORCE /DTS SQL2005TestPackage /CHECKPOINTING OFF /REPORTING V'" the execution will always fail when the Access database is open (shared mode). It will only work when the Access database is not open. The connection manager looks like this: "Data Source=E:Test.mdb;Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Jet OLEDB:Global Bulk Transactions=1". The error is listed below:

Code: 0xC0202009
Source: NewPackage Connection manager "SourceConnectionOLEDB"
Description: An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "Microsoft JET Database Engine" Hresult: 0x80004005 Description: "Could not use ''; file already in use.".


What am I doing wrong?

View 5 Replies View Related

SQL Server 2008 :: Importing SSIS Package Into File Store And Calling It Within A Job

Oct 9, 2015

I've imported an SSIS package into Management Studio (2008 R2) and I've set up a SQL Server Agent job to call the package but it fails due to error code: 0xc00160aa.

As far as I can tell this is because it is unable to read the location of the package despite it being a file system location within Management studio. Also I can run the package manually within Management Studio, but when I try to call it via the job it fails.

View 0 Replies View Related

Remoting Timeout When Calling SSIS Package Execute From A Windows Service

Sep 12, 2007

When running an integration services package from a windows service I get the "Object ... has been disconnected or does not exist at the server." exception after aproximately six minutes of execution.

This is *not* my windows service failing. I can loop indefinately while tracing to a log file within the service and it will run forever. While calling the mypackage.execute(...) method however, after six minutes (give or take) the exception is thrown...

my code looks something like this:
<code>
dim foo as Microsoft.SqlServer.Dts.Runtime.Application
mypackage = foo..LoadPackage(strimportPkgFilename, pkgevents)
results = myPackage.Execute(Nothing, Nothing, pkgevents, Nothing, Nothing)
</code>

<error>
A first chance exception of type 'System.Runtime.Remoting.RemotingException' occurred in mscorlib.dll
Exception in: frmMyForm.DoImports
Message: Object '/b76f98a0_5bd9_49d8_a524_eeb49d55b303/bqbhkjnaofq_ifr_cwz+srid_1.rem' has been disconnected or does not exist at the server.
</error>

oddly, this same code works perfectly if I run it within a windows form application no matter how long it takes.

It also runs fine if the package can complete in under six minutes.

Any suggestions?

Mark

View 2 Replies View Related

ActiveX Script In A SSIS Package - Calling An FSO To Create/manipulate Files

Jul 3, 2007

I have a SQL2000 DTS package that executes vbscript to loop through a recordset which:

- runs a stored procedure and populated tables

- builds a recordset from the populated tables to write records to an Excel file

- writes status to text files with either the error or success notices



I use FSO to set up the success and error files, but the scheduled job in SQL2005 which calls the SSIS package returns the following error:

"Retrieving the file name for a component failed with error code 0x0015F74C"



I can successullly run this (vbscript) in both the SSIS package via the BI Development Studio and in MS Access (exactly the same code in both) - but not as a SSIS package called in a scheduled job in SQL2005.



I am at an impasse with this ... any and ALL assistance would be GREATLY appreciated.



TIA,



Bob

View 1 Replies View Related

Get The C# Code From A SSIS Package

Oct 25, 2007



Hi,

is it possible to deduce the c# code from from a SSIS package?

thanks.

View 1 Replies View Related

SSIS Package Execution From C# Code

Apr 17, 2007



Hi All,



This not a problem but here i wan to give u my some trial on package execution from C# code.

i just want to make sure whether this is right way or not?



I need to upload some processed text file into table using SSIS packages. I m calling these packages in runtime for different source text files passed to it.



I first created package on my machine and deployed packages on Sql server using default protection level. So when i m tryng to execute it from integration services it wont work giving some exception in AquireConnectionCall() , its coz all the sensitive information is stroed inside package is not available to that machine.



In C#

Now i m loading this package using LoadFromSqlServer().
I am creating connection manager object for each of source and destination type and then setting all sensitve information from my solution's config file.
Set the protection level of package and available connection managers to DontSaveSensitve.

by using this method m able to execute any package created on any machine with default protection level.



Can any one of tell me -ve aspects of this approach?



Thanks

View 5 Replies View Related

SSIS Package Not Getting Executed From The Code.

Dec 17, 2007

Hi Friends,

I am a newby to SSIS and it has been around 2 weeks since I have started with SSIS in my project.

Now, I have been able to successfully build the SSIS package for my project need which is to export all the data from excel source file to the destination database tables after certain validations and modifications. So, when I run the package from the Visual Studio, it runs fine, but actually we have to call the SSIS package from the Webpage through ASP.NET. I have used following code, for loading and executing the package on the page load event.

protected void Page_Load(object sender, EventArgs e)
{
Application app = new Application();

// Load package from file system
Package package = app.LoadPackage("C:\Monitor 3\EEObjectImportSSISPackage\ImportCustomPointObject.dtsx", null);

Variables vars = package.Variables;
vars["selectedArea"].Value = 1050;

DTSExecResult result = package.Execute(null, vars, null, null, null);
}

All the connections and the log details are configured in the package itself. I am not much expert on the how to configure the package properly, as this is my first hands on effort at SSIS.

Unfortunately, I am not able to execute the package from the above piece of code. I have tried referring to various blogs, but none could come to my rescue. On the page load, it generates the log which notes below errors.

#Fields: event,computer,operator,source,sourceid,executionid,starttime,endtime,datacode,databytes,message

OnError,PRODSK0418,PRODSK0418ASPNET,Filling table from Excel file after validation,{81E15B75-B9B8-48EB-9B46-936C240EF9E0},{A0D5ECDF-E6CA-41AD-A9A5-1FF66E027FA1},12/13/2007 4:20:48 PM,12/13/2007 4:20:48 PM,-1071611876,0x,SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "Excel Connection Manager" failed with error code 0xC0202009. There may be error messages posted before this with more information on why the AcquireConnection method call failed.

OnError,PRODSK0418,PRODSK0418ASPNET,Filling table from Excel file after validation,{81E15B75-B9B8-48EB-9B46-936C240EF9E0},{A0D5ECDF-E6CA-41AD-A9A5-1FF66E027FA1},12/13/2007 4:20:48 PM,12/13/2007 4:20:48 PM,-1073450985,0x,component "Excel Source for CustomPoint object" (1) failed validation and returned error code 0xC020801C.

OnError,PRODSK0418,PRODSK0418ASPNET,Filling table from Excel file after validation,{81E15B75-B9B8-48EB-9B46-936C240EF9E0},{A0D5ECDF-E6CA-41AD-A9A5-1FF66E027FA1},12/13/2007 4:20:48 PM,12/13/2007 4:20:48 PM,-1073450996,0x,One or more component failed validation.

OnError,PRODSK0418,PRODSK0418ASPNET,Filling table from Excel file after validation,{81E15B75-B9B8-48EB-9B46-936C240EF9E0},{A0D5ECDF-E6CA-41AD-A9A5-1FF66E027FA1},12/13/2007 4:20:48 PM,12/13/2007 4:20:48 PM,-1073594105,0x,There were errors during task validation.


Can any one please give me your expert advice on this matter and help me in solving the problem? I am in real need to get this solved.

Hope to get your quick reply n this matter. Please feel free to let me know in case of any questions in this matter.

Thanks and Regards,
- Parimal Jisaheb

View 15 Replies View Related

Running SSIS Package Using .Net Code

Aug 2, 2007

I am running this code my question is when it runs ExecuteNonQuery() it doesn't wait for package to complete It just returns "Package succeeded' - The way you can test if you run this code 2 times one after another. ExecuteNonQuery() breaks with error -
SQLServerAgent Error: Request to run job RunSsisPkg (from User DomainUser) refused because the job is already running from a request by User DomainUser.

How can I check before return package is running and wait to complete before return?

using System;

using System.Data;

using System.Data.SqlClient;

namespace SSISRun

{

class Program

{

static void Main(string[] args)

{

SqlConnection jobConnection;

SqlCommand jobCommand;

SqlParameter jobReturnValue;

SqlParameter jobParameter;

int jobResult;

jobConnection = new SqlConnection("Data Source=(local);Initial Catalog=msdb;Integrated Security=SSPI");

jobCommand = new SqlCommand("sp_start_job", jobConnection);

jobCommand.CommandType = CommandType.StoredProcedure;

jobReturnValue = new SqlParameter("@RETURN_VALUE", SqlDbType.Int);

jobReturnValue.Direction = ParameterDirection.ReturnValue;

jobCommand.Parameters.Add(jobReturnValue);

jobParameter = new SqlParameter("@job_name", SqlDbType.VarChar);

jobParameter.Direction = ParameterDirection.Input;

jobCommand.Parameters.Add(jobParameter);

jobParameter.Value = "PackageName";

jobConnection.Open();



jobCommand.ExecuteNonQuery();

jobResult = (Int32)jobCommand.Parameters["@RETURN_VALUE"].Value;

jobConnection.Close();

switch (jobResult)

{

case 0:

Console.WriteLine("Package succeeded.");

break;

default:

Console.WriteLine("Package failed.");

break;

}



}

}

}

View 10 Replies View Related

Execute A SSIS Package From Java Code

Sep 11, 2006

Hi!

Is it possible to execute a SSIS package using Java? How?

Thank you!

View 1 Replies View Related

Simultaneous Execution Of The Same SSIS Package From Code

Jul 26, 2007

Hello

I am trying to call the same package with different starting parameters using asynchronous method calls.

My code is


namespace ReconHost

{






public partial class HostContainer : Form

{



public delegate void InvokePackageHandler(

Microsoft.SqlServer.Dts.Runtime.Application app,
int var
);


Microsoft.SqlServer.Dts.Runtime.Application app;


public HostContainer()

{


InitializeComponent();





for (int i = 0; i < 2; i++)

{


app = new Microsoft.SqlServer.Dts.Runtime.Application();

InvokePackageHandler asyncInvokePackageHandler = InvokePackage;

asyncInvokePackageHandler.BeginInvoke(app, i, null, null);

}


}



public void InvokePackage(Microsoft.SqlServer.Dts.Runtime.Application app, int var)

{


Package pkg = app.LoadPackage(@"c:GRSGRSGRSTest_Async.dtsx", null);

pkg.Variables["intVar"].Value = var;

pkg.Execute();

pkg = null;

}

}





}

If I set the for loop to loop just once, the package is executed fine. Any more than once and only one instance of the package is executed.

Does anyone know what I am doing wrong? I know it is possible to execute the two package instances simultaneously because you can use DTexecUI.exe on two clients to do this.

Thanks in advance
Tomo

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved