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


How to Excecute ssis package from excel


How to Excecute ssis package from excel

Author
Message
scuby.me
scuby.me
Grasshopper
Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)

Group: General Forum Members
Points: 17 Visits: 84
I have excel vba code in excel where i would like to add code to execute ssis package from excel. please help
Koen Verbeeck
Koen Verbeeck
SSCoach
SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)

Group: General Forum Members
Points: 16459 Visits: 13207
Let's first state that I find this a terrible idea, but maybe you have a valid use case.
You can start an SSIS package either by calling dtexec.exe directly from the VBA code using the correct parameters (or by launching a bat script that does the same), or you can create a SQL Server Agent job and start the job with a stored procedure from the VBA code.



How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at SQLKover.

MCSA SQL Server 2012 - MCSE Business Intelligence
herladygeekedness
herladygeekedness
Old Hand
Old Hand (318 reputation)Old Hand (318 reputation)Old Hand (318 reputation)Old Hand (318 reputation)Old Hand (318 reputation)Old Hand (318 reputation)Old Hand (318 reputation)Old Hand (318 reputation)

Group: General Forum Members
Points: 318 Visits: 813
concur on terrible idea, especially if Excel is in hands of users.
SuzSQL
SuzSQL
SSC-Addicted
SSC-Addicted (444 reputation)SSC-Addicted (444 reputation)SSC-Addicted (444 reputation)SSC-Addicted (444 reputation)SSC-Addicted (444 reputation)SSC-Addicted (444 reputation)SSC-Addicted (444 reputation)SSC-Addicted (444 reputation)

Group: General Forum Members
Points: 444 Visits: 294
Why do you think this a terrible idea?

Just wondering.

Susan



SQLRNNR
SQLRNNR
SSC-Insane
SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)

Group: General Forum Members
Points: 21079 Visits: 18259
SuzSQL (5/30/2014)
Why do you think this a terrible idea?

Just wondering.

Susan


This is a pretty old thread.

Why launch an executable from within excel? Excel is not a database, is not an operating system, is not a task scheduler, etc etc etc.

Creating a workbook to allow endusers the ability to kick off SSIS packages is an easy way to abuse the application and an easy way to get things screwed up in the database (since SSIS packages will generally have something to do with the database).



Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server, MVP


SQL RNNR

Posting Performance Based Questions - Gail Shaw

Koen Verbeeck
Koen Verbeeck
SSCoach
SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)

Group: General Forum Members
Points: 16459 Visits: 13207
SQLRNNR (5/30/2014)
SuzSQL (5/30/2014)
Why do you think this a terrible idea?

Just wondering.

Susan


This is a pretty old thread.

Why launch an executable from within excel? Excel is not a database, is not an operating system, is not a task scheduler, etc etc etc.

Creating a workbook to allow endusers the ability to kick off SSIS packages is an easy way to abuse the application and an easy way to get things screwed up in the database (since SSIS packages will generally have something to do with the database).


+1
This idea has a great potential for disaster.



How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at SQLKover.

MCSA SQL Server 2012 - MCSE Business Intelligence
herladygeekedness
herladygeekedness
Old Hand
Old Hand (318 reputation)Old Hand (318 reputation)Old Hand (318 reputation)Old Hand (318 reputation)Old Hand (318 reputation)Old Hand (318 reputation)Old Hand (318 reputation)Old Hand (318 reputation)

Group: General Forum Members
Points: 318 Visits: 813
SSIS pkgs weren't meant for this kind of ad hoc firing. Obviously, everything depends on your unique environment, but here, an SSIS pkg could be moving gigs or terabytes of data. Deciding when to move that data is not something I would want left to a user. We schedule pkgs to do their work at the times best for our workloads and there are pkgs dependent upon other pkgs and we need to control that else risk really bad data.

If the pkg does cause a problem, there is a good chance that the user has no idea, just "Clicked on the button Bob made for me.... maybe an hour or two ago" I'm sure the pkg firing could be found/traced but not as easily as when it goes thru Agent.

Further, what if User A fires the pkg at 8 am, closes the workbook and goes on with their day. User B opens workbook within the hour or nearly so, and is unaware that User A already fired the pkg, so executes it again. This is fast track to duplication, let alone unexpected, unintended resource utilization.

Excel is an analysis tool. While it can do more, using it in this manner should only be done under very close supervision for the most trusted employees, and with DR in place. Every environment is different and there could be a very good reason why they need to do it via Excel at user option vs regular schedule.
SuzSQL
SuzSQL
SSC-Addicted
SSC-Addicted (444 reputation)SSC-Addicted (444 reputation)SSC-Addicted (444 reputation)SSC-Addicted (444 reputation)SSC-Addicted (444 reputation)SSC-Addicted (444 reputation)SSC-Addicted (444 reputation)SSC-Addicted (444 reputation)

Group: General Forum Members
Points: 444 Visits: 294
My situation was not a huge data load but instead was going to load worksheets from the excel to temporary tables and perform some calcs and return. Data needed to be crunched apart from excel for privacy reasons. Could be done with stored procs but I wanted to use SSIS because everything could be done in one swoop. As it turns out the ability to launch SSIS turned problematic and I have moved to a different solution but I believe that the solution would have been fine if I could have executed the package without jumping through hoops. It would not have mattered if the user launched it a million times as it was specific to their session and would have just failed if they closed out of excel.

thanks for the replies.

Susan



Phil Parkin
Phil Parkin
SSCrazy Eights
SSCrazy Eights (8.4K reputation)SSCrazy Eights (8.4K reputation)SSCrazy Eights (8.4K reputation)SSCrazy Eights (8.4K reputation)SSCrazy Eights (8.4K reputation)SSCrazy Eights (8.4K reputation)SSCrazy Eights (8.4K reputation)SSCrazy Eights (8.4K reputation)

Group: General Forum Members
Points: 8373 Visits: 19499
SuzSQL (6/3/2014)
My situation was not a huge data load but instead was going to load worksheets from the excel to temporary tables and perform some calcs and return. Data needed to be crunched apart from excel for privacy reasons. Could be done with stored procs but I wanted to use SSIS because everything could be done in one swoop. As it turns out the ability to launch SSIS turned problematic and I have moved to a different solution but I believe that the solution would have been fine if I could have executed the package without jumping through hoops. It would not have mattered if the user launched it a million times as it was specific to their session and would have just failed if they closed out of excel.

thanks for the replies.

Susan


Out of interest, what was your alternative approach?


Help us to help you. For better, quicker and more-focused answers to your questions, consider following the advice in this link.

If the answer to your question can be found with a brief Google search, please perform the search yourself, rather than expecting one of the SSC members to do it for you.

Please surround any code or links you post with the appropriate IFCode formatting tags. It helps readability a lot.
SuzSQL
SuzSQL
SSC-Addicted
SSC-Addicted (444 reputation)SSC-Addicted (444 reputation)SSC-Addicted (444 reputation)SSC-Addicted (444 reputation)SSC-Addicted (444 reputation)SSC-Addicted (444 reputation)SSC-Addicted (444 reputation)SSC-Addicted (444 reputation)

Group: General Forum Members
Points: 444 Visits: 294
We are going with the stored proc solution. click button , runs procs, returns #.

I really wanted the ssis to work and the concept worked in VS just not the execution from remote Excel. I made other packages for the same project and hoped to keep them together. Alas back to straight SQL. Smile

thanks

S



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