Results 1 to 3 of 3

Thread: How to call a Stored procedure that is inside the PLSQL package

  1. #1
    Join Date
    Mar 2006
    Posts
    3

    Default How to call a Stored procedure that is inside the PLSQL package

    In oracle I have a PLSQL package "Calc_Lib_packg" and there is a procedure name "get_median" what should be the parameter name in the setSql() method?

    setSql("Calc_Lib_packg.get_median");

    or

    setSql("get_median");

    Actually I am getting following error in both cases ( I tried both above options-

    org.springframework.jdbc.BadSqlGrammarException: CallableStatementCallback; bad SQL grammar [{call Calc_Lib_packg.get_median(?,?)}] nested exception is java.sql.SQLException: ORA-06550: line 1, column 7:PLS-00201: identifier 'Calc_Lib_packg.get_median' must be declared

  2. #2
    Join Date
    Dec 2004
    Posts
    17

    Default Set the catalog on the connection to the package name

    ie :

    conn.setCatalog("Calc_Lib_packg");

    then you should be able to call the proc

  3. #3
    Join Date
    Aug 2004
    Posts
    1,104

    Default

    Uisng "Calc_Lib_packg.get_median" should work. Are you sure you have execute privileges on the package? If the package is in a different schema you might have to add the schema name as well like "schema.Calc_Lib_packg.get_median"
    Thomas Risberg
    SpringSource by Pivotal
    http://www.springsource.org

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •