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

How to Excecute ssis package from excel Expand / Collapse
Author
Message
Posted Tuesday, November 12, 2013 12:30 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, July 17, 2014 10:48 AM
Points: 12, Visits: 63
I have excel vba code in excel where i would like to add code to execute ssis package from excel. please help
Post #1513596
Posted Tuesday, November 12, 2013 1:25 PM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 4:44 AM
Points: 13,637, Visits: 10,521
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 LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1513619
Posted Friday, November 22, 2013 12:07 PM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Friday, June 27, 2014 2:05 PM
Points: 300, Visits: 810
concur on terrible idea, especially if Excel is in hands of users.
Post #1516897
Posted Friday, May 30, 2014 1:58 PM


SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Tuesday, August 26, 2014 2:42 PM
Points: 408, Visits: 227
Why do you think this a terrible idea?

Just wondering.

Susan



Post #1576268
Posted Friday, May 30, 2014 2:16 PM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Friday, August 29, 2014 1:51 PM
Points: 21,644, Visits: 15,317
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


SQL RNNR

Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #1576281
Posted Sunday, June 1, 2014 1:45 PM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 4:44 AM
Points: 13,637, Visits: 10,521
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 LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1576434
Posted Monday, June 2, 2014 2:28 PM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Friday, June 27, 2014 2:05 PM
Points: 300, Visits: 810
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.

Post #1576771
Posted Tuesday, June 3, 2014 6:29 AM


SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Tuesday, August 26, 2014 2:42 PM
Points: 408, Visits: 227
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



Post #1576928
Posted Wednesday, June 4, 2014 12:06 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 3:11 AM
Points: 5,047, Visits: 11,800
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.

When you ask a question (and please do ask a question: "My T-SQL does not work" just doesn't cut it), please provide enough information for us to understand its context.
Post #1577214
Posted Wednesday, June 4, 2014 12:05 PM


SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Tuesday, August 26, 2014 2:42 PM
Points: 408, Visits: 227
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. :)

thanks

S



Post #1577471
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse