Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
SolvedPrivate

Running an SSIS package from a bat file

Posted on 2014-04-07
5
Medium Priority
?
54 Views
Last Modified: 2016-02-10
Hi,
I can run an SSIS package from the command prompt using the following command;
c:\Program Files\Microsoft SQL Server\100\DTS\Binn>dtexec.exe /f c:\batch\writeSuccesWhenPackageFails.dtsx

Open in new window

I now need to call this package from a batch file.
What is the syntax I need to put in the batch file?
Any guidance appreciated
Thanks
0
Comment
Question by:blossompark
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 25

Assisted Solution

by:Lee Savidge
Lee Savidge earned 1000 total points
ID: 39982806
Well, there is no reason why you can't just put that line in a batch file like this but you need to take into account the spaces in the folder names:

@echo off
cd c:\Program Files\Microsoft SQL Server\100\DTS\Binn
dtexec.exe /f c:\batch\writeSuccesWhenPackageFails.dtsx

Open in new window

0
 
LVL 58

Accepted Solution

by:
Bill Prew earned 1000 total points
ID: 39982810
You can use basically the same syntax in a BAT file, although you will need to quote the program name since it has spaces.  So a simple BAT like this would run it:

@echo off
"c:\Program Files\Microsoft SQL Server\100\DTS\Binn>dtexec.exe" /f c:\batch\writeSuccesWhenPackageFails.dtsx

Open in new window

Depending on what you want to happen to the BAT file while the SSIS runs you can also use the START command, but no need to go into that added complexity if it isn't needed.

Try a BAT file as mentioned above and see how it goes.

~bp
0
 

Author Closing Comment

by:blossompark
ID: 39982839
Hi Lee and Bill,
Thanks for your comments

Below worked perfectly.
@echo off

"c:\Program Files\Microsoft SQL Server\100\DTS\Binn\dtexec.exe" /FILE "c:\batch\writeSuccesWhenPackageFails.dtsx"

PAUSE
0
 
LVL 58

Expert Comment

by:Bill Prew
ID: 39982852
Welcome, glad we were able to help.

~bp
0
 
LVL 25

Expert Comment

by:Lee Savidge
ID: 39982855
Glad to help :)
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

My client has a dictionary table. They're defining a list of standard naming convention. Now, they are requiring my team to provide us a mechanism how to match new incoming data with existing data in their system.
A couple of weeks ago, my client requested me to implement a SSIS package that allows them to download their files from a FTP server and archives them. Microsoft SSIS is the powerful tool which allows us to proceed multiple files at same time even w…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question