?
SolvedPrivate

Running an SSIS package from a bat file

Posted on 2014-04-07
5
Medium Priority
?
53 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 57

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 57

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 Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

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

Lessons learned during ten years of interviewing for SQL Server Integration Services (SSIS) and other Extract-Transform-Load (ETL) contract roles and two years of staff manager interviewing contractors.
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.
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

765 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