Wednesday, March 21, 2012

Lines in a job cmdexec step

Does it only execute the first line, or is there a way to have it
execute multiple lines? Sure seems like it just does one line. Seems
fine if that line executes a .cmd file with multiple lines.
But for some reasons I *thought* you could put multiple lines in the
little text window in the job editor and it would work, but it's not.
I'm trying to set a couple of environment variables before calling a
dts package:
set foo=123
dtsrun mypackage
--
Thanks.
Josh> Does it only execute the first line, or is there a way to have it
> execute multiple lines?
For cmdExec job steps, only the first line will be executed. Is using a bat
file an option?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"jxstern" <jxstern@.wherever.com> wrote in message news:q13v529cuemj7e79o2is9cfds5vncn4v8s@.
4a
x.com...
> Does it only execute the first line, or is there a way to have it
> execute multiple lines? Sure seems like it just does one line. Seems
> fine if that line executes a .cmd file with multiple lines.
> But for some reasons I *thought* you could put multiple lines in the
> little text window in the job editor and it would work, but it's not.
> I'm trying to set a couple of environment variables before calling a
> dts package:
> --
> set foo=123
> dtsrun mypackage
> --
>
> Thanks.
> Josh
>|||On Tue, 9 May 2006 15:11:47 +0200, "Tibor Karaszi"
<tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote:

>For cmdExec job steps, only the first line will be executed. Is using a bat file an
option?
Guess so!
Already had them written, actually, for testing purposes.
Now have to run them through the deployment process ...
Thanks.
Josh

No comments:

Post a Comment