Hitachi Vantara Pentaho Community Forums
Results 1 to 6 of 6

Thread: SQL Server Agent Job

  1. #1
    Join Date
    Oct 2013
    Posts
    18

    Default SQL Server Agent Job

    Hey All

    I've created a simple FTP job that i'm trying to run within a SQL Server Agent Job, but the job is running through successfully without outputting anything. I can successfully run the job through the command line or a .bat file but when I go to run that within the job nothing happens.

    I can't anyone who's doing this or ran into a problem with it so I was hoping someone would know whats going on. The lines I'm running are:

    cd c:\pentaho\data-integration

    kitchen.bat /file:C:\pentaho\Jobs\FTP_BW_TRN.kjb /level:Basic

    and the job itself has one step which i've attached.

    Any help would be appreciated!

    Thanks
    Attached Images Attached Images  

  2. #2
    Join Date
    Apr 2008
    Posts
    4,696

    Default

    Can it find Java?
    That's where I would look first.

    Also, another trick might be to redirect the output to a text file... That will tell you what's happening.
    **THIS IS A SIGNATURE - IT GETS POSTED ON (ALMOST) EVERY POST**
    I'm no expert.
    Take my comments at your own risk.

    PDI user since PDI 3.1
    PDI on Windows 7 & Linux

    Please keep in mind (and this may not apply to this thread):
    No forum member is going to do your work for you. We will help you sort out how to do a specific part of the work, as best we can, in the timelines that our work will allow us.
    Signature Updated: 2014-06-30

  3. #3

    Default

    The cmdexec step entry does not allow to write some shell scripts. You have to redirect it trough cmd.exe as parameter /C. For example, put something like this inside: "C:\Windows\System32\cmd.exe /C c:\pentaho\data-integration\kitchen.bat /file:C:\pentaho\Jobs\FTP_BW_TRN.kjb /level:Basic"

    If this is not working;
    Has the SQL Server service account any access rights to your pdi installation (+content)? Just set "Run as" to your own account for testing.
    Last edited by MichaelBieri; 11-04-2013 at 06:54 AM.

  4. #4
    Join Date
    Oct 2013
    Posts
    18

    Default

    I tried doing the first suggestion but I get the same behavior where the step runs successfully but nothing actually happens.

    I feel like it could be a permission issue but I don't know where I can give it access. Where would I find the "Run as" option?

    Thanks for the help

  5. #5
    Join Date
    Apr 2008
    Posts
    4,696

    Default

    Quote Originally Posted by MichaelBieri View Post
    "C:\Windows\System32\cmd.exe /C c:\pentaho\data-integration\kitchen.bat /file:C:\pentaho\Jobs\FTP_BW_TRN.kjb /level:Basic"

    Always, when scripting, REDIRECT the output!
    Code:
    C:\Windows\System32\cmd.exe /C c:\pentaho\data-integration\kitchen.bat /file:C:\pentaho\Jobs\FTP_BW_TRN.kjb /level:Basic > %TEMP%\FTP_BW_TRN.txt
    Once this has run, post the contents of %TEMP%\FTP_BW_TRN.txt here.
    **THIS IS A SIGNATURE - IT GETS POSTED ON (ALMOST) EVERY POST**
    I'm no expert.
    Take my comments at your own risk.

    PDI user since PDI 3.1
    PDI on Windows 7 & Linux

    Please keep in mind (and this may not apply to this thread):
    No forum member is going to do your work for you. We will help you sort out how to do a specific part of the work, as best we can, in the timelines that our work will allow us.
    Signature Updated: 2014-06-30

  6. #6
    Join Date
    Oct 2013
    Posts
    18

    Default

    Figured it out!

    Apparently, only the first line of the command was executing. So it was navigating to a different directory but executing any commands. I remedied this by putting everything on one line and adding a && to it.

    Command line used: cd c:\pentaho\data-integration && kitchen.bat /file:C:\pentaho\Jobs\BW\FTP_BW_TRN.kjb /level:Basic

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.