Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Execute Process Task calling SQMCMD


Execute Process Task calling SQMCMD

Author
Message
TeraByteMe
TeraByteMe
SSC-Enthusiastic
SSC-Enthusiastic (171 reputation)SSC-Enthusiastic (171 reputation)SSC-Enthusiastic (171 reputation)SSC-Enthusiastic (171 reputation)SSC-Enthusiastic (171 reputation)SSC-Enthusiastic (171 reputation)SSC-Enthusiastic (171 reputation)SSC-Enthusiastic (171 reputation)

Group: General Forum Members
Points: 171 Visits: 589
I have a script that runs transaction code to backup, copy, and restore a database. The backup is from a source database, the copy is to a UNC location on the destination server, and the restore is the the SQL instance installed on the destination server. The script I'm running works when run through the SSMS interface when using SQLCMD mode. I'm trying to create a SSIS package that runs the script on the source server/instance. The source is where the package would reside.

I have tried creating a Execute Process Task to run SQLCMD and have the task point to my script file location but it is failing. I have two data sources configured to include the source database and the destination database, same with the connection manager configuration. The script runs T-SQL code that runs stored procedures that are in the SQL Safe product

I'm not sure I'm going about this the right way? Shouldn't all that be needed is a Execute Process Task that runs SQLCMD which then reads the script from the script file, and two data source and connection manager connections?

Here is the error message I'm receiving:

SSIS package "Package.dtsx" starting.
Error: 0xC0029151 at Execute Process Task, Execute Process Task: In Executing "C:\Program Files\Microsoft SQL Server\100\Tools\Binn\SQLCMD.EXE" "-E -SeanDeYoung760 -i 'c:\Documents and Settings\Sean.DeYoung\My Documents\Script\script.sql'" at "", The process exit code was "1" while the expected was "0".
Task failed: Execute Process Task
Warning: 0x80019002 at Package: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded, but the number of errors raised (1) reached the maximum 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.
SSIS package "Package.dtsx" finished: Failure.

Any help or

A clever person solves a problem. A wise person avoids it. ~ Einstein
select cast (0x5365616E204465596F756E67 as varchar(128))
TeraByteMe
TeraByteMe
SSC-Enthusiastic
SSC-Enthusiastic (171 reputation)SSC-Enthusiastic (171 reputation)SSC-Enthusiastic (171 reputation)SSC-Enthusiastic (171 reputation)SSC-Enthusiastic (171 reputation)SSC-Enthusiastic (171 reputation)SSC-Enthusiastic (171 reputation)SSC-Enthusiastic (171 reputation)

Group: General Forum Members
Points: 171 Visits: 589
...

A clever person solves a problem. A wise person avoids it. ~ Einstein
select cast (0x5365616E204465596F756E67 as varchar(128))
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search