Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 SQL job that stays at status

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-03-04 : 21:25:23
Phil writes "Dear all,

I have batch file that basially contains a command string that processes a command on a AS400 system.
I know the batch file/Command works ok if running from my desktop and the command string is correct.

I thought if I created a scheduled job within SQL7.0 Server Agent I could add a step that would just run the batch file (Which I have done on many ocaasions before), but unforunatley when the job gets to this step it shows a status of "executing Step x". (This never completes and I have to cancel the job)

I have also tried just running the command with the parameters required in the step of the SQL Server Agent job and again only gets as far as status "executing".

To test further I ran Query analyzer and used XP_CMDSHELL with the parameter of the third party command. This works ok and acknowledges that it recognises the command.
BUT! as soon as I add the required parameters for the command it basically does the same thing and sits there for eterniity saying executing)

I am wondering if there is a way that I could run a process in a command shell (Or equivelent) that would execute outside SQL.

I know I could process the batch file many other ways using NT schedulers etc, BUT I need this command to process after another step has completed in A SQL job.

Any help or suggestions would be much appreciated.

Regards
Phil"

chadmat
The Chadinator

1974 Posts

Posted - 2002-03-04 : 22:38:16
Change the type of step to CmdExec this will be like executing from a command line.

-Chad


Go to Top of Page
   

- Advertisement -