Issue with custom SSIS powershell task

  • I have SSIS task calling custom powershell task and the package works when manually ran in BIDS. But when I call the package with SQL Agent as a scheduled job it complete in like 30 secs and it completes with successful reporting. It should take much longer; in BIDS like 15 mins. The powershell is not doing it's task with the SQL Agent. It's like it doesn't have enough time.

    I have set the SQL Agent Service to run as myself to clear any security issues.

    I have also setup a proxy account to run as myself but get the same results.

    When I run it from server's MSDB it works correctly. It just seems to be the SQL Agent process.

    This my SSIS package and powershell script. http://www.red-gate.com/messageboard/viewtopic.php?t=16405

    SSIS Powershell task: http://powershellscripttask.codeplex.com/ and http://ssisctc.codeplex.com/

  • It could be a permissions issue. Anything in the Agent Job logs?

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • I found this in the log.

    Date3/8/2013 8:16:52 AM

    LogWindows NT (Red Gate Software)

    SourceSQL Doc 2

    Category(0)

    Event32

    ComputerMYPC

    Message

    CommandLine

    Main:Unhandled Exception

    System.ArgumentNullException: Value cannot be null.

    Parameter name: value

    at System.IO.Directory.SetCurrentDirectory(String path)

    at System.Environment.set_CurrentDirectory(String value)

    at RedGate.SQLDoc.Engine.Project.Project.(String )

    at RedGate.SQLDoc.Engine.Project.Project.set_FilePathOfHtml(String value)

    at RedGate.SQLDoc.Engine.Project.Project..ctor()

    at RedGate.SQLDoc.Engine.Project.Project.LoadFromDisk(String pathAndFileName)

    at RedGate.SQLDoc.UI.CommandProcessor.RunProject()

    at RedGate.SQLDoc.UI.CommandProcessor.Run()

    at RedGate.SQLDoc.UI.Program.Main(String[] args)

  • That's an error from SQL Doc and would not be related to this.

    Try looking in the Agent Job History log. Right-click the job and select View History.

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply