August 8, 2008 at 8:27 pm
I am trying to create a SQL Server Agent job to run a DTS package, but the job fails with an " Invalid command options" error. The job has only one step of type Operating System Command (CmdExec). The command I have entered is:
DTSRun /~N TEST_Import_SettlementExposures
where TEST_Import_SettlementExposures is the name of the DTS package. If I go to the DTS package and schedule it from there, the scheduled job runs fine, but the DTSRun command references the GUID of the DTS package. I will be moving this DTS package and job to another computer, so I can't just script the scheduled job as the GUID will be different on the new machine.
What is the proper syntax for the DTSRun command in the job step command window?
I am sure it is something stupid that I am overlooking, but I just can't see it.
I greatly appreciate any help with this.
August 10, 2008 at 5:18 pm
I think you need to reference the server as well. DTSRun needs to know where the package is. Is it in the file system? In msdb?
August 10, 2008 at 9:13 pm
It is in msdb (I'm assuming). It shows up under Data Transformation Services / Local Packages on the same server as the SQL Server Agent job.
September 2, 2008 at 12:36 pm
I was just trying to figure this out and I came across your post. Here's the solution that worked for me:
DTSRun /S"Server" /N"Package Name" /E
The tilde (~) is a switch that tells SQL Server to expect the information to be encrypted, so you don't need that in your case. When you right-click a package in SQL 2000 and select schedule, SQL Server defaults to creating the command string as encrypted. However, if your package doesn't have a password in the job, then I don't see a need for using encryption in the job step. Also, the /E specifies a trusted connection.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply