This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
Well, apart from the fact that most people probably don't know what the required syntax for the DTSRUN command is, you haven't showed us the command you are using. All we see is a Java statement which generates that command from a string and some other data. The first step in figuring out what's wrong with the command would be to actually look at the command.
Paul where I have DTSRun is the command that I had decrypted. That is what I know the command to be thatis being executed. Sorry to be so thick. That is the syntax that ms sql server says to use from what I've read.
No, it isn't. It's a string expression whose value is the command which is then executed. I'm asking you to display the value of that variable. As you suggest, that shouldn't be that difficult.
The next step is to copy the value of that variable and paste it at the command line. Usually what happens with questions like these is that the questioner hasn't used the same command in the Java code that they used in testing, but only something similar.
In stepping through the code in my java file here is the value of cmd:
The error, though would like some confirmation, that the "/" in the string got flipped to that above. Is that correct.
Here are the errors that got written to my console:
DTSRun: Must specify a package source server or filename.
20110413 09:40:35 DTSRun: Invalid command options
20110413 09:40:37 Usage: dtsrun /option [value] [/option [value]] ...
20110413 09:40:38 Options ('/?' shows this screen; '-' May be substituted for '/'):
20110413 09:42:33 Package retrieval:
20110413 09:42:46 /~S Server Name
20110413 09:42:49 /~U User Name
20110413 09:42:51 /~P Password
20110413 09:42:55 /E <Use trusted connection instead of /U /P>
20110413 09:42:58 /~N Package Name
20110413 09:43:01 /~M Package Password
20110413 09:43:03 /~G Package Guid String
20110413 09:43:07 /~V Package Version Guid String
20110413 09:43:09 /~F Structured Storage UNC filename (overwritten if /S also specified)
20110413 09:43:11 /~R Repository Database Name <uses default if blank; loads package from repository database>
20110413 09:43:15 Package operation (overrides stored Package settings):
20110413 09:43:19 /~A Global Variable Name:typeid=Value <may quote entire string (including name:typeid)>
20110413 09:43:24 /~L Log file name
20110413 09:43:26 /~W Write Completion Status to Windows Event Log <True or False>
20110413 09:43:29 DTSRun action (default is to execute Package):
20110413 09:43:31 /!X <Do not execute; retrieves Package to /F filename>
20110413 09:43:34 /!D <Do not execute; drop package from SQL Server (cannot drop from Storage File)>
20110413 09:43:36 /!Y <Do not execute; output encrypted command line>
20110413 09:43:38 /!C <Copies command line to Windows clipboard (may be used with /!Y and /!X)>
20110413 09:43:41 Notes:
20110413 09:43:43 ~ is optional; if present, the parameter is hex text of encrypted value (0x313233...)
20110413 09:43:44 Whitespace between command switch and value is optional
20110413 09:43:46 Embedded whitespace in values must be embedded in double-quotes
20110413 09:43:47 If an option is specified multiple times, the last one wins (except multiple /A)
20110413 09:44:19 Error: -2147467259 (80004005); Provider Error: 0 (0)
20110413 09:44:22 Error string: DTSRun: Must specify a package source server or filename.
20110413 09:44:26 Error source: Microsoft Data Transformation Services (DTS) Package
20110413 09:44:29 Help file: sqldts80.hlp
20110413 09:44:31 Help context: 0
20110413 09:45:05 Error executing DTS package. Returned code=1