What is wrong in this CommandLine for SSIS Package that executed from a Job
Hello, I am trying to pass Command Line for the SSIS Package as below from SP and I get error: Message Executed as user: REDMOND\username. ximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors. End Warning DTExec: The package execution returned DTSER_FAILURE (1). Started: 5:50:27 AM Finished: 5:50:29 AM Elapsed: 1.766 seconds. The package execution failed. The step failed. Here is the SQL Query that set: SET @CommandLine = '/DTS "\MSDB\SubmitPackage"' + ' /SERVER "' + CONVERT(nvarchar(128), SERVERPROPERTY('servername')) + '"' + ' /MAXCONCURRENT " -1 " /CHECKPOINTING OFF' + ' /SET "\Package\Extract and Transformation\Data Flow - Extract.Properties[[XML Source - Issue].[XMLData]]";"' + @FilePath + '"' + ' /SET "\Package\Extract and Transformation\Data Flow - Extract.Properties[[XML Source - Issue].[XMLSchemaDefinition]]";"' + @SchemaPath + '"' + ' /SET "\Package.Connections[StagingConnection].Properties[ServerName]";"' + CONVERT(nvarchar(128), SERVERPROPERTY('servername')) + '"' + ' /SET "\Package.Connections[TargetConnection].Properties[ServerName]";"' + CONVERT(nvarchar(128), SERVERPROPERTY('servername')) + '"' + ' /SET "\Package.Variables[User::SubmissionId].Properties[Value]";"' + CONVERT(nvarchar(128), @SubmissionId) + '"' + ' /SET "\Package.Variables[User::VersionId].Properties[Value]";"' + CONVERT(nvarchar(128), @VersionId) + '"' This Looks like results: /DTS "\MSDB\SubmitPackage" /SERVER "DEV-SQL-01" /MAXCONCURRENT " -1 " /CHECKPOINTING OFF /SET "\Package\Extract and Transformation\Data Flow - Extract.Properties[[XML Source - Issue].[XMLData]]";"\\file-share-01\Files\Issue.xml" /SET "\Package\Extract and Transformation\Data Flow - Extract.Properties[[XML Source - Issue].[XMLSchemaDefinition]]";"\\file-share-01\Xsd\Sub.xsd" /SET "\Package.Connections[StagingConnection].Properties[ServerName]";"DEV-SQL-01" /SET "\Package.Connections[TargetConnection].Properties[ServerName]";"DEV-SQL-01" /SET "\Package.Variables[User::SubmissionId].Properties[Value]";"25197" /SET "\Package.Variables[User::VersionId].Properties[Value]";"1009" What could be the reson I get above error? Thanks, Prabhat
August 26th, 2010 4:17pm

Can you give us all the error message(s) (excluding your personal stuff, of course). Seems there should be an error in front of the one posted. Have you tried DTEXEC instead of /DTS in the command? Also, I wouldn't be setting ServerName properties via the conmmand line, instead, I use a SQL Configuration File to set the ConnectionString property of the Connection Managers. Try stripping your command down along with executing a SIMPLE package (maybe one that only has an EXECUTE SQL TASK set to GETDATE() until you get to a point where it works. Then add/concatenate other elements until it DOESN'T work. Simple "swap-nostics".Todd C - MSCTS SQL Server 2005 - Please mark posts as answered where appropriate.
Free Windows Admin Tool Kit Click here and download it now
August 26th, 2010 4:34pm

Thanks Todd for the input. When I tried to execeute the command using DTEXEC (after I enable in the server) I get return code = 6 (The utility encountered an internal error of syntactic or semantic errors in the command line.). Thanks, Prabhat
August 26th, 2010 4:55pm

Try hard-coding the string to start. Then once you get that to work, build your concatenations so they match. But first we gotta get the string to work. Check BOL for proper use of DTEXEC command line. Maybe start by using the DTExecUI graphical tool and then checking the Command Line tab to see what it generated for a DTEXEC command. Is your package stored in the MSDB database? then the syntax is DTEXEC /SQL MyFolder\MyPackage (or "My Folder\My Package" if you have spaces in the name.Todd C - MSCTS SQL Server 2005 - Please mark posts as answered where appropriate.
Free Windows Admin Tool Kit Click here and download it now
August 26th, 2010 5:06pm

I tried step by step and at last looks like it is working. I am investigating the root cause for syntax error in passing params. Thanks, Prabhat
August 26th, 2010 6:24pm

Did you get this working? I am having the same problems... see my syntax below.. /SET "\Package.Variables[User::EmailRecipients].Properties[Value]";"\"Bh@yahoo.com" /SET "\Package.Connections[ExcelFile].Properties[ServerName]";"\"D:\test.XLS" /SET "\Package.Connections[InterfaceAudit].Properties[ServerName]";"\"ENDWXX" /SET "\Package.Connections[MSDB].Properties[ServerName]";"\"ENDWXX;" /SET "\Package.Connections[Surplus1].Properties[ServerName]";"\"ENDXX;" any suggestions to get this line correct? Thanks
Free Windows Admin Tool Kit Click here and download it now
March 11th, 2011 7:53pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics