Calling Oracle Procedure

  • Has anyone had any luck calling an Oracle procedure from an "Execute Sql Task?

    I'm trying to call a simple procedure with no parameters. The sql statement which executes without error in Toad is:

    execute erp_systemerror

    I have validated my connection works.

    The error I'm getting is:

    [Execute SQL Task] Error: Executing the query "execute erp_systemerror" failed with the following error: "ORA-00900: invalid SQL statement". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

    I've also tried the following statements and keep getting the same error:

    erp_systemerror

    execute erp_systemerror;

    Is there something different about the syntax that is needed?

    Any help is appreciated. Thank you.

  • Not much to go on in and I don't use Oracle much these days but here are some random thoughts....

    Does the procedure return a result set?

    Is it possible you need to schema-qualify your procedure?

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

  • Thanks for the response. It doesn't return anything. I tried qualifying it with the schema name. Several variations of execute etl_onk.erp_systemerror;. Still the same error. But thanks for the suggestion.

  • I was able to get it to work with this syntax:

    BEGIN

    erp_systemerror;

    END;

  • Cool (that you got it working, not that syntax ;-)) thanks for posting a solution!

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

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

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