Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Run SSIS packages from remote client with stored procedure


Run SSIS packages from remote client with stored procedure

Author
Message
JasonRowland
JasonRowland
SSC-Enthusiastic
SSC-Enthusiastic (103 reputation)SSC-Enthusiastic (103 reputation)SSC-Enthusiastic (103 reputation)SSC-Enthusiastic (103 reputation)SSC-Enthusiastic (103 reputation)SSC-Enthusiastic (103 reputation)SSC-Enthusiastic (103 reputation)SSC-Enthusiastic (103 reputation)

Group: General Forum Members
Points: 103 Visits: 1115
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.
nlarge
nlarge
Forum Newbie
Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)

Group: General Forum Members
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.
macqueen
macqueen
SSC Rookie
SSC Rookie (31 reputation)SSC Rookie (31 reputation)SSC Rookie (31 reputation)SSC Rookie (31 reputation)SSC Rookie (31 reputation)SSC Rookie (31 reputation)SSC Rookie (31 reputation)SSC Rookie (31 reputation)

Group: General Forum Members
Points: 31 Visits: 115
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.



phillip.snipes
phillip.snipes
SSC Rookie
SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)

Group: General Forum Members
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,
JasonRowland
JasonRowland
SSC-Enthusiastic
SSC-Enthusiastic (103 reputation)SSC-Enthusiastic (103 reputation)SSC-Enthusiastic (103 reputation)SSC-Enthusiastic (103 reputation)SSC-Enthusiastic (103 reputation)SSC-Enthusiastic (103 reputation)SSC-Enthusiastic (103 reputation)SSC-Enthusiastic (103 reputation)

Group: General Forum Members
Points: 103 Visits: 1115
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.
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