Executing a package with DTEXEC

Last Post 04 Mar 2011 09:58 AM by daviesow. 7 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
PaulMcKibben
New Member
New Member

--
23 Jul 2010 01:01 PM
We have SQL and SSIS installed on two separate machines. 
The developers have created packages with configuration files in C:\Program Files\SSIS Configurations.

Since a folder under Program Files on a server is a violation.  I have written the following code in a batch file.

DTEXEC /F "E:\Packages\ISOS\Transactional\WPS_NC_Auth_OUT_001.dtsx"
/Conf "E:\Packages\ISOS\Transactional\WPS_NC_Auth_OUT_001.dtsConfig"
/l "DTS.LogProviderTextFile;E:\Packages\log.txt"

When I execute it, I get  errors on the /Conf and /l.  I need to specify a new location for the configuration file and want to add logging for subsequent troubleshooting. 

Any thoughts on what I am doing wrong?

Any help is greatly appreciated.
rm
New Member
New Member

--
24 Jul 2010 09:31 AM
Is e:\ a local disk where you run the package? What was the error?
PaulMcKibben
New Member
New Member

--
26 Jul 2010 07:50 AM
Yes E: is a local drive.

/Conf is not recognized as an internal or external command, operable program or batch file. The same error is recieved from /l
rm
New Member
New Member

--
26 Jul 2010 11:55 AM
Did you see those options with 'dtexec /?' in dos prompt on the machine?
PaulMcKibben
New Member
New Member

--
26 Jul 2010 12:26 PM
They are listed as options. The /Conf shows IDorName;ConnectionString. The /L shows ClassIDorName;ConnectionString. The sites that I have looked at only show the connection string. Do you have an example of the other by chance?

Thank you.
PaulMcKibben
New Member
New Member

--
27 Jul 2010 07:26 AM
When I change the batch file's source to:

dtexec /f "E:\Packages\PaulTest\Integration Services Project1\Integration Services Project1\Package.dtsx"
"/Config E:\Packages\PaulTest\PaulTest1.dtsConfig"
"/L DTS.LogProviderTextFile;E:\Packages\PaulTest\Log.txt"
pause

I recieve "The filename, directory name, or volume label syntax is incorrect"

I am at a loss.
rm
New Member
New Member

--
27 Jul 2010 10:59 AM
Books online has samples under 'dtexec Utility', and you can't put option name inside " ". By the way, I got /Conf[igFile] Filespec with 'dtexec /?'.
daviesow
New Member
New Member

--
04 Mar 2011 09:58 AM
Are you actually placing the /Config and /L options on separate lines in your batch file just like you show here?

A batch file executes line by line with each one being sent off as a command line to be executed by the shell. So if your batch file is exactly as shown your first direction to the windows shell is to run:

DTEXEC /F "E:\Packages\ISOS\Transactional\WPS_NC_Auth_OUT_001.dtsx"

which it happily goes off and does (without the config or logging). Then you issue your next command:

/Conf "E:\Packages\ISOS\Transactional\WPS_NC_Auth_OUT_001.dtsConfig"

which makes absolutely no sense on it's own. Windows shell is off looking for something called /Conf to execute and doesn't find it. Then you issue the command:

/l "DTS.LogProviderTextFile;E:\Packages\log.txt"

which again makes no sense on it's own.

Normally you put your command and all options together on one line in a batch file no matter how strange it looks or how much scrolling it takes.


That being said, there is a little-known line-continuation character available for windows batch files; the carat (^) alone at the end of the line says "Don't run this yet, include the next line as well." So if your batch file were as follows it would work fine:

DTEXEC /F "E:\Packages\ISOS\Transactional\WPS_NC_Auth_OUT_001.dtsx" ^
/Conf "E:\Packages\ISOS\Transactional\WPS_NC_Auth_OUT_001.dtsConfig" ^
/l "DTS.LogProviderTextFile;E:\Packages\log.txt"
pause
You are not authorized to post a reply.

Acceptable Use Policy