Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 7,2000
»
SQL Server Agent
»
SQL Server Agent Job - DTSRun Syntax Error
SQL Server Agent Job - DTSRun Syntax Error
Rate Topic
Display Mode
Topic Options
Author
Message
Don Sharp
Don Sharp
Posted Friday, August 08, 2008 8:27 PM
Forum Newbie
Group: General Forum Members
Last Login: Wednesday, September 03, 2008 6:50 AM
Points: 2,
Visits: 7
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.
Post #549682
Steve Jones - SSC Editor
Steve Jones - SSC Editor
Posted Sunday, August 10, 2008 5:18 PM
SSC-Dedicated
Group: Administrators
Last Login: Yesterday @ 1:47 PM
Points: 31,406,
Visits: 13,722
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?
Follow me on Twitter:
@way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
Post #549938
Don Sharp
Don Sharp
Posted Sunday, August 10, 2008 9:13 PM
Forum Newbie
Group: General Forum Members
Last Login: Wednesday, September 03, 2008 6:50 AM
Points: 2,
Visits: 7
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.
Post #549967
pnewhart
pnewhart
Posted Tuesday, September 02, 2008 12:36 PM
SSC Veteran
Group: General Forum Members
Last Login: Tuesday, April 30, 2013 7:01 AM
Points: 267,
Visits: 271
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.
Post #562577
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.