PLS-00201

Hi,
I used package DBMS_XMLGEN in my procedure, when compile, I got an error message as following:
PLS-00201: identifier 'DBMS_XMLGEN.CTXHANDLE' must be
declared
Does someone can tell me how to fix it??
I use Oracle 8.1.7.
Thanks a lot
Dodo

I use Oracle 8.1.7.According to the documentation DBMS_XMLGEN was introduced in 9.0.1. Which woudl explain your problem.
Sorry, APC

Similar Messages

  • PLS-00201 identifier must be declared

    Hi All,
    Can any one please help me regarding this error.
    I am getting the PLS-00201 identifier tree_sorting must be declared at the line " Tree_Sorting(1, 0); ".
    if i comment the " Tree_Sorting(1, 0); " at pkgfc_gi.v_cphase := '01-13'; and uncomment the " Tree_Sorting(1, 0); " at pkgfc_gi.v_cphase := '01-09' then the procedure is compiling successfully; This is my stored procedure.
    Please help me in solving this.
    CREATE OR REPLACE PACKAGE BODY FA_Main AS
    /*-------------------------------- Calcul_FA -------------------------------*/
    FUNCTION Calcul_FA (
    p_client_group IN tfc_stc_client_groups.s_client_group%TYPE DEFAULT NULL,
    p_admin_group IN tfc_stc_clients.c_admin_group %TYPE DEFAULT NULL,
    p_client IN tfc_stc_clients.s_client %TYPE DEFAULT NULL,
    p_report_group IN tfc_stc_report_groups.g_classification%TYPE DEFAULT NULL,
    p_contract IN tfc_stc_contracts.s_contract %TYPE DEFAULT NULL,
    p_fa_typ IN tfc_prm_fa_master.c_fa_typ %TYPE DEFAULT NULL,
    p_fa IN tfc_prm_fa_master.s_fa %TYPE DEFAULT NULL,
    p_beg_period IN DATE DEFAULT NULL,
    p_end_period IN DATE DEFAULT NULL,
    p_y_all_ok IN VARCHAR2 DEFAULT 'Y',
    p_y_estimate IN VARCHAR2 DEFAULT 'N',
    p_est_date IN DATE DEFAULT NULL)
    RETURN NUMBER IS
    ----------------------------------------------------------------------- CURSEURS
    -- List of FA to calculate --
    CURSOR c_fa IS
    SELECT pfm.s_fa s_fa, pfm.c_fa_typ c_fa_typ, sct.s_contract s_contract, srg.g_classification g_classification,
    scl.s_client s_client, scl.c_admin_group c_admin_group, scg.s_client_group s_client_group
    FROM tfc_prm_fa_master pfm, tfc_stc_contracts sct, tfc_stc_clients scl, tfc_stc_client_groups scg, tfc_stc_report_groups srg
    WHERE pfm.c_fa_structure_typ = 'PARM'
    AND ((p_fa IS NOT NULL AND pfm.s_fa = p_fa ) OR p_fa IS NULL)
    AND ((p_fa_typ IS NOT NULL AND pfm.c_fa_typ = p_fa_typ ) OR p_fa_typ IS NULL)
    AND ((p_contract IS NOT NULL AND sct.s_contract = p_contract ) OR p_contract IS NULL)
    AND ((p_report_group IS NOT NULL AND srg.g_classification LIKE p_report_group||'%') OR p_report_group IS NULL)
    AND ((p_client IS NOT NULL AND scl.s_client = p_client ) OR p_client IS NULL)
    AND ((p_admin_group IS NOT NULL AND scl.c_admin_group = p_admin_group ) OR p_admin_group IS NULL)
    AND ((p_client_group IS NOT NULL AND scg.s_client_group = p_client_group ) OR p_client_group IS NULL)
    AND (NVL(p_client_group,NVL(p_client,NVL(p_contract, p_fa))) IS NOT NULL OR p_admin_group IS NOT NULL OR p_report_group IS NOT NULL)
    AND (p_beg_period IS NULL OR ((p_beg_period IS NOT NULL AND pfm.d_first_calculation IS NOT NULL AND p_beg_period >= pfm.d_first_calculation) OR pfm.d_first_calculation IS NULL))
    AND (p_end_period IS NULL OR ((p_end_period IS NOT NULL AND pfm.d_end_calculation IS NOT NULL AND p_end_period <= pfm.d_end_calculation) OR pfm.d_end_calculation IS NULL) OR (p_end_period IS NOT NULL AND sct.d_inception <= p_end_period ))
    AND sct.s_contract = pfm.fk_contract
    AND scl.s_client = sct.fk_client
    AND scg.s_client_group (+)= scl.fk_client_group
    AND srg.s_report_group (+)= sct.fk_report_group
    AND pfm.y_fee_to_calculate = 'Y'
    AND sct.c_contract_status = 'ACTIVE'
    AND ROWNUM < 2;
    BEGIN
    COMMIT;
    IF pkgfc_faed.v_y_estimate = 'Y' THEN
    INSERT INTO tfc_log_application_master (
    s_log, l_log,
    d_t_begin_task,
    c_application_task, c_task_status,
    g_key_0, g_key_1,
    g_key_2, g_key_3,
    g_key_4, g_key_5,
    g_key_6, g_key_7,
    g_key_8, g_key_9)
    VALUES (
    pkgfc_faed.v_s_log, v_l_log, SysDate,
    'ESTIMATE', 'RUNNING',
    TRIM(TO_CHAR(p_client_group)), p_admin_group,
    TRIM(TO_CHAR(p_client)), p_report_group,
    TRIM(TO_CHAR(p_contract)), p_fa_typ,
    TRIM(TO_CHAR(p_fa)), TO_CHAR(p_beg_period,'DD/MM/YYYY'),
    TO_CHAR(p_end_period,'DD/MM/YYYY'), v_y_all_ok);
    ELSE
    INSERT INTO tfc_log_application_master (
    s_log, l_log,
    d_t_begin_task,
    c_application_task, c_task_status,
    g_key_0, g_key_1,
    g_key_2, g_key_3,
    g_key_4, g_key_5,
    g_key_6, g_key_7,
    g_key_8, g_key_9)
    VALUES (
    pkgfc_faed.v_s_log, v_l_log,
    SysDate,
    'CALCULATION', 'RUNNING',
    TRIM(TO_CHAR(p_client_group)), p_admin_group,
    TRIM(TO_CHAR(p_client)), p_report_group,
    TRIM(TO_CHAR(p_contract)), p_fa_typ,
    TRIM(TO_CHAR(p_fa)), TO_CHAR(p_beg_period,'DD/MM/YYYY'),
    TO_CHAR(p_end_period,'DD/MM/YYYY'), v_y_all_ok);
    END IF;
    v_return := pkgfc_faed.v_s_log;
    COMMIT;
    -- Loop on all Fee/Alloc to calculate --
    -- Added by Santhakumar
    BEGIN
    INSERT INTO tmp_prm_fa_details(
    SELECT USERENV('SESSIONID') SESSION_ID,
    LEVEL CUR_LEVEL,
    (CASE WHEN (SELECT MAX(LEVEL)
    FROM tfc_prm_fa_details fad2
    WHERE fad2.fk_fa = fad1.fk_fa
    START WITH fad2.s_fa_detail=fad1.s_fa_detail
    CONNECT BY PRIOR fad2.s_fa_detail = fad2.fk_fa_detail_upper_level) > 1
    THEN LEVEL + 1
    ELSE LEVEL
    END) NEXT_LEVEL,
    fad1.s_fa_detail,
    fad1.fk_fee_alloc_detail,
    fad1.fk_fa,
    fad1.l_fa_detail,
    fad1.g_fa_4calculation,
    fad1.fk_fa_detail_upper_level,
    fad1.fk_third_party,
    fad1.g_consolidation_rule,
    fad1.c_fa_calculation_typ,
    fad1.fk_aggregation_rule,
    fad1.fk_scale,
    fad1.g_scale_band_unit,
    fad1.g_value,
    fad1.n_detail_order,
    fad1.y_ref_amount_equal_total_aum,
    fad1.c_validation_status,
    fad1.g_val_by,
    fad1.d_t_val,
    fad1.g_ins_by,
    fad1.d_t_ins,
    fad1.g_upd_by,
    fad1.d_t_upd
    FROM tfc_prm_fa_details fad1
    START WITH fad1.fk_fa_detail_upper_level IS NULL
    CONNECT BY PRIOR fad1.s_fa_detail = fad1.fk_fa_detail_upper_level
    END;
    -- Added by Santhakumar
    pkgfc_gi.v_cphase := '00-02';
    FOR v_fa IN c_fa LOOP
    pkgfc_gi.v_cphase := '01-08';
    DECLARE
    -- Tree Sorting Recursive Procedure --
    PROCEDURE Tree_Sorting (p_level IN NUMBER,p_fk_fa_detail_upper_level IN NUMBER) IS
    -- Cursor to retrieve data at current level --
    CURSOR c_tfd IS
    SELECT *
    FROM tfc_tmp_fa_details tfd
    WHERE tfd.fk_fa = v_fa.s_fa
    AND tfd.session_id = USERENV('SESSIONID')
    AND tfd.cur_level = p_level
    AND tfd.fk_fa_detail_upper_level = p_fk_fa_detail_upper_level
    ORDER BY tfd.n_detail_order ASC;
    Error_Found_in_Tree_Sorting EXCEPTION;
    -------------------------------------------------------------------------- BEGIN
    BEGIN
    FOR v_tfd IN c_tfd LOOP
    pkgfc_dts.put_nline('Level : '||TO_CHAR(v_tfd.cur_level)||' - '||v_tfd.g_fa_4calculation||' - '||TO_CHAR(p_fk_fa_detail_upper_level));
    pkgfc_gi.v_cphase := '01-14';
    pkgfc_faed.v_nb_fa_det := pkgfc_faed.v_nb_fa_det + 1;
    pkgfc_faed.v_fa_details(pkgfc_faed.v_nb_fa_det) := v_tfd;
    pkgfc_faed.v_nb_max_level := GREATEST(pkgfc_faed.v_nb_max_level,
    pkgfc_faed.v_fa_details(pkgfc_faed.v_nb_fa_det).cur_level);
    -- Break the link with Root Record --
    IF (pkgfc_faed.v_fa_details(pkgfc_faed.v_nb_fa_det).fk_fa_detail_upper_level = 0) THEN
    pkgfc_faed.v_fa_details(pkgfc_faed.v_nb_fa_det).fk_fa_detail_upper_level := NULL;
    END IF;
    IF (v_tfd.cur_level < v_tfd.next_level) THEN
    pkgfc_gi.v_cphase := '01-15';
    Tree_Sorting(v_tfd.next_level, v_tfd.s_fa_detail);
    END IF;
    IF (pkgfc_gi.v_cretour <> '0') THEN
    RAISE Error_Found_in_Tree_Sorting;
    END IF;
    END LOOP;
    ---------------------------------------------------------------------- EXCEPTION
    EXCEPTION
    WHEN Error_Found_in_Tree_Sorting THEN
    IF (c_tfd%ISOPEN ) THEN CLOSE c_tfd ; END IF;
    WHEN OTHERS THEN
    IF (c_tfd%ISOPEN ) THEN CLOSE c_tfd ; END IF;
    pkgfc_gi.v_cretour := '9'; -- When Others Error
    pkgfc_gi.v_cproc := 'FA_Engine_Main.Tree_Sorting';
    pkgfc_gi.v_mess := SUBSTR(SQLERRM(SQLCODE), 1, 255);
    pkgfc_dts.put_nline('Err : '||pkgfc_gi.v_cretour||' - '||pkgfc_gi.v_cphase||' - '||pkgfc_gi.v_cproc||' - '||pkgfc_gi.v_mess);
    ---------------------------------------------------------------------------- END
    END Tree_Sorting;
    PROCEDURE Autonomous_0108 IS
    PRAGMA AUTONOMOUS_TRANSACTION; -- Permit Commit/Rollback independently of the current transaction
    BEGIN
    -- Clean Temporary Table --
    pkgfc_gi.v_cphase := '01-09';
    DELETE tfc_tmp_fa_details WHERE session_id NOT IN (SELECT DISTINCT audsid FROM all_sessions);
    COMMIT;
    --Tree_Sorting(1, 0);
    END Autonomous_0108;
    BEGIN
    Autonomous_0108;
    END;
    -- Get FA Details from Prm_Fa_Details --
    pkgfc_gi.v_cphase := '01-10';
    select count(1) into v_num from tfc_tmp_fa_details;
    Dbms_output.put_line('first' || v_num);
    Dbms_output.put_line('Session Id --> ' || USERENV('SESSIONID'));
    INSERT INTO tfc_tmp_fa_details (SELECT * FROM tmp_prm_fa_details WHERE fk_fa = v_fa.s_fa);
    -- Insert a Root Record for Tree Sorting purpose --
    pkgfc_gi.v_cphase := '01-11';
    INSERT INTO tfc_tmp_fa_details (
    session_id, cur_level, next_level,
    s_fa_detail, fk_fa, fk_fa_detail_upper_level)
    VALUES (
    USERENV('SESSIONID'), 0, 1,
    0, v_fa.s_fa, NULL);
    -- Link the Level 1 with Root Level (0) --
    pkgfc_gi.v_cphase := '01-12';
    UPDATE tfc_tmp_fa_details
    SET fk_fa_detail_upper_level = NVL(fk_fa_detail_upper_level, 0)
    WHERE fk_fa = v_fa.s_fa
    AND s_fa_detail > 0
    AND session_id = USERENV('SESSIONID');
    -- Sort FA Details Tree according n_detail_order field --
    pkgfc_gi.v_cphase := '01-13';
    Tree_Sorting(1, 0);
    -- Clean Temporary Table --
    pkgfc_gi.v_cphase := '01-16';
    WHEN OTHERS THEN
    dbms_output.put_line('OTHERS');
    pkgfc_gi.eev_cur := v_eev_cur;
    v_loop_ret := -1;
    IF (c_fa%ISOPEN ) THEN CLOSE c_fa ; END IF;
    IF (c_cli%ISOPEN) THEN CLOSE c_cli; END IF;
    IF (c_ctr%ISOPEN) THEN CLOSE c_ctr; END IF;
    IF (c_fam%ISOPEN) THEN CLOSE c_fam; END IF;
    IF (c_cad%ISOPEN) THEN CLOSE c_cad; END IF;
    IF (c_fad%ISOPEN) THEN CLOSE c_fad; END IF;
    pkgfc_gi.v_cretour := '9'; -- When Others Error
    pkgfc_gi.v_cproc := 'FA_Engine_Main.Calcul_FA';
    pkgfc_gi.v_mess := SUBSTR(SQLERRM(SQLCODE), 1, 255);
    pkgfc_dts.put_nline('Err : '||pkgfc_gi.v_cretour||' - '||pkgfc_gi.v_cphase||' - '||pkgfc_gi.v_cproc||' - '||pkgfc_gi.v_mess);
    -------------------------------------------------------------------- END
    END;
    END LOOP;
    return(v_return);
    END Calcul_FA;
    END FA_Main;
    /

    It looks to me like procedure 'tree_sorting' is declared as a local procedure within a nested BEGIN .. END block (which spans lines 288 - 438). You cannot call this procedure outside that block, it is out of scope - you would have to move it to a higher scope.
    It would help if you posted something remotely readable in future.

  • Error PLS-00201

    Dear All
    I am getting this error while executing a function .
    I checked in the dB The table DES_OUT_WR_CR is already exist .
    What could be the error ?
    LINE/COL ERROR
    0/0 PL/SQL: Compilation unit analysis terminated
    2/17 PLS-00201: identifier 'DES_OUT_WR_CR' must be declared

    The error is you don't use online resources and ask a FAQ.
    Sybrand Bakker
    Senior Oracle DBA

  • ORA-06550/PLS-00201 error while configuring data source

    Hi,
    My development platform is Visual Studio 2005, ODAC11g Release 1 (11.1.0.6.20), and Oracle 10g Release 2 database.
    I tried to setup a sqlDatasource in my web page using drag and drop features
    When I configure the sqlDatasource to use a stored procedure inside a package,
    I notice that odp.net uses #0# as separator (instead of .) between package name and procedure name in Configure Data Source dialog box. Then when I clcik the Test Query button, I got following error.
    There was an error executing the query. Please check the syntax of the command and if present, the types and values of the parameters and ensure they are correct.
    ORA-06550: line 1, column 7:
    PLS-00201: identifier 'PK_LOOKUP_TABLE#0#P_LIST' must be declared
    ORA-06550: line 1, column 7
    PL/SQL: Statement ignored
    It looks like odp.net cannot locate PK_LOOKUP_TABLE#0#P_LIST.
    Is there any workaround ?
    Below is the stored procedure code. It compiles and runs without problem.
    PACKAGE BODY pk_lookup_table
    AS
    /* Get a list of lookup table name */
    PROCEDURE P_LIST (
    O_CURSOR OUT sys_refcursor )
    IS
    l_cur sys_refcursor;
    BEGIN -- executable part starts here
    OPEN l_cur FOR
    SELECT table_name
    FROM all_tab_comments u
    WHERE u.comments LIKE '%Lookup Table%'
    ORDER BY 1;
    o_cursor := l_cur;
    END P_LIST;
    END "PK_LOOKUP_TABLE";
    On the sqlDataSource property sheet, if I click the Select Query property, the Command and Parameter Editor will open, then I can change the select command name to PK_LOOKUP_TABLE.P_LIST. Then if I run the application, I get another error.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
    Exception Details: Oracle.DataAccess.Client.OracleException: ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'P_LIST'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    Seems that it can locate the procedure.
    In the Command and Parameter Editor dialog, I can add output parameter, but data type is restricted. There is no REF CURSOR datatype in the dropdown list.
    How can I add output parameter with REF CURSOR type via IDE ?
    Thanks for the time looking into this issue.
    Mansion

    Hi
    Even I faced this problem while connecting to RMAN . But I feel your problem is different .
    My issue was like this
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-00554: initialization of internal recovery manager package failed
    RMAN-04005: error from target database:
    ORA-06550: line 1, column 7:
    PLS-00201: identifier 'DBMS_BACKUP_RESTORE.SET_CHARSET' must be declared
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    RMAN-04015: error setting target database character set to WE8MSWIN1252
    Solution :
    execute catproc.sql;

  • PLS-00201 when running dbms_compression package

    Hello,
    I am trying to gather compression rate estimates in a 10g database before we upgrade to 11g. I have downloaded the dbms compression package from OTN: http://www.oracle.com/technetwork/database/options/compression/compression-advisor-095705.html
    And installed this in my 10g db:
    SQL> @dbmscomp.sql
    Package created.
    Synonym created.
    Grant succeeded.
    No errors.
    SQL> @prvtcomp.plb
    Package body created.
    Synonym created.
    Grant succeeded.
    No errors.
    When I try to run execute this package as shown in the README file, I get the following error:
    SQL> exec dbms_compression.getratio ('SAPAPO','/SAPAPO/MATLOC','OLTP',10);
    BEGIN dbms_compression.getratio ('SAPAPO','/SAPAPO/MATLOC','OLTP',10); END;
    ERROR at line 1:
    ORA-06550: line 1, column 7:
    PLS-00201: identifier 'DBMS_COMPRESSION.GETRATIO' must be declared
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    Please let me know if anyone has encountered this error before.
    Thank you

    jhall wrote:
    not sure why the readme referenced the dbms_compression package... guess I should have looked through the package creation script. Thanks for looking at this.I don't think it does -- it's stating that this does the same as DBMS_COMPRESSION, but of course they're just implementing partial functionality of one procedure of DBMS_COMPRESSION. They'd name it something different for that reason, and because it's presence might break an upgrade from 10g to 11g.
    I'm not a huge fan of this package
    1 The compress_type parameter makes no difference to the code execution, but you still have to supply a valid value.
    2 The temporary tables that are created probably ought to be NOLOGGING.
    3 The uncompressed table is created without any storage clause so a PCTFREE of 10 is used -- that might be appropriate for OLTP compression (I have no idea) but OLTP compression isn't available in 10g so the metrics would be out anyway. It should probably be hardcoded to a value of 0.
    4 There's no error handling to remove the temporary tables in the event of a problem, or detect the pre-existence of the DBMS_COMPRESSION_TEMP_UNCMP or DBMS_COMPRESSION_TEMP_CMP tables.

  • PLS-00201 error when trying to pass an OUT parameter

    Hi,
    Please help me to resolve the below error:
    I am trying to pass an OUT parameter in a package.
    I have declared it in package specs as
    ProcABC(p_val IN varchar2, p_val2 IN varchar2, p_val3 OUT varchar2)
    In package body
    I have created the procedure as
    Create or Replace procedure ProcABC(p_val IN varchar2, p_val2 IN varchar2, p_val3 OUT varchar2) AS
    v_LogDir varchar2(40);
    v_message varchar2(200);
    BEGIN
    SELECT directory_path into v_LogDir FROM ALL_DIRECTORIES WHERE directory_name = 'ABC';
    v_message := v_LogDir ;
    some sql statements..
    p_val3 := v_message;
    Return p_val3;
    End procABC;
    SQL> exec pkg_A.procABC('Stage2', NULL, p_val3);
    Package compiles successfully but while execution it returns error as:
    ORA-06550: line 1, column 74:
    PLS-00201: identifier 'p_val3 ' must be declared
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    Please advise.

    Hi Suresh,
    Thanks for the information and help. I was able to run the package with this usage.
    Now, the issue is
    I need to return a v long string by the OUT parameter so I defined the datatype of OUT parameter as CLOB.
    But, when I declare local variable to run the package with this OUT paramater I get the error :
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    ORA-06512: at line 1
    When I pass a shorter string it works.
    Kindly advise me how to resolve this issue while using CLOB as datatype of OUT parameter.

  • Stored Procedure Call from Bean Error - PLS-00201

              Hello all,
              I am using the java stored procedure code in the examples dir of weblogic51/examples/jdbc/...
              with one exception. I created the stored procedure as another user with more
              permissions than
              the user that the jdbc connection will be established with. I created a public
              synonym so the stored
              procedure doesn't have to be refered to as "username.proc_squareInt". I keep
              getting the following
              errors. The web user has execute permissions and I tried calling it both with
              the owner.proc_name
              and proc_name (which I know won't work since it won't be able to find it).
              Any help would be greatly appreciated.
              Sincerely,
              Michael Prinsen
              Tue Jul 17 13:47:41 MDT 2001:<E> <WebAppServletContext-et> Root cause of ServletException
              java.sql.SQLException: ORA-06550: line 1, column 7:
              PLS-00201: identifier 'WTHDBM.PROC_SQUAREINT' must be declared
              ORA-06550: line 1, column 7:
              PL/SQL: Statement ignored
                   at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:114)
                   at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
                   at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:542)
                   at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1330)
                   at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:757)
                   at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:1313)
                   at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1232)
                   at oracle.jdbc.driver.OracleStatement.doExecuteWithBatch(OracleStatement.java:1353)
                   at oracle.jdbc.driver.OracleStatement.doExecute(OracleStatement.java:1760)
                   at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1807)
                   at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:332)
                   at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:376)
                   at weblogic.jdbc.pool.PreparedStatement.execute(PreparedStatement.java:35)
                   at csu.et.testBean.getWeatherData1(testBean.java:46)
                   at jsp_servlet._test._tester._jspService(_tester.java:107)
                   at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
                   at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:120)
                   at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:138)
                   at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:915)
                   at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:879)
                   at weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContextManager.java:269)
                   at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:365)
                   at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:253)
                   at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:129)
              // START CODE
              package csu.et;
              import java.io.*;
              import java.sql.*;
              import java.util.*;
              import java.text.*;
              import java.beans.*;
              import java.math.*;
              import java.util.Date;
              import java.util.Locale;
              import csu.util.*;
              public class testBean {
              public String getWeatherData1() throws SQLException {
              Connection conn = null;
              conn = CSUConnection.getConnection("etSelectConnectionPool");
              // Create a stored proc - (CREATED ALREADY)
              // Statement stmt1 = conn.createStatement();
              // stmt1.execute("CREATE OR REPLACE PROCEDURE proc_squareInt " +
              // "(field1 IN OUT INTEGER, " +
              // " field2 OUT INTEGER) IS " +
              // "BEGIN field2 := field1 * field1; " +
              // "field1 := field1 * field1; END proc_squareInt;");
              // stmt1.close();
              String sql = "{call proc_squareInt(?, ?)}";
              CallableStatement cstmt1 = conn.prepareCall(sql);
              cstmt1.registerOutParameter(2, java.sql.Types.INTEGER);
              for (int i = 0; i < 5; i++) {
              cstmt1.setInt(1, i);
              cstmt1.execute();
              System.out.println(i + " " + cstmt1.getInt(1) + " " + cstmt1.getInt(2));
              cstmt1.close();
              conn.close();
              return("hard-coded stuff");
              //END CODE
              

    this is probably an oracle related issue, and has very little to do with
              Weblogic transactions.
              your easiest way to debug this is to open a SQL/Plus window, log in as user
              WTHDBM and try to run the command
              "execute proc_squareInt(5,5);"
              "execute owner.proc_squareInt(5,5);"
              if this doesn't work, consult Oracle technet on how to setup synonyms and
              permissions
              Filip
              ~
              Namaste - I bow to the divine in you
              ~
              Filip Hanik
              Software Architect
              [email protected]
              www.filip.net
              "Michael Prinsen" <[email protected]> wrote in message
              news:[email protected]...
              >
              > Hello all,
              >
              > I am using the java stored procedure code in the examples dir of
              weblogic51/examples/jdbc/...
              > with one exception. I created the stored procedure as another user with
              more
              > permissions than
              > the user that the jdbc connection will be established with. I created a
              public
              > synonym so the stored
              > procedure doesn't have to be refered to as "username.proc_squareInt". I
              keep
              > getting the following
              > errors. The web user has execute permissions and I tried calling it both
              with
              > the owner.proc_name
              > and proc_name (which I know won't work since it won't be able to find it).
              >
              > Any help would be greatly appreciated.
              >
              > Sincerely,
              >
              > Michael Prinsen
              >
              > Tue Jul 17 13:47:41 MDT 2001:<E> <WebAppServletContext-et> Root cause of
              ServletException
              > java.sql.SQLException: ORA-06550: line 1, column 7:
              > PLS-00201: identifier 'WTHDBM.PROC_SQUAREINT' must be declared
              > ORA-06550: line 1, column 7:
              > PL/SQL: Statement ignored
              >
              > at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:114)
              > at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
              > at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:542)
              > at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1330)
              > at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:757)
              > at
              oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:1313
              > at
              oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1232)
              > at
              oracle.jdbc.driver.OracleStatement.doExecuteWithBatch(OracleStatement.java:1
              353)
              > at oracle.jdbc.driver.OracleStatement.doExecute(OracleStatement.java:1760)
              > at
              oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java
              :1807)
              > at
              oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedState
              ment.java:332)
              > at
              oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.j
              ava:376)
              > at weblogic.jdbc.pool.PreparedStatement.execute(PreparedStatement.java:35)
              > at csu.et.testBean.getWeatherData1(testBean.java:46)
              > at jsp_servlet._test._tester._jspService(_tester.java:107)
              > at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
              > at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
              :120)
              > at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
              :138)
              > at
              weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
              l.java:915)
              > at
              weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
              l.java:879)
              > at
              weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
              Manager.java:269)
              > at
              weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:365)
              > at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:253)
              > at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:129)
              >
              >
              >
              > // START CODE
              >
              > package csu.et;
              >
              > import java.io.*;
              > import java.sql.*;
              > import java.util.*;
              > import java.text.*;
              > import java.beans.*;
              > import java.math.*;
              > import java.util.Date;
              > import java.util.Locale;
              > import csu.util.*;
              >
              > public class testBean {
              >
              > public String getWeatherData1() throws SQLException
              >
              > Connection conn = null;
              > conn = CSUConnection.getConnection("etSelectConnectionPool");
              >
              > // Create a stored proc - (CREATED ALREADY)
              > // Statement stmt1 = conn.createStatement();
              > // stmt1.execute("CREATE OR REPLACE PROCEDURE proc_squareInt " +
              > // "(field1 IN OUT INTEGER, " +
              > // " field2 OUT INTEGER) IS " +
              > // "BEGIN field2 := field1 * field1; " +
              > // "field1 := field1 * field1; END proc_squareInt;");
              > // stmt1.close();
              >
              > String sql = "{call proc_squareInt(?, ?)}";
              > CallableStatement cstmt1 = conn.prepareCall(sql);
              >
              > cstmt1.registerOutParameter(2, java.sql.Types.INTEGER);
              > for (int i = 0; i < 5; i++) {
              > cstmt1.setInt(1, i);
              > cstmt1.execute();
              > System.out.println(i + " " + cstmt1.getInt(1) + " " +
              cstmt1.getInt(2));
              > }
              >
              > cstmt1.close();
              > conn.close();
              > return("hard-coded stuff");
              > }
              >
              > }
              >
              > file://END CODE
              

  • Create stored procedure with table from another schema throws PLS-00201

    Oracle 10g. I'm new to procedures, so maybe I'm missing something obvious.
    Schema owner ABC has table T2001_WRITEOFF. The SYSDBAs granted SIUD to Some_Update_Role, and granted that role to developer user IJK. User IJK then created a private synonym T2001_WRITEOFF for ABC.T2001_WRITEOFF. This worked with normal SQL DML commands. 
    When I try to create a simple procedure as follows, it throws PLS-00201 identifier 'T2001_WRITEOFF' must be declared, and points to the 2nd line.
    create or replace procedure woof1(
      fooname in T2001_WRITEOFF.territory%TYPE,  <=== error points here
      bardesc IN T2001_WRITEOFF.ind_batch_submit%TYPE) IS
    BEGIN
       INSERT into T2001_WRITEOFF
       VALUES ( fooname, bardesc);
    END woof1;
    What am I doing wrong?
    Thanks
    JimR

    Hi,
    The reason I've heard has to do with knowing when a procedure becomes invalid due to privileges being revoked.  Any time a grant to a role is revoked, you would have to check all procedures that depended on that role to know if they were still valid.  Even worse, since roles can be granted to other roles, every time a role is revoked from another role, you would have to check all procedures that depended on anything to see if they were still valid.
    Oracle 11 behaves the same as earlier versions in this regard, and I don't expect this to change.
    This whole thread applies only to AUTHID DEFINER stored procedures (which is the default).  If you can make the procedure AUTHID CURRENT_USER, then you can run it with privileges granted through roles.  Usually, however, you really want AUTHID DEFINER, and granting the necessary privileges directly to the procedure owner (or to PUBLIC)  isn't too hard.

  • PLS-00201: identifier 'DBMS_METADATA_DPBUILD' must be declared

    Hi There,
    Getting following error while executing prvtmetd.plb(Post patch install steps) script after upgrade 11.1.0.7 to 11.2.0.3.
    SQL> @@prvtmetd.plb
    Warning: Package Body created with compilation errors.
    Errors for PACKAGE BODY DBMS_METADATA_DPBUILD:
    LINE/COL ERROR
    0/0      PL/SQL: Compilation unit analysis terminated
    1/14     PLS-00201: identifier 'DBMS_METADATA_DPBUILD' must be declared
    1/14     PLS-00304: cannot compile body of 'DBMS_METADATA_DPBUILD'
             without its specification
    please help me out in this regard.
    Regards,

    What does the error message PLS-00304 tell you? It is self-explanatory, provided you looked it up prior to posting (in your post I see no sign you did).
    Look up the error message online and work from there.
    Sybrand Bakker
    Senior Oracle DBA

  • PLS-00201 error occurs when batching a stored procedure in SQL*Plus

    I have a batch file to run a stored procedure and spool the results to file. When I enter the commands manually in sql*plus the output works fine and my results are spooled to the output file. But when I run the same commands in the batched script I get an error.
    Any ideas?
    Stored Procedure:
    create or replace procedure MMP( p_cursor in out SYS_REFCURSOR)
    as
    begin
    open p_cursorfor select name, id from table;
    end;
    batch file 1:
    sqlplus -S user/pw@REPORTDV @sp_output_spooled.sql
    script file sp_output_spooled.sql
    Pasting these commands directly to the SQL*Plus command prompt spools the result set to file as expected.
    set colsep '|'
    set echo off
    set feedback off
    set termout off
    set heading off
    set linesize 9000
    set pagesize 0
    set trimspool on
    set headsep off
    spool output.TXT
    var rc refcursor
    execute MMP(:rc)
    print rc
    spool off
    exit
    The errors printed to output.TXT file after the batch is run and error occurs:
    BEGIN MMP(:rc); END;
    ERROR at line 1:
    ORA-06550: line 1, column 8:
    PLS-00201: identifier 'MMP' must be declared
    ORA-06550: line 1, column 8:
    PL/SQL: Statement ignored
    ERROR:
    ORA-24338: statement handle not executed
    SP2-0625: Error printing variable "rc"

    Hi,
    Your code worked fine for me.
    Is MMP procedure owned by the same user that is running the batch file or does it have proper privileges and synonym?
    vr,
    Sudhakar

  • ORA-06550 and PLS-00201 in PL/SQL Developer

    Hi all ,
    I am facing the following error when i try to view the DDL of a table using pl/sql developer.
    ( right click on table and then DBMS_Metadata -> DDL)
    ORA-06550: line 7, column 5:
    PLS-00201: identifier 'SYS.DBMS_LOB' must be declared
    ORA-06550: line 7, column 5:
    PL/SQL: Statement ignored
    ORA-06550: line 12, column 3:
    PLS-00201: identifier 'SYS.DBMS_LOB' must be declared
    ORA-06550: line 12, column 3:
    PL/SQL: Statement ignored
    ORA-06550: line 13, column 3:
    PLS-00201: identifier 'SYS.DBMS_LOB' must be declared
    ORA-06550: line 13, column 3:
    PL/SQL: Statement ignoredPlease suggest me what to do ?
    regards
    Kkukreja

    Hi VT ,
    When i execute this .. I get this output :
    Argument Name                  Type                    In/Out Default?
    LOB_LOC                        BLOB                    IN/OUT
    NEWLEN                         NUMBER(38)              IN
    PROCEDURE TRIM
    Argument Name                  Type                    In/Out Default?
    LOB_LOC                        CLOB                    IN/OUT
    NEWLEN                         NUMBER(38)              IN
    PROCEDURE WRITE
    Argument Name                  Type                    In/Out Default?
    LOB_LOC                        BLOB                    IN/OUT
    AMOUNT                         NUMBER(38)              IN
    OFFSET                         NUMBER(38)              IN
    BUFFER                         RAW                     IN
    PROCEDURE WRITE
    Argument Name                  Type                    In/Out Default?
    LOB_LOC                        CLOB                    IN/OUT
    AMOUNT                         NUMBER(38)              IN
    OFFSET                         NUMBER(38)              IN
    BUFFER                         VARCHAR2                IN
    PROCEDURE WRITEAPPEND
    Argument Name                  Type                    In/Out Default?
    LOB_LOC                        BLOB                    IN/OUT
    AMOUNT                         NUMBER(38)              IN
    BUFFER                         RAW                     IN
    PROCEDURE WRITEAPPEND
    Argument Name                  Type                    In/Out Default?
    LOB_LOC                        CLOB                    IN/OUT
    AMOUNT                         NUMBER(38)              IN
    BUFFER                         VARCHAR2                IN.
    That means this exists... Tomorrow the database will be undegoing backup and so will shutdown and startup..
    So probably on monday I can check if i can login.. becuase I tried to view the same details using TOAD and i faced no errors as such...
    So lets wait till monday... if no other solution..
    Thanks
    Kkukreja

  • ORA 0655, PLS 00201 identifier sys.dbms_repcat_utl2@tdr1.world

    I have created a repgroup CAROLINE and I get an error when I try to add a master site to it.The master definition site is on v 8.1.7.0.0.(tammy sid) and the master site (pony sid) on v 8.0.6.3.0.
    The error I get is :
    ORA-06550: line 1, column 7:
    PLS-00201: identifier '[email protected]' must be declared
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    ORA-06512: at "SYS.DBMS_REPCAT_UTL4", line 2683
    ORA-06512: at "SYS.DBMS_REPCAT_UTL4", line 2377
    ORA-06512: at "SYS.DBMS_REPCAT_MAS", line 2039
    ORA-06512: at "SYS.DBMS_REPCAT", line 556
    ORA-06512: at line 1
    I've followed the steps on the metalink doc 117434.1 to setup the replication user.
    I have checked all the objects,they exist and are valid. I I get the same error when I try to remove the group or purge administrative requests from the master site. The group is only removed from the master definition site.
    I have tried tested the database links and simulated this problem on another 817 db (dandy sid) as the master definition site to the same 8.0.6.3.0 (pony sid)master site and this test worked!
    So I can only conclude that there's something wrong on the other 817 db (tammy).

    Is there an Oracle version number anywhere in sight?
    Why are you trying to access a built-in package owned by SYS across a DB Link rather than using the local copy?
    Advanced (choke) Replication is a deprecated technology. Why aren't you using Streams?

  • PLS-00201: identifier 'DBMS_JAVA.SET_OUTPUT' must be declared

    We have recently upgraded to oracle 11g and when trying to execute the code:
    begin DBMS_JAVA.SET_OUTPUT(10000); end;
    We are returned the error:
    ORA-06550: line 1, column 7:
    PLS-00201: identifier 'DBMS_JAVA.SET_OUTPUT' must be declared
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    The DBMS_JAVA package, both body and spec are valid & compiled.
    Could there be an issue with permissions or missing dependencies?
    Thank you.

    Hello Frank thank you for your quick response.
    I have checked the database:
    select * from dba_tab_privs where table_name = 'DBMS_JAVA'
    Returns-------
    Grantee: PUBLIC
    Owner: SYS
    Table Name: DBMS_JAVA
    Grantor: SYS
    Privilege: EXECUTE
    Grantable: NO
    HIERARCHY: NO
    edit: sorry I just noticed the second part of your post.
    "Also, make sure there's a public synonym DBMS_JAVA, referencing SYS.DBMS_JAVA."
    I believe that this is the issue. I am sorry I only marked your response as 'helpful'..
    Edited by: 912947 on Feb 7, 2012 11:33 AM

  • Errors: REPAPI 26522 & PLS 00201

    Received these errors when trying to test replication.
    "REPAPI 26522:plsql rpc refresh context get failed."
    "PLS 00201: identifier sys.dbms_snap_repapi must be declared."
    Here's what I have done:
    I defined snapshot log on master ok.
    When I drag/drop master table to "snapshots" folder in Lite
    navigator I get the "New snapshot properties" dialog; I give it
    a name and set read-only; no conditions are set on second tab
    page. I press ok and get the above error dialog.
    Thanks for any info.

    Just an idea...
    If you have had typical installation, advanced replication
    features don't come as typical. Please check out if you have
    installed the Replication manager and a few more utilities (for
    file-based replication).

  • PLS-00201: identifier...   ERROR

    Hi,
    I'm very new at PL/SQL and creating stored procedures. I'm trying to create a very simple stored procedure that inserts a row into the WFLOW table, but I keep receiving an error that looks like this:
    PLS-00201: identifier 'WFLOW' must be declared
    However, if I insert directly, it works.
    Please see the code used below:
    CREATE OR REPLACE PROCEDURE inWflowRules IS
    BEGIN
    INSERT INTO WFLOW (WFLOW_RULE_I, WFLOW_RULE_T) VALUES (2,'This is the 2nd row.');
    END inWflowRules;
    Please help.
    Thanks,
    Lukeisha

    If the table exists in another schema, it is easier to create a public synonym fro that table, so that other users can see that table without adding the schema name in front of the table.
    Try this in sqlplus:
    select * from wflow where rownum=1;
    Do you get an error?
    If not, than you are probably not authorized to use table wflow in a procedure. The owner of the table has to grant you for this table.
    grant select, insert, update, delete on wflow to <user>;

Maybe you are looking for

  • TAX code requires default cost center

    Hi, There is an error coming while posting the MIRO Invoice with tax code ( need to be charge to PL Account) " put the cost center " for GL Account for tax code. This is  a cost element & hence requires cost center but the field for entring tax posti

  • Mail not sending attachments

    On behalf of a friend who I usually do phone support for when he has a problem. This problem has stumped me! Mail 4.5 (1084) Mac OSX 10.6.8 He has mail set to access Gmail (IMAP) and it works fine when sending a normal email, however, when sending an

  • ABAP enhancement in SAP SD

    Hai, Can anyone pls give some example for SAP SD Enhancements

  • Website has sent an untrusted certificate accept a...

    today when i opened the ovi maps as usual and then opened weather and as normal it asks me to go online to use the service any ways i tapped yes and proceeded but this time a new message appeared (website has sent an untrusted certificate accept any

  • Extigy vs. Audigy 2 ZS Platinum

    I currently own an Extigy and love the flexibility of an external sound card. However, the product has been downright painful to own. Every time the power flickers or anyone sneezes I have to uninstall and reinstall the drivers for it. Which requires