Start-Process does not capturing the Sql loader return code. RRS feed

  • General discussion

  • We have a program which will load the csv file data using Oracle Sql Loader from powershell. The below is the command which we are using.

    $params = Dinesh@TESTDB/Test123* control=D:\Dinesh\workfolder\daily_load\sqlLoader\run_daily.ctl log=D:\Dinesh\workfolder\sqlLoader\run_daily_20180315.txt.log.20180322090844 direct=false rows=1000 errors=0

    $exitCode = (Start-Process -wait -PassThru -NoNewWindow sqlldr -argumentlist $params).ExitCode

    The issue is, when we are executing this command in our Production environment, it returns the exit code as Null even though the data loaded successfully into the table.
    But it should return the exit code as 0. Whereas in our QA environment, we executed with same csv file and  same code and its returning the exit code as 0 which is correct.
    (The control file and )

    As its seems to be environment issue, we rebooted our server and did everything but still we are getting the same issue. (exit code as null)
    We should get the exit code as zero.

    Can anyone suggest how could resolve this issue.

    Thanks in Advance,
    Dinesh Kumar
    Thursday, March 29, 2018 5:17 PM