• Ahmed Bouzamondo (12/13/2007)


    Hi,

    The code is good

    Try just to execute in the command line

    D:\JPMorgan_IMPORT\pdfcombine.exe D:\431411406.PDF D:\431411408.PDF D:\COMBINED.PDF to see if it works

    Check the following link

    http://www.coolutils.com/forum/read.php?f=1&i=914&t=914

    Regards,

    Ahmed

    That's the strange thing. It works fine from the command line (when running with the same user the service accounts are running as).

    I've even tried putting a bunch of those commands in a batch file, and just running the batch file from xp_cmdshell. It doesn't work. But if I run the batch file from the command line it works again.

    Normally I would think it's a permission error, but since xp_cmdshell (at least according to books online) runs with the credentials of the sql server agent service account, and I can log on as that service account to the desktop and run it manually with sucess, I'm not sure it's security. I can do simple things like:

    ...

    xp_cmdshell 'dir d:\'

    And that works, so I also don't think it's any obvous configuration issue either.

    The Redneck DBA