Re: Running a program from a SQL job

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

bb_43_at_hotmail.com
Date: 06/15/04


Date: Tue, 15 Jun 2004 04:41:21 GMT

In article <uKWljChUEHA.1764@TK2MSFTNGP10.phx.gbl>, "Steen Persson" <SPE@REMOVEdatea.dk> wrote:
>Hi
>
>I'm having a strange problem which puzzels me a little bit.
>I have created a SQL job that can zip a file that has been generated from a
>provious job. I've made a bat file that contains the string to run to zip
>the file. When I run this bat file manually just by doubleclicking it, it
>runs fine and do the job. When I set the SQL job to execute the same bat
>file, it executes the bat file, but the bat file doesn't zip the file. It
>reports that everything is ok, but the file isn't being created.
>
>It seems like the zip program I've found that can be executed from a command
>line (it's a program called 7-zip) will only do the job if it can "open" a
>command prompt in the background which SQL apparently doesn't do.
>My question is now if any of you know a way to let a SQL job "open" a
>command prompt and then execute a program from there. It could also be as
>simple as using a different zip program. 7-zip was just one I found that
>could zip a file from a command line.
>
>Regards
>Steen

Use PKZip.
The original and best cmdline tool.



Relevant Pages

  • Re: Running a program from a SQL job
    ... This works fine when running it either as a bat file or just in a cmd ... When I set the SQL job to execute the same bat ... >> command prompt in the background which SQL apparently doesn't do. ... >> command prompt and then execute a program from there. ...
    (microsoft.public.sqlserver.server)
  • Re: Running a program from a SQL job
    ... Use XP_CMDSHELL to fire a OS command from command prompt. ... When I run this bat file manually just by doubleclicking it, ... When I set the SQL job to execute the same bat ... > command prompt and then execute a program from there. ...
    (microsoft.public.sqlserver.server)
  • Running a program from a SQL job
    ... When I run this bat file manually just by doubleclicking it, ... When I set the SQL job to execute the same bat ... command prompt in the background which SQL apparently doesn't do. ... command prompt and then execute a program from there. ...
    (microsoft.public.sqlserver.server)
  • Re: Running a program from a SQL job
    ... Tibor Karaszi, SQL Server MVP ... I've made a bat file that contains the string to run to ... >>> command prompt in the background which SQL apparently doesn't do. ... >>> command prompt and then execute a program from there. ...
    (microsoft.public.sqlserver.server)
  • Re: Running a program from a SQL job
    ... try winzip 8.0 command line addon. ... When I run this bat file manually just by doubleclicking it, ... When I set the SQL job to execute the same bat ... > command prompt and then execute a program from there. ...
    (microsoft.public.sqlserver.server)