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 «««123

Run SSIS packages from remote client with stored procedure Expand / Collapse
Author
Message
Posted Thursday, January 14, 2010 8:38 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Tuesday, December 16, 2014 11:18 AM
Points: 91, Visits: 856
Thanks Nick. It looks interesting and if it's not too much to ask, I would like to see your solution published in an article so I can explore what it may have to offer that I can use.

I would like to point out that retrieving information from the logs is quite simple for me as I have SSRS reports with all the filters I need to drill down to any problems quickly and efficiently. Also, my environment consists of roughly of 20 machines trying to run ssis packages at any given time and this solution allows me to easily throttle the number of packages executing at one time preventing the sql server's resources from becoming completely consumed. Another thing is, the machines requesting the packages to be executed can't be waiting around for the package to finish running before they begin processing the next job in their queue.
Post #847603
Posted Thursday, January 14, 2010 8:53 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, May 9, 2011 7:38 AM
Points: 5, Visits: 48
Hello Jason.

Sadly I don't feel safe posting any more than I currently have done. I just intended the code that I posted to be visual eye-candy of what the code can bring to the application. Notice how easy it is for me to just set the variables in code and execute the package!

In terms of having packages run asynchronously or synchronously, that can be managed through the web service. I personally want to be sure that these processes work one after the other for transparency when I trace back the flow in the event that some negative effect happens.

In all, I just wanted to make a point that "there is more than 1 way to implement solutions", as this is the absolute way that Microsoft work. I would also like to point out that it is important for developers to be constantly studying new technologies. If you stray from the path and don't catch up then you can be left on an island with a small penknife and it then becomes a long uphill stretch to get back into the race. Although I had another member of staff develop the web service for me, I will, at some point, be expected to "own" the implementation so I also need to do some catch up and learn WCF asap - thats the name of the game, and thats what makes software development exciting - New Technology.

Nick.
Post #847624
Posted Thursday, January 14, 2010 9:08 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Friday, November 21, 2014 6:59 AM
Points: 31, Visits: 92
I think using WCF provides a robust solution to the need for executing SSIS packages remotely. I also think there is value in using Broker Servers when the resources for developing a WCF application are not available. The solution depends on the environment and resources available.

Agreed, passing a variable collection as you are doing is more attractive than having to build up a dtexec string that a stored procedure requires.

In regards to handling errors and getting error messages back from an SSIS package, I think WCF and Broker services offer similar functionality with a difference in implementation. Starting up a conversation to send a broker message to start a package does not mean that the conversation has to be over.

I use broker services to execute SSIS packages, and I also include broker messaging in my SSIS error handling where called for. If a task fails, then I can add an error handler to the task which calls a stored procedure to send broker messages back to the application. So a DBA can implement messaging with the skill set s/he already posses. This is where Broker Services shines in my opinion.




Post #847643
Posted Tuesday, January 19, 2010 9:16 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Tuesday, July 31, 2012 11:56 AM
Points: 35, Visits: 21
Jason,

I'd like to give this approach a try as it fits our use case scenario quite well but, I do not see the table creation scripts for the objects dbo.packageQueueLog and dbo.package_Queue; Would you have the table creation scripts, or parhaps could you post a replywith their schemas?

Thanks,
Post #849838
Posted Tuesday, January 19, 2010 5:45 PM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Tuesday, December 16, 2014 11:18 AM
Points: 91, Visits: 856
phillip.snipes (1/19/2010)
Jason,

I'd like to give this approach a try as it fits our use case scenario quite well but, I do not see the table creation scripts for the objects dbo.packageQueueLog and dbo.package_Queue; Would you have the table creation scripts, or parhaps could you post a replywith their schemas?

Thanks,


Phillip,
The table dbo.packageQueueLog isn't used in this solution and neither is the procedure dbo.spUpdatePackageQueueLog_executionID. Initially there was a lot more going on in this article, (logging, throttling, dynamic package variable values, etc...) but in order to get it approved by the editor I had to strip it down to the basics. It was a bit too busy I suppose.

The object dbo.package_Queue isn't a table, it is a service broker queue. The ddl for this object is:

create queue 
package_Queue
with status = on,
activation (procedure_name = spExecQueuedPackages,
max_queue_readers = 1, --Change this value to allow more or less packages to be executed on this queue simultaneously.
execute as 'dbo');

Also, don't forget to end the conversation somewhere in your process (dbo.spExecQueuedPackages is a good spot) as I forgot to do this. Thanks to macqueen for pointing that out.
Post #850168
« Prev Topic | Next Topic »

Add to briefcase «««123

Permissions Expand / Collapse