1

I'm trying to run an SSIS job daily using the SQL Server Agent. In my job step I have:

Type - Operating System (CmdExec)

Run as: Sql Server Agent Service Account

Command: "C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\DTExec.exe"/F"C:\Users\Administrator\Documents\SourceToTarget\SourceToTarget\TestSqlServerAgent\TestSqlServerAgent\GoogleGeocode.dtsx"

When I run this I get an error saying: "At least one of the DTS, SQL, ISServer or File options must be specified. Process Exit Code 6"

Does anyone know how to fix this?

Joey
  • 31
  • 4
  • Any particular reason you're using the OS type instead of SSIS? – billinkc Feb 24 '17 at 19:10
  • You should probably define this step as an SSIS. You can still choose to point to the .dtsx file in the File System, but paths will be relative to the server, so you'll want to make sure the server has access to the filepath. You could also add the SSIS package to the package store on the server. – digital.aaron Feb 24 '17 at 19:17

2 Answers2

0

The best way to chose your command is to open the package, go to commandline tab and copy the whole line. Then put this line in front of DTExec command. You do that you need to make sure your connectionstrings a properly set up. Fire the command like this and you'll be fine.

Laeeq
  • 66
  • 4
0

If your command line truly is

"C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\DTExec.exe"/F"C:\Users\Administrator\Documents\SourceToTarget\SourceToTarget\TestSqlServerAgent\TestSqlServerAgent\GoogleGeocode.dtsx"

Then the problem is that you need a space between the arguments

"C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\DTExec.exe" /F "C:\Users\Administrator\Documents\SourceToTarget\SourceToTarget\TestSqlServerAgent\TestSqlServerAgent\GoogleGeocode.dtsx"

Unfortunately, testing that on my machine doesn't yield the error message you've encountered.

In fact, searching for DTEXEC error code yielded this fine answer from William Salzman which reinforces my guess that the supplied arguments for your agent job have been simplified/obfuscated for posting.

Community
  • 1
  • 1
billinkc
  • 59,250
  • 9
  • 102
  • 159