Error  ORA-06550,  PLS-00103 in procedure launched by php page

Hi,
I have written a php page that calls a pl/sql procedure. When I launch the procedure (through the php) I receive this error
Warning: ociexecute(): OCIStmtExecute: ORA-06550: line 1, column 101: PLS-00103: Encountered the symbol "" when expecting one of the following: ( - + case mod new not null others <an identifier>  <a double-quoted delimited-identifier> <a bind variable> avg count current exists max min prior sql stddev sum variance execute forall merge time timestamp interval date <a string literal with character set specification>  <a number> <a single-quoted SQL string> pipe <an alternatively-quoted string literal with character set specifi in /web/findb/php/fin/SPR/nuoveEmissioni/nuoveEmissioni.class.php on line 918
bool(false) The php code that calls the procedure is the following:
$query  = " declare retU number; begin ";
      $query .= " retU := pkg_schedapr.UPDATE_SPR_STATUS( :isinU, :utente, :emissione_f,
                        :azione_f, :fondo_f, :emittenteU_f, :rischioU_f, :varU_f,
                        :formulaU_f, :profiloU_f); ";
      $query .= ":retU_val := retU; "; 
      $query .= "end;";   
      $stmtUpdate = ociparse ($this->conn,$query);
         if (!$stmtUpdate) die (var_dump(OCIError()));  
        ociBindByName($stmtUpdate, ":isinU", $isin_t, 12);
        ociBindByName($stmtUpdate, ":utente", $userName, 20);
        ociBindByName($stmtUpdate, ":emissione_f", $mod_bond, 1);
        ociBindByName($stmtUpdate, ":azione_f", $mod_azione, 1);
        ociBindByName($stmtUpdate, ":fondo_f", $mod_fondo, 1);
        ociBindByName($stmtUpdate, ":emittenteU_f", $mod_emittente, 1);
        ociBindByName($stmtUpdate, ":rischioU_f", $mod_rischio, 1);
        ociBindByName($stmtUpdate, ":varU_f", $mod_var, 1);
        ociBindByName($stmtUpdate, ":formulaU_f", $mod_formula, 1);
        ociBindByName($stmtUpdate, ":profiloU_f", $mod_profilo, 1);
        ociBindByName($stmtUpdate, ":retU_val", $retU_val, 1);  
        $err=OCIExecute($stmtUpdate);
         if (!$err) die (var_dump(OCIError()));
      ocifreestatement($stmtUpdate);  The pl/sql procedure is the following:
function UPDATE_SPR_STATUS(isin_p in varchar2, utente in varchar2, mercato in varchar2,
                           emissione_p in number, azione_p in number, fondo_p in number, emittente_p in number,
                           rischio_p in number, var_p in number, formula_p in number, mercato_p in number,
                           profilo_p in number) return number
is
control number;
modificato number;
SQL_QUERY VARCHAR2(4000);
TYPE MOD_SUM IS REF CURSOR;
SUMM MOD_SUM;
TYPE MOD_SUM_ROW
    IS RECORD(
        EMISSIONE VARCHAR2(1),
        AZIONE VARCHAR2(1),
        FONDO VARCHAR2(1),
        EMITTENTE VARCHAR2(1),
        RISCHIO VARCHAR2(1),
        VAR VARCHAR2(1),
        FORMULA VARCHAR2(1),
        PROFILO VARCHAR2(1)
MODIFICHE MOD_SUM_ROW;
EMS VARCHAR2(1);
AZI VARCHAR2(1);
FON VARCHAR2(1);
EMT VARCHAR2(1);
RSK VARCHAR2(1);
VAR VARCHAR2(1);
FRM VARCHAR2(1);
PRF VARCHAR2(1);
MKT VARCHAR(1);
begin
     modificato := emissione_p + azione_p + fondo_p + emittente_p + rischio_p
                   + var_p + formula_p + mercato_p + profilo_p;
     select count(*)
     into control
     from spr_web_nuove_emissioni a
     where a.ISIN=isin_p
     AND A.END_DATE IS NULL;
     if control > 0
     then
     update spr_web_nuove_emissioni a
     set a.END_DATE=sysdate
     where a.ISIN=isin_p
       AND A.END_DATE IS NULL;
     SQL_QUERY := 'SELECT A.EMISSIONE, A.AZIONE, A.FONDO, A.EMITTENTE,
                   A.RISCHIO, A.VAR, A.FORMULA,
                   A.PROFILO
                   FROM SPR_WEB_NUOVE_EMISSIONI A
                   WHERE A.ISIN='''||isin_p||' AND A.END_DATE=TRUNC(SYSDATE)';
     OPEN SUMM FOR SQL_QUERY;       
     LOOP
     FETCH SUMM INTO MODIFICHE;
     EXIT WHEN SUMM%NOTFOUND;
     if emissione_p < 1 THEN
     EMS := MODIFICHE.EMISSIONE;
     ELSE
     EMS := 'Y';
     end if;
     if azione_p < 1 THEN
     AZI := MODIFICHE.AZIONE;
     ELSE
     AZI := 'Y';
     end if;
     if fondo_p < 1 THEN
     FON := MODIFICHE.FONDO;
     ELSE
     FON := 'Y';
     end if;
     if emittente_p < 1 THEN
     EMT := MODIFICHE.EMITTENTE;
     ELSE
     EMT := 'Y';
     end if;
     if rischio_p < 1 THEN
     RSK := MODIFICHE.RISCHIO;
     ELSE
     RSK := 'Y';
     end if;
     if var_p < 1 THEN
     VAR := MODIFICHE.VAR;
     ELSE
     VAR := 'Y';
     end if;
     if formula_p < 1 THEN
     FRM := MODIFICHE.FORMULA;
     ELSE
     FRM := 'Y';
     end if;
     if profilo_p < 1 THEN
     PRF := MODIFICHE.PROFILO;
     ELSE
     PRF := 'Y';
     end if;
     END LOOP;
     CLOSE SUMM;
     ELSE
     if emissione_p < 1 THEN
     EMS := 'N';
     ELSE
     EMS := 'Y';
     end if;
     if azione_p < 1 THEN
     AZI := 'N';
     ELSE
     AZI := 'Y';
     end if;
     if fondo_p < 1 THEN
     FON := 'N';
     ELSE
     FON := 'Y';
     end if;
     if emittente_p < 1 THEN
     EMT := 'N';
     ELSE
     EMT := 'Y';
     end if;
     if rischio_p < 1 THEN
     RSK := 'N';
     ELSE
     RSK := 'Y';
     end if;
     if var_p < 1 THEN
     VAR := 'N';
     ELSE
     VAR := 'Y';
     end if;
     if formula_p < 1 THEN
     FRM := 'N';
     ELSE
     FRM := 'Y';
     end if;
     if profilo_p < 1 THEN
     PRF := 'N';
     ELSE
     PRF := 'Y';
     end if;
     end if;
     insert into spr_web_nuove_emissioni
     values (isin_p, sysdate, utente, EMS, AZI, FON, EMT,
            RSK, VAR, FRM, PRF,
            SYSDATE, NULL);
     begin
     update spr_status a
     set a.VALIDATED='Y'
     where a.ISIN=isin_p
       AND A.MARKET=mercato;
     if modificato > 0
     then
     update spr_status a
     set a.USER_CHANGE='Y', a.USER_LAST_MODIFIED=sysdate
     where a.ISIN=isin_p and a.MARKET=mercato;
     end if;
     exception
         when others then
         dbms_output.put_line('ERROR in <PKG_SCHEDAPR.UPDATE_SPR_STATUS> Aggiornamento stato ' ||SQLCODE||'-'||SQLERRM);
         return 1;
     end;
     commit;
     return 0;
end UPDATE_SPR_STATUS;I do not succed to understand the error I receive, why? Where is the error?
Can someone help me?
Thanks, bye bye.

Hi,
I have changed the php code in this way:
$query  = " declare retU number; begin ";
      $query .= " retU := pkg_schedapr.UPDATE_SPR_STATUS(:isinU, :utente, :emissione_f, ";
      $query .= ":azione_f, :fondo_f, :emittenteU_f, :rischioU_f, :varU_f, ";
      $query .= ":formulaU_f, :profiloU_f); ";
      $query .= ":retU_val := retU; "; 
      $query .= "end;";   
      $stmtUpdate = ociparse ($this->conn,$query);
         if (!$stmtUpdate) die (var_dump(OCIError()));  
        ociBindByName($stmtUpdate, ":isinU", $isin_t, 12);
        ociBindByName($stmtUpdate, ":utente", $userName, 20);
        ociBindByName($stmtUpdate, ":emissione_f", $mod_bond, 1);
        ociBindByName($stmtUpdate, ":azione_f", $mod_azione, 1);
        ociBindByName($stmtUpdate, ":fondo_f", $mod_fondo, 1);
        ociBindByName($stmtUpdate, ":emittenteU_f", $mod_emittente, 1);
        ociBindByName($stmtUpdate, ":rischioU_f", $mod_rischio, 1);
        ociBindByName($stmtUpdate, ":varU_f", $mod_var, 1);
        ociBindByName($stmtUpdate, ":formulaU_f", $mod_formula, 1);
        ociBindByName($stmtUpdate, ":profiloU_f", $mod_profilo, 1);
        ociBindByName($stmtUpdate, ":retU_val", $retU_val, 1);  
         echo "$isin_t--";echo "$userName--"; echo"$mod_bond--";
      echo "$mod_azione--";echo "$mod_fondo--"; echo"$mod_emittente--";
      echo "$mod_rischio--";echo "$mod_var--"; echo"$mod_formula--";
      echo "$mod_profilo--";echo "$retU_val";
        echo "$query";
        $err=OCIExecute($stmtUpdate);
         if (!$err) die (var_dump(OCIError()));
      ocifreestatement($stmtUpdate);   and now I receive this error:
Warning: ociexecute(): OCIStmtExecute: ORA-01756: quoted string not properly terminated ORA-06512: at "FIN.PKG_SCHEDAPR", line 6420 ORA-06512: at line 1 in /web/findb/php/fin/SPR/nuoveEmissioni/nuoveEmissioni.class.php on line 918
bool(false) But I do not understand the cause of the error.
How can I solve?
Thanks, bye bye.

Similar Messages

  • Discoverer 3.1.25: getting error ORA-06550 when scheduling report

    Hello,
    we are still using the Discoverer version 3 (release 3.1.25). I know that this version is out of support, but that doesn't harm use from using it...
    The Discoverer has been working fine for the last couple years. At the beginning of every month the same already defined reports are getting generated. But with the beginning of the year 2010 we are getting the error:
    ORA-06550: line 1, column 93:
    PLS-00201: identifier 'EUL$BATCH_PACKAGE0100112082923.RUN' must be declared
    ORA-06550: line 1, column 93:
    PL/SQL: Statement ignored
    ORA-06512: at "SYS.DBMS_JOB" line 79
    The numbers "0100112082923" after the identifier "EUL$BATCH_PACKAGE" specify the date and time:
    082923: 08 hour, 29 minutes, 23 seconds
    0100112: 010 year, 01 month, 12 day
    The reason of that error is that the mentioned Package/Packagebody EUL$BATCH_PACKAGE*0*100112082923 doesn't exist in the database. But as a matter of fact the Package/Packagebody 'EUL$BATCH_PACKAGE100112082923 does exist. The Discoverer creates the Package/Packagebody without the "0" after the identifier "EUL$BATCH_PACKAGE" in the database, but wants to use the Package/Packagebody with the "0" after the identifier "EUL$BATCH_PACKAGE". Seems like a bug to me - does anybody have the same problem?
    Until the year 2009 the year was specified with just two digits (09) - now the year seems to get specified with 3 digits (010) - but in the database just two digits are used. Is there any property table or button where this gets defined?
    Any help will be appreciated!

    Seems like if I have found the bug by myself...
    In the procedure SubmitJob(...) of the package EUL$BATCH_REPOSITORY the name of the scheduled procedure gets generated with the hardcoded string
    "EUL$BATCH_PACKAGE0". The zero after "PACKAGE" is only correct when the year ends with one digit (e.g. 2001, 2002, ..., 2009). When shortening the
    string to "EUL$BATCH_PACKAGE" everything works fine again...
    Rgds

  • PL/SQL Explicit Cursors,Error(3,15): PLS-00103

    I creat procedure as following:
    PROCEDURE Proj_Using_Most_People_ByGender (TheGender Employee.Sex%Type)
    IS
    ProjIdWorks_On.Pno%TYPE;
    ProjCnt number;
    CURSOR Get_People_Involved(Gender IN Employee.Sex%Type)
    IS
    select w.Pno, count(*) as TotalPeople
    from Works_On w, Employee e
    where e.Sex = Gender
    and e.Ssn = w.Essn
    group by w.Pno
    order by TotalPeople desc;
    BEGIN
    open Get_People_Involved(TheGender);
    for i in 1..3 loop
    fetch Get_People_Involved into ProjId, ProjCnt;
    exit when Get_People_Involved%NOTFOUND;
    dbms_output.put_line (' Project: ' || to_char(ProjId) ||
    ' Personnel: ' || to_char(ProjCnt) );
    end loop;
    close Get_People_Involved;
    EXCEPTION
    when others then
    dbms_output.PUT_LINE ( 'Problems' );
    END;
    error is:
    Error(3,15): PLS-00103: Encountered the symbol "." when expecting one of the following: constant exception <an identifier> <a double-quoted delimited-identifier> table LONG_ double ref char time timestamp interval date binary national character nchar The symbol "<an identifier>" was substituted for "." to continue.
    Anybody can help me? Thanks a lot!

    I didn't see a problem - except you should have
    CREATE OR REPLACE PROCEDURE ... and not just PROCEDURE ...
    SQL> create or replace PROCEDURE explitpro (TheGender Employee.Sex%Type) IS
      2  ProjId  Works_On.Pno%TYPE;
      3  ProjCnt number;
      4  CURSOR Get_People_Involved(Gender IN Employee.Sex%Type) IS
      5     select w.Pno, count(*) as TotalPeople
      6        from Works_On w, Employee e
      7        where e.Sex = Gender
      8          and e.Ssn = w.Essn
      9      group by w.Pno
    10      order by TotalPeople desc;
    11  BEGIN
    12    open Get_People_Involved(TheGender);
    13    for i in 1..3 loop
    14       fetch Get_People_Involved into ProjId, ProjCnt;
    15            exit when Get_People_Involved%NOTFOUND;
    16       dbms_output.put_line (' Project: ' || to_char(ProjId) ||
    17                             ' Personnel: ' || to_char(ProjCnt) );
    18     end loop;
    19     close Get_People_Involved;
    20  EXCEPTION
    21    when others then
    22       dbms_output.PUT_LINE ( 'Problems' );
    23  END;
    24 /
    Procedure created.
    SQL> EXECUTE EXPLITPRO('F')
    PL/SQL procedure successfully completed.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • ERROR: ORA-06553: PLS-801: internal error [55018]

    Sorry for my bad english ...
    I got error ...
    ERROR: ORA-06553: PLS-801: internal error [55018]
    if I build function than return %rowtype like this
    SELECT * INTO var_return FROM .......
    RETURN var_return
    Oracle 11g in RedHat Linux
    Thanks before ...

    Hi,
    Perhaps this link can help you.
    Regards

  • How can I correct this error:  Error(24,7): PLS-00103:

    I have the following Trigger
    create or replace
    TRIGGER "CODE_BARRAS"
    before insert or update of CODIGO_BARRAS on PAGOS FOR EACH ROW
    begin
    IF INSERTING THEN
    IF LENGTH(:NEW.CODIGO_BARRAS) = 66 THEN
    :NEW.EAN := SUBSTR(:NEW.CODIGO_BARRAS, 4,13);
    :NEW.CODIGO_CUENTA := SUBSTR(:NEW.CODIGO_BARRAS, 21,22);
    :NEW.NRO_DOCUMENTO := 0;
    :NEW.VALOR_PAGO := SUBSTR(:NEW.CODIGO_BARRAS, 47,10);
    :NEW.FECHA_PAGO := TO_CHAR(SYSDATE,'YYYYMMDD');
    :NEW.NUM_LOTE := NUM_LOTE();
    ELSIF LENGTH(:NEW.CODIGO_BARRAS) = 62 THEN
    :NEW.EAN := SUBSTR(:NEW.CODIGO_BARRAS, 4,13);
    :NEW.CODIGO_CUENTA := SUBSTR(:NEW.CODIGO_BARRAS, 21,9);
    :NEW.NRO_DOCUMENTO := SUBSTR(:NEW.CODIGO_BARRAS, 30,9);
    :NEW.VALOR_PAGO := SUBSTR(:NEW.CODIGO_BARRAS, 43,10);
    :NEW.FECHA_PAGO := TO_CHAR(SYSDATE,'YYYYMMDD');
    :NEW.NUM_LOTE := NUM_LOTE();
    END IF;
    END IF;
    END IF;
    EXCEPTION
    when no_data_found then
    DBMS_OUTPUT.PUT_LINE(' NO HAY INFORMACION, CODIGO ERRADO');
    end;
    Which generates the following error me
    Error(24,7): PLS-00103: Se ha encontrado el símbolo "IF" cuando se esperaba uno de los siguientes: ; <an identifier> <a double-quoted delimited-identifier>
    how do I correct the tigger?_
    I am grateful for your help..._

    Hi Rey-user6318244!
    You may delete the last END IF; to correct your trigger
    create or replace
    TRIGGER "CODE_BARRAS"
    before insert or update of CODIGO_BARRAS on PAGOS FOR EACH ROW
    begin
    IF INSERTING THEN
    IF LENGTH(:NEW.CODIGO_BARRAS) = 66 THEN
    :NEW.EAN := SUBSTR(:NEW.CODIGO_BARRAS, 4,13);
    :NEW.CODIGO_CUENTA := SUBSTR(:NEW.CODIGO_BARRAS, 21,22);
    :NEW.NRO_DOCUMENTO := 0;
    :NEW.VALOR_PAGO := SUBSTR(:NEW.CODIGO_BARRAS, 47,10);
    :NEW.FECHA_PAGO := TO_CHAR(SYSDATE,'YYYYMMDD');
    :NEW.NUM_LOTE := NUM_LOTE();
    ELSIF LENGTH(:NEW.CODIGO_BARRAS) = 62 THEN
    :NEW.EAN := SUBSTR(:NEW.CODIGO_BARRAS, 4,13);
    :NEW.CODIGO_CUENTA := SUBSTR(:NEW.CODIGO_BARRAS, 21,9);
    :NEW.NRO_DOCUMENTO := SUBSTR(:NEW.CODIGO_BARRAS, 30,9);
    :NEW.VALOR_PAGO := SUBSTR(:NEW.CODIGO_BARRAS, 43,10);
    :NEW.FECHA_PAGO := TO_CHAR(SYSDATE,'YYYYMMDD');
    :NEW.NUM_LOTE := NUM_LOTE();
    END IF;
    END IF;
    EXCEPTION
    when no_data_found then
    DBMS_OUTPUT.PUT_LINE(' NO HAY INFORMACION, CODIGO ERRADO');
    end;yours sincerely
    Florian W.
    P.S. Please enclose your code into to get formated output. Thanks a lot!
    Edited by: Florian W. on 23.02.2009 16:02                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Help on ORA-06550 & PLS-00363 Error while running a procedure from a packag

    Greeting All,
    I ran the following procedure from a package on a command line in sqlplus:
    SQL> exec QUALITY_ASSURANCE.COPY_SW_RESOURCES(2009,2010,9508);Where '2009' is the old fiscal year, '2010' is the new fiscal year and '9508' is the error code passed from the calling program. But, I received the following error messages:
    ERROR at line 1:
    ORA-06550: line 1, column 53:
    PLS-00363: expression '9508' cannot be used as an assignment target
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    Any thoughts, suggestions and/or advice to resolve these errors.
    Thanks in advance.

    Orchid wrote:
    Justin,
    Thanks for your response and information. Yes, Theoa was correct the 3rd parameter is an OUT variable, and it is a numeric field. The procedure was called by a form as follows:
    QUALITY_ASSURANCE.COPY_SW_RESOURCES(:BLK_CONTROL.FROMFY,:BLK_CONTROL.TOFY,V_ERR);But the form does not work so I am trying to isolate the problem by running the procedure by itself in sqlplus to make sure there is no problem with the procedure.
    Yesterday, I was able to run the procedure in Toad for Oracle to a successful completion by providing the 3 parameters: (2009, 2010, null). Just wonder why I cannot run the same procedure with the same parameters on a command line in sqlplus as follows:
    exec QUALITY_ASSURANCE.COPY_SW_RESOURCES(2009,2010,null);So, if I understand your suggestion correctly, in order to run the procedure with the 3 parameter successfully in sqlplus,
    I have to declare the 3rd parameter in PL/SQL. That is to create a PL/SQL file as suggested and run the file, correct? CORRECT!

  • 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;

  • Databse Connector Error: 'HY000:[Oracle][ODBC][Ora]ORA-06550: PLS-00363

    Whenever I try to add a database stored procedure in my crystal report using ODBC connection in the 'Set datasource Location' menu, it asks me for the discrete value for the parameters I specified in my stored procedure(Except for the REF cursor). My stored procedure seems to be correct but there seems to be a confusion within my crystal report. Once the values are entered it ends up by showing the following error message and my database source does not get added:
    Databse Connector Error: 'HY000:[Oracle][ODBC][Ora]ORA-06550: line 1, column 18:PLS-00363: expression '01/01/2008' cannot be used as an assignment target
    ORA-06550: line 1, column 31:PLS-00363: expression '01/01/2010' cannot be used as an assignment target
    PL/SQL: Statement ignored
    [Database Vendor Code: 6550 ]'
    The only difference I am noticing is the REF Cursor is used in the Oracle SP. Whether the Crystal report can't differentiate my cursor or What could be the problem. Please provide me a solution for this
    Note: The same is working when I change the database to any SQL
    Seems to be the root cause for the problem is the parameters are getting renamed with the name of Stored procedure arguments once we change the database from SQL server to Oracle. Is there any possibilities to avoid this?
    Thanks
    Antony
    Edited by: AntonyGR on Oct 11, 2011 1:32 PM

    What is the first arguement in the Oracle  SP.Is it REF cusror or something else?
    Also which ODBC driver you are using ?
    Thanks,
    Bilahari

  • ORA-06550: Please-00103, ORA-06550: Please-00103 DECODE function

    Hi to all.
    I have client oracle 8i and i'm using pl sql developer.
    I have the following plsql procedure:
    set serveroutput on size 1000000;
    DECLARE
    type t_cur is ref cursor;
    type type_rec is record (codicepool char(12),
    codicefisico char(12),
    givenname varchar2(12),
    denominazione char(40),
    tipoedificio varchar2(50),
    tipoimpianto varchar2(40),
    stationtypecaminus char(40),
    codiceateco varchar2(8),
    capacitatrasporto number(9),
    capacitaconferita1 number(9), capacitaconferita2 number(9),capacitaconferita3 number(9),capacitaconferita4 number(9),
    capacitaconferita5 number (9),capacitaconferita6 number(9),capacitaconferita7 number(9),capacitaconferita8 number(9),
    capacitaconferita9 number (9),capacitaconferita10 number(9),capacitaconferita11 number(9),capacitaconferita12 number(9),
    capacitaconferita13 number(9),capacitaconferita14 number(9),capacitaconferita15 number(9),capacitaconferita16 number(9),
    capacitaconferita17 number(9),capacitaconferita18 number(9),capacitaconferita19 number(9),capacitaconferita20 number(9),
    capacitaconferita21 number(9),capacitaconferita22 number(9),capacitaconferita23 number(9),capacitaconferita24 number(9),
    capacitaconferita25 number(9),capacitaconferita26 number(9),capacitaconferita27 number(9),capacitaconferita28 number(9),
    capacitaconferita29 number(9),capacitaconferita30 number(9),capacitaconferita31 number(9),
    energia1 number(9),energia2 number(9),energia3 number(9),energia4 number(9),energia5 number(9),energia6 number(9),energia7 number(9),
    energia8 number(9),energia9 number(9),energia10 number(9),energia11 number(9),energia12 number(9),energia13 number(9),energia14 number(9),
    energia15 number(9),energia16 number(9),energia17 number(9),energia18 number(9),energia19 number(9),energia20 number(9),energia21 number(9),
    energia22 number(9),energia23 number(9),energia24 number(9),energia25 number(9),energia26 number(9),energia27 number(9),energia28 number(9),
    energia29 number(9),energia30 number(9),energia31 number(9),
    volumeprofilato1 number(9),volumeprofilato2 number(9),volumeprofilato3 number(9),volumeprofilato4 number(9),volumeprofilato5 number(9),
    volumeprofilato6 number(9),volumeprofilato7 number(9),volumeprofilato8 number(9),volumeprofilato9 number(9),
    volumeprofilato10 number(9),
    volumeprofilato11 number(9),volumeprofilato12 number(9),volumeprofilato13 number(9),volumeprofilato14 number(9),volumeprofilato15 number(9),
    volumeprofilato16 number(9),volumeprofilato17 number(9),volumeprofilato18 number(9),volumeprofilato19 number(9),volumeprofilato20 number(9),
    volumeprofilato21 number(9),volumeprofilato22 number(9),volumeprofilato23 number(9),volumeprofilato24 number(9),volumeprofilato25 number(9),
    volumeprofilato26 number(9),volumeprofilato27 number(9),volumeprofilato28 number(9),volumeprofilato29 number(9),volumeprofilato30 number(9),
    volumeprofilato31 number(9),tipo_misura char(20));
    cur t_cur;
    bilancio_rec type_rec;
    f utl_file.file_type;
    begin
    f := utl_file.fopen('SAMPLEDATA','prova_bilancio.txt','W');
    OPEN cur for
    SELECT q.codicepool, q.codicefisico, q.denominazione, q.tipoedificio,
    q.tipoimpianto, q.stationtypecaminus, q.codiceateco,
    q.capacitatrasporto, c.cc1 AS capacitaconferita1,
    c.cc2 AS capacitaconferita2, c.cc3 AS capacitaconferita3,
    c.cc4 AS capacitaconferita4, c.cc5 AS capacitaconferita5,
    c.cc6 AS capacitaconferita6, c.cc7 AS capacitaconferita7,
    c.cc8 AS capacitaconferita8, c.cc9 AS capacitaconferita9,
    c.cc10 AS capacitaconferita10, c.cc11 AS capacitaconferita11,
    c.cc12 AS capacitaconferita12, c.cc13 AS capacitaconferita13,
    c.cc14 AS capacitaconferita14, c.cc15 AS capacitaconferita15,
    c.cc16 AS capacitaconferita16, c.cc17 AS capacitaconferita17,
    c.cc18 AS capacitaconferita18, c.cc19 AS capacitaconferita19,
    c.cc20 AS capacitaconferita20, c.cc21 AS capacitaconferita21,
    c.cc22 AS capacitaconferita22, c.cc23 AS capacitaconferita23,
    c.cc24 AS capacitaconferita24, c.cc25 AS capacitaconferita25,
    c.cc26 AS capacitaconferita26, c.cc27 AS capacitaconferita27,
    c.cc28 AS capacitaconferita28, c.cc29 AS capacitaconferita29,
    c.cc30 AS capacitaconferita30, c.cc31 AS capacitaconferita31,
    v.dk1 / 10 AS energia1, v.dk2 / 10 AS energia2, v.dk3 / 10 AS energia3,
    v.dk4 / 10 AS energia4, v.dk5 / 10 AS energia5, v.dk6 / 10 AS energia6,
    v.dk7 / 10 AS energia7, v.dk8 / 10 AS energia8, v.dk9 / 10 AS energia9,
    v.dk10 / 10 AS energia10, v.dk11 / 10 AS energia11,
    v.dk12 / 10 AS energia12, v.dk13 / 10 AS energia13,
    v.dk14 / 10 AS energia14, v.dk15 / 10 AS energia15,
    v.dk16 / 10 AS energia16, v.dk17 / 10 AS energia17,
    v.dk18 / 10 AS energia18, v.dk19 / 10 AS energia19,
    v.dk20 / 10 AS energia20, v.dk21 / 10 AS energia21,
    v.dk22 / 10 AS energia22, v.dk23 / 10 AS energia23,
    v.dk24 / 10 AS energia24, v.dk25 / 10 AS energia25,
    v.dk26 / 10 AS energia26, v.dk27 / 10 AS energia27,
    v.dk28 / 10 AS energia28, v.dk29 / 10 AS energia29,
    v.dk30 / 10 AS energia30, v.dk31 / 10 AS energia31,
    v.vol1 AS volumeprofilato1, v.vol2 AS volumeprofilato2,
    v.vol3 AS volumeprofilato3, v.vol4 AS volumeprofilato4,
    v.vol5 AS volumeprofilato5, v.vol6 AS volumeprofilato6,
    v.vol7 AS volumeprofilato7, v.vol8 AS volumeprofilato8,
    v.vol9 AS volumeprofilato9, v.vol10 AS volumeprofilato10,
    v.vol11 AS volumeprofilato11, v.vol12 AS volumeprofilato12,
    v.vol13 AS volumeprofilato13, v.vol14 AS volumeprofilato14,
    v.vol15 AS volumeprofilato15, v.vol16 AS volumeprofilato16,
    v.vol17 AS volumeprofilato17, v.vol18 AS volumeprofilato18,
    v.vol19 AS volumeprofilato19, v.vol20 AS volumeprofilato20,
    v.vol21 AS volumeprofilato21, v.vol22 AS volumeprofilato22,
    v.vol23 AS volumeprofilato23, v.vol24 AS volumeprofilato24,
    v.vol25 AS volumeprofilato25, v.vol26 AS volumeprofilato26,
    v.vol27 AS volumeprofilato27, v.vol28 AS volumeprofilato28,
    v.vol29 AS volumeprofilato29, v.vol30 AS volumeprofilato30,
    v.vol31 AS volumeprofilato31, q.tipo_misura
    FROM volume v,
    +(SELECT ss.pipeline AS pipeline, ss.prodyear AS prodyear,+
    ss.prodmonth AS prodmonth, ss.groupid AS codicepool,
    +/****LINE 98 IS THIS***/ ss.meter AS codicefisico, ss.description AS denominazione,+
    DECODE (sra.tipoedificio,
    NULL, NULL,
    +/****LINE 101 IS THIS***/ (SELECT descrizione+
    FROM sap_tipi_edificio
    WHERE tipoedificio = sra.tipoedificio)
    +/****LINE 104 IS THIS***/ ) AS tipoedificio,+
    DECODE (sra.tipoimpianto,
    NULL, NULL,
    +/****LINE 107 IS THIS***/ (SELECT descrizione+
    FROM sap_tipi_impianto
    WHERE tipoimpianto = sra.tipoimpianto)
    +) AS tipoimpianto,+
    st.description AS stationtypecaminus,
    sra.tranpzona AS codiceateco,
    ss.maxvolume AS capacitatrasporto,
    DECODE (ss.stationtype,
    +'ED', 'MG',+
    +'EN', 'NMG',+
    +'Non pervenuto'+
    +) AS tipo_misura+
    --SS.stationtype as tipo_misura+
    FROM station_storico ss, sap_remiattributi sra, stationtype st
    WHERE ss.prodyear = 2008
    AND ss.prodmonth = 2
    AND ( ss.prodyear = sra.prodyear()+
    AND ss.prodmonth = sra.prodmonth()+
    AND ss.pipeline = RPAD (sra.pipeline(), 12)+
    AND ss.meter = RPAD (sra.remi(), 12)+
    +) --Other Join tra Station Storico e Sap_remiattributi+
    AND (st.stationtype = ss.stationtype
    +) -- join tra Station_storico e stationtype+
    +) q,+
    +(+
    --AAAAA+
    +(SELECT pipeline, prodyear, prodmonth, delmeter AS meter,+
    SUM (dk1) AS cc1, SUM (dk2) AS cc2, SUM (dk3) AS cc3,
    SUM (dk4) AS cc4, SUM (dk5) AS cc5, SUM (dk6) AS cc6,
    SUM (dk7) AS cc7, SUM (dk8) AS cc8, SUM (dk9) AS cc9,
    SUM (dk10) AS cc10, SUM (dk11) AS cc11, SUM (dk12) AS cc12,
    SUM (dk13) AS cc13, SUM (dk14) AS cc14, SUM (dk15) AS cc15,
    SUM (dk16) AS cc16, SUM (dk17) AS cc17, SUM (dk18) AS cc18,
    SUM (dk19) AS cc19, SUM (dk20) AS cc20, SUM (dk21) AS cc21,
    SUM (dk22) AS cc22, SUM (dk23) AS cc23, SUM (dk24) AS cc24,
    SUM (dk25) AS cc25, SUM (dk26) AS cc26, SUM (dk27) AS cc27,
    SUM (dk28) AS cc28, SUM (dk29) AS cc29, SUM (dk30) AS cc30,
    SUM (dk31) AS cc31
    FROM statcont
    WHERE prodyear = 2008
    AND prodmonth = 2
    AND pipeline IN
    +((RPAD ('RN', 12)),+
    +(RPAD ('RR=A', 12)),+
    +(RPAD ('RR=B', 12)),+
    +(RPAD ('RR=C', 12))+
    +)+
    GROUP BY pipeline, prodyear, prodmonth, delmeter
    UNION
    SELECT pipeline, prodyear, prodmonth, recmeter AS meter,
    SUM (dk1) AS cc1, SUM (dk2) AS cc2, SUM (dk3) AS cc3,
    SUM (dk4) AS cc4, SUM (dk5) AS cc5, SUM (dk6) AS cc6,
    SUM (dk7) AS cc7, SUM (dk8) AS cc8, SUM (dk9) AS cc9,
    SUM (dk10) AS cc10, SUM (dk11) AS cc11, SUM (dk12) AS cc12,
    SUM (dk13) AS cc13, SUM (dk14) AS cc14, SUM (dk15) AS cc15,
    SUM (dk16) AS cc16, SUM (dk17) AS cc17, SUM (dk18) AS cc18,
    SUM (dk19) AS cc19, SUM (dk20) AS cc20, SUM (dk21) AS cc21,
    SUM (dk22) AS cc22, SUM (dk23) AS cc23, SUM (dk24) AS cc24,
    SUM (dk25) AS cc25, SUM (dk26) AS cc26, SUM (dk27) AS cc27,
    SUM (dk28) AS cc28, SUM (dk29) AS cc29, SUM (dk30) AS cc30,
    SUM (dk31) AS cc31
    FROM statcont
    WHERE prodyear = 2008
    AND prodmonth = 2
    AND pipeline IN
    +((RPAD ('RN', 12)),+
    +(RPAD ('RR=A', 12)),+
    +(RPAD ('RR=B', 12)),+
    +(RPAD ('RR=C', 12))+
    +)+
    GROUP BY pipeline, prodyear, prodmonth, recmeter)
    UNION
    +(SELECT pipeline, prodyear, prodmonth, delmeter AS meter,+
    SUM (dk1) AS cc1, SUM (dk2) AS cc2, SUM (dk3) AS cc3,
    SUM (dk4) AS cc4, SUM (dk5) AS cc5, SUM (dk6) AS cc6,
    SUM (dk7) AS cc7, SUM (dk8) AS cc8, SUM (dk9) AS cc9,
    SUM (dk10) AS cc10, SUM (dk11) AS cc11, SUM (dk12) AS cc12,
    SUM (dk13) AS cc13, SUM (dk14) AS cc14, SUM (dk15) AS cc15,
    SUM (dk16) AS cc16, SUM (dk17) AS cc17, SUM (dk18) AS cc18,
    SUM (dk19) AS cc19, SUM (dk20) AS cc20, SUM (dk21) AS cc21,
    SUM (dk22) AS cc22, SUM (dk23) AS cc23, SUM (dk24) AS cc24,
    SUM (dk25) AS cc25, SUM (dk26) AS cc26, SUM (dk27) AS cc27,
    SUM (dk28) AS cc28, SUM (dk29) AS cc29, SUM (dk30) AS cc30,
    SUM (dk31) AS cc31
    FROM statcont
    WHERE prodyear = 2008
    AND prodmonth = 2
    AND pipeline IN
    +((RPAD ('RR=D', 12)),+
    +(RPAD ('RR=E1', 12)),+
    +(RPAD ('RR=E2', 12)),+
    +(RPAD ('RR=F', 12)),+
    +(RPAD ('RR=G', 12)),+
    +(RPAD ('RR=H', 12))+
    +)+
    GROUP BY pipeline, prodyear, prodmonth, delmeter
    UNION
    SELECT pipeline, prodyear, prodmonth, recmeter AS meter,
    SUM (dk1) AS cc1, SUM (dk2) AS cc2, SUM (dk3) AS cc3,
    SUM (dk4) AS cc4, SUM (dk5) AS cc5, SUM (dk6) AS cc6,
    SUM (dk7) AS cc7, SUM (dk8) AS cc8, SUM (dk9) AS cc9,
    SUM (dk10) AS cc10, SUM (dk11) AS cc11, SUM (dk12) AS cc12,
    SUM (dk13) AS cc13, SUM (dk14) AS cc14, SUM (dk15) AS cc15,
    SUM (dk16) AS cc16, SUM (dk17) AS cc17, SUM (dk18) AS cc18,
    SUM (dk19) AS cc19, SUM (dk20) AS cc20, SUM (dk21) AS cc21,
    SUM (dk22) AS cc22, SUM (dk23) AS cc23, SUM (dk24) AS cc24,
    SUM (dk25) AS cc25, SUM (dk26) AS cc26, SUM (dk27) AS cc27,
    SUM (dk28) AS cc28, SUM (dk29) AS cc29, SUM (dk30) AS cc30,
    SUM (dk31) AS cc31
    FROM statcont
    WHERE prodyear = 2008
    AND prodmonth = 2
    AND pipeline IN
    +((RPAD ('RR=D', 12)),+
    +(RPAD ('RR=E1', 12)),+
    +(RPAD ('RR=E2', 12)),+
    +(RPAD ('RR=F', 12)),+
    +(RPAD ('RR=G', 12)),+
    +(RPAD ('RR=H', 12))+
    +)+
    GROUP BY pipeline, prodyear, prodmonth, recmeter)
    UNION
    +(SELECT pipeline, prodyear, prodmonth, delmeter AS meter,+
    SUM (dk1) AS cc1, SUM (dk2) AS cc2, SUM (dk3) AS cc3,
    SUM (dk4) AS cc4, SUM (dk5) AS cc5, SUM (dk6) AS cc6,
    SUM (dk7) AS cc7, SUM (dk8) AS cc8, SUM (dk9) AS cc9,
    SUM (dk10) AS cc10, SUM (dk11) AS cc11, SUM (dk12) AS cc12,
    SUM (dk13) AS cc13, SUM (dk14) AS cc14, SUM (dk15) AS cc15,
    SUM (dk16) AS cc16, SUM (dk17) AS cc17, SUM (dk18) AS cc18,
    SUM (dk19) AS cc19, SUM (dk20) AS cc20, SUM (dk21) AS cc21,
    SUM (dk22) AS cc22, SUM (dk23) AS cc23, SUM (dk24) AS cc24,
    SUM (dk25) AS cc25, SUM (dk26) AS cc26, SUM (dk27) AS cc27,
    SUM (dk28) AS cc28, SUM (dk29) AS cc29, SUM (dk30) AS cc30,
    SUM (dk31) AS cc31
    FROM statcont
    WHERE prodyear = 2008
    AND prodmonth = 2
    AND pipeline IN
    +((RPAD ('RR=I', 12)),+
    +(RPAD ('RR=L', 12)),+
    +(RPAD ('RR=M', 12)),+
    +(RPAD ('RR=N', 12)),+
    +(RPAD ('RR=O', 12)),+
    +(RPAD ('RR=P', 12)),+
    +(RPAD ('RR=Q', 12)),+
    +(RPAD ('RR=R', 12))+
    +)+
    GROUP BY pipeline, prodyear, prodmonth, delmeter
    UNION
    SELECT pipeline, prodyear, prodmonth, recmeter AS meter,
    SUM (dk1) AS cc1, SUM (dk2) AS cc2, SUM (dk3) AS cc3,
    SUM (dk4) AS cc4, SUM (dk5) AS cc5, SUM (dk6) AS cc6,
    SUM (dk7) AS cc7, SUM (dk8) AS cc8, SUM (dk9) AS cc9,
    SUM (dk10) AS cc10, SUM (dk11) AS cc11, SUM (dk12) AS cc12,
    SUM (dk13) AS cc13, SUM (dk14) AS cc14, SUM (dk15) AS cc15,
    SUM (dk16) AS cc16, SUM (dk17) AS cc17, SUM (dk18) AS cc18,
    SUM (dk19) AS cc19, SUM (dk20) AS cc20, SUM (dk21) AS cc21,
    SUM (dk22) AS cc22, SUM (dk23) AS cc23, SUM (dk24) AS cc24,
    SUM (dk25) AS cc25, SUM (dk26) AS cc26, SUM (dk27) AS cc27,
    SUM (dk28) AS cc28, SUM (dk29) AS cc29, SUM (dk30) AS cc30,
    SUM (dk31) AS cc31
    FROM statcont
    WHERE prodyear = 2008
    AND prodmonth = 2
    AND pipeline IN
    +((RPAD ('RR=I', 12)),+
    +(RPAD ('RR=L', 12)),+
    +(RPAD ('RR=M', 12)),+
    +(RPAD ('RR=N', 12)),+
    +(RPAD ('RR=O', 12)),+
    +(RPAD ('RR=P', 12)),+
    +(RPAD ('RR=Q', 12)),+
    +(RPAD ('RR=R', 12))+
    +)+
    GROUP BY pipeline, prodyear, prodmonth, recmeter)
    --AAAA+
    +) c+
    WHERE v.pipeline = q.pipeline
    AND v.meter = q.codicefisico
    AND v.prodyear = q.prodyear
    AND v.prodmonth = q.prodmonth
    AND ( c.pipeline() = v.pipeline+
    AND c.meter() = v.meter+
    AND c.prodyear() = v.prodyear+
    AND c.prodmonth() = v.prodmonth+
    +);+
    loop
    fetch cur into bilancio_def_entry;
    EXIT WHEN cur%notfound;
    utl_file.put_line(f, bilancio.codicepool);
    end loop;
    utl_file.fclose(f);
    CLOSE cur;
    END;
    +/+
    Executing it I have:
    ORA-06550: line 98, column 25:
    Please-00103: Encountered symbol "SELECT" anziché uno dei seguenti:
    +( - ++
    mod not null others <an identifier>
    +<a double-quoted delimited-identifier> <a bind variable> avg+
    count current exists max min prior sql stddev sum variance
    execute forall time timestamp interval date
    +<a string literal with character set specification>+
    +<a number> <a single-quoted SQL string>+
    ORA-06550: riga 101, column 23:
    Please-00103: Encountered symbol ")" anziché uno dei seguenti:
    +; return+
    returning and or
    ORA-06550: line 104, colonna 25:
    Please-00103: Trovato il simbolo "SELECT" anziché uno dei seguenti:
    +( - ++
    mod not null others <an identifier>
    +<a double-quoted delimited-identifier> <a bind variable> avg+
    count current exists max min prior sql stddev sum variance
    ORA-06550: line 107, column 23:
    Please-00103: Encountered symbol ")" anziché uno dei seguenti:
    +; return+
    returning and or
    When i execute the query select from an sql window (not in pl sql procedure) i have no problem.
    Any idea?
    Please help me to come out from th problem.
    Thanks

    Simplified test case:
    Oracle8i Enterprise Edition Release 8.1.7.4.0 - Production
    With the Partitioning option
    JServer Release 8.1.7.4.0 - Production
    SQL> SELECT (SELECT 1
      2          FROM   DUAL) column_name
      3  FROM   DUAL;
    COLUMN_NAME
              1
    SQL> BEGIN
      2     FOR variable_name IN (SELECT (SELECT 1
      3                                   FROM   DUAL) column_name
      4                           FROM   DUAL) LOOP
      5        NULL;
      6     END LOOP;
      7  END;
      8  /
       FOR variable_name IN (SELECT (SELECT 1
    ERROR at line 2:
    ORA-06550: line 2, column 34:
    PLS-00103: Encountered the symbol "SELECT" when expecting one of the following:
    ( - + mod not null others <an identifier>
    <a double-quoted delimited-identifier> <a bind variable> avg
    count current exists max min prior sql stddev sum variance
    execute forall time timestamp interval date
    <a string literal with character set specification>
    <a number> <a single-quoted SQL string>
    ORA-06550: line 3, column 47:
    PLS-00103: Encountered the symbol "COLUMN_NAME" when expecting one of the
    following:
    ) , and or
    SQL>Simply put there were various 'new features' in SQL in 8i (such as analytic functions, scalar subquery as above) that were not added to PL/SQL's built-in SQL parser, so they are not supported.
    Consider using them as part of a view, via dynamic SQL or otherwise use an alternative approach.

  • Subscribing DB Adapter shows errors ORA-06550:

    I am using DB Adapter on subscribing side. I am getting following errors ;
    Error executing the stored procedure "Agent.getNewWriterTransactionID(?)" in the
    schema "null" : ORA-06550: line 1, column 11:
    PLS-00103: Encountered the symbol "." when expecting one of the following:
    java.sql.SQLException: ORA-06550: line 1, column 11:
    PLS-00103: Encountered the symbol "." when expecting one of the following:
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java
    :124)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:304)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:271)
    at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:625)
    at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.
    java:180)
    at oracle.jdbc.driver.T4CCallableStatement.execute_for_rows(T4CCallableS
    tatement.java:869)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStateme
    nt.java:1080)
    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePrep
    aredStatement.java:2915)
    at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStat
    ement.java:3006)
    at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStat
    ement.java:4119)
    at oracle.oai.agent.adapter.database.DBMessageWriter.beginNewTransaction
    (DBMessageWriter.java:1284)
    at oracle.oai.agent.client.SmartQueueDispatcher.run(SmartQueueDispatcher
    .java:315)
    at java.lang.Thread.run(Thread.java:534)
    Redelivering the message for the error "6550"
    Shutting down
    Stopping the Adapter and the service..
    preparing to shutdown
    Messenger: Closing topic subsciber: oai_hub_queue.
    InBound: Throughput (messages/sec) = 0.0
    InMessageTransformer: got a message for processing.
    OutMessageTransformer: got a message for processing.
    InBound: Processed Message Count = 0
    InBound: Message Error Count = 0
    InBound: Recovered (from persistence and resubmission) Message Count = 0
    OutBound: Throughput (messages/sec) = 0.0
    OutBound: Processed Message Count = 0
    OutBound: Recovered (from persistence and resubmission) Message Count = 0
    OutBound: Message Error Count = 0
    Terminate batch job (Y/N)? y
    I recreated oaischema without any errors ...
    I also confirmed that message is being published correctly by using File adapter on subscribing side ...
    I am using 10.1.2.0.2 OAI ...

    Hi All,
    Issue got resolved.
    For this type of issue please go the http://localhost:7001/console page and click the Data Sources and next click on your particular Data Source name
    and click on Transaction tab and increase the values of XA Retry Duration and XA Retry Interval and Restart the server.
    Regards,
    Raj.

  • JDBC receiver error:ORA-06550: line 1, column 7: PL/SQL

    Hi,
    I am geting this error in JDBC Receiver adapter. when  i call the stored procedure.
    Last week it works fine.But i today i faced this error.
    Error Unable to execute statement for table or stored procedure. 'spec_utilities.SP_DELETE(Structure 'unassign') due to java.sql.SQLException: ORA-06550: line 1, column 7: PLS-00201: identifier 'SPEC_UTILITIES.SP_DELETE' must be declared ORA-06550: line 1, column 7: PL/SQL: Statement ignored 
    Error JDBC message processing failed; reason Error processing request in sax parser: Error when executing statement for table/stored proc. 'spec_utilities.SP_DELETE(structure 'unassign'): java.sql.SQLException: ORA-06550: line 1, column 7: PLS-00201: identifier 'SPEC_UTILITIES.SP_DELETE' must be declared ORA-06550: line 1, column 7: PL/SQL: Statement ignored 
    Error MP: Exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'spec_utilities.SP_DELETE (structure 'unassign'): java.sql.SQLException: ORA-06550: line 1, column 7: PLS-00201: identifier 'SPEC_UTILITIES.SP_DELETE'must be declared ORA-06550: line 1, column 7: PL/SQL: Statement ignored 
    My stored procedure structure is:
    <unassign>
    <SP_DELETE action="EXECUTE">
      <table>spec_utilities.SP_DELETE</table>
      <PAE isInput="true" type="VARCHAR">447848</pAEIC>
      <SKEY isInput="true" type="NUMERIC">4548545</pSKEY>
      <USER isOutput="true" type="VARCHAR" />
      <UNIT  isOutput="true" type="VARCHAR" />
      <EMAIL isOutput="true" type="VARCHAR" />
      </SP_DELETE>
      </unassign>
    Can you suggest me where is this error.
    Thank you
    Sateesh

    Hi,
       if it was executing fine earlier then check the below
    1. user permissions level at the database..whether it has access to the required SP or not..
    2. Check if there was any change in the SP..which has not been communicated...
    HTH
    Rajesh

  • Please Help, Error:ORA-06550

    I am calling a stored procedure in a package LDAP_AUTH ,this SP will take 3 input arguments which are varchar2.when I am calling the SP I am getting error.The SP is running fine in SQL * Plus. Pls help me on this.Pls mail me at [email protected]
    I used cmd.ExecuteNonQuery() i am getting the following error.
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'LOGIN'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    ************ Procedure Code Start *****************
    procedure login(p_user_id in varchar2, p_password in varchar2, p_client_identifier in Varchar2)
    as
    retval PLS_INTEGER;
    ldap_host varchar2(255):=get_host;
    ldap_port number:=get_port;
    user_id varchar2(100):=p_user_id;
    password varchar2(255) := p_password;
    base_dn cmm_preference_map_entry.preference_value_1%type := get_base_dn;
    username_filter cmm_preference_map_entry.preference_value_1%type := replace(get_ldap_username_filter,'%u',user_id);
    group_filter cmm_preference_map_entry.preference_value_1%type := get_ldap_group_member_filter;
    my_session DBMS_LDAP.session;
    res_message DBMS_LDAP.MESSAGE;
    res_attrs DBMS_LDAP.STRING_COLLECTION;
    temp_dn VARCHAR2(512);
    temp_entry DBMS_LDAP.MESSAGE;
    entry_index PLS_INTEGER;
    v_string_table v_string_table_ty;
    i number:=1;
    m number:=1;
    v_user_session_id number;
    pragma autonomous_transaction;
    begin
    DBMS_LDAP.USE_EXCEPTION := TRUE;
    retval := -1;
    -- Initialize the LDAP session
    my_session := DBMS_LDAP.init(ldap_host,ldap_port);
    --Authenticate to the directory
    --retval :=DBMS_LDAP.simple_bind_s(my_session, 'uid=wayyen,ou=people,o=Enterprise Company,dc=smartchain','wayyen');
    retval :=DBMS_LDAP.simple_bind_s(my_session, '','');
    --res_attrs(1):='cn';
    retval := DBMS_LDAP.SEARCH_S(
    ld => my_session
    , base => base_dn
    , scope => DBMS_LDAP.SCOPE_SUBTREE
    , filter => username_filter
    , attrs => res_attrs
    , attronly => 0
    , res => res_message
    temp_entry := DBMS_LDAP.FIRST_ENTRY(my_session, res_message);
    temp_dn := DBMS_LDAP.GET_DN(my_session, temp_entry);
    -- dbms_output.put_line('User DN: '||temp_dn);
    retval :=DBMS_LDAP.simple_bind_s(my_session, TEMP_DN, p_password);
    res_attrs.delete;
    res_attrs(1):='*';
    retval := DBMS_LDAP.SEARCH_S(
    ld => my_session
    , base => base_dn
    , scope => DBMS_LDAP.SCOPE_SUBTREE
    , filter => replace(get_ldap_group_member_filter,'%M',temp_dn)
    , attrs => res_attrs
    , attronly => 0
    , res => res_message
    -- retval := DBMS_LDAP.COUNT_ENTRIES(my_session, res_message);
    -- DBMS_OUTPUT.PUT_LINE(
    -- RPAD('Number of Entries ', 25, ' ') || ': ' || TO_CHAR(retval)
    temp_entry := DBMS_LDAP.FIRST_ENTRY(my_session, res_message);
    entry_index := 1;
    while temp_entry is not null
    loop
    -- dbms_output.put_line('***Group DN**** '||DBMS_LDAP.get_dn(my_session, temp_entry));
    v_string_table(i):=DBMS_LDAP.get_dn(my_session, temp_entry);
    i := i + 1;
    temp_entry := DBMS_LDAP.NEXT_ENTRY(my_session, temp_entry);
    -- DBMS_OUTPUT.PUT_LINE('===================================================');
    entry_index := entry_index + 1;
    END LOOP;
    create_user_session(p_user_id, v_string_table, v_user_session_id);
    ldap_ctx_pkg.set_session_id(v_user_session_id, p_client_identifier);
    dbms_output.put_line('user_session_id: '||v_user_session_id);
    commit;
    retval := DBMS_LDAP.UNBIND_S(my_session);
    end login;
    ************ Procedure Code End*****************
    Web.config
    <appSettings>
    <!--<add key="BaseURLSite" value="http://localhost/SaviReportsWebSite"/>
    <add key="DataSource" value="SRIRAMA-D620"/>
    <add key="UID" value="sa"/>
    <add key="PWD" value="satyam"/>
    <add key="DatabaseName" value="Employee"/>-->
    <add key="BaseURLSite" value="http://localhost/SaviReportsWebSite"/>
    <add key="UID" value="rpt$928$syn"/>
    <add key="PWD" value="rpt$928$syn"/>
    <add key="Data Source" value="AURORA"/>
    <add key="ReportService2005WebService.ReportService2005" value="http://localhost/ReportServer/ReportService2005.asmx"/>
    </appSettings>
    Public Function check_Login(ByVal strLoginIDDesc As String, ByVal strPasswordDesc As String, ByVal strSessionIDDesc As String) As Boolean
    Dim strSQL As String
    'Dim dsHomePage As DataSet
    Dim OracleParam(2) As OracleParameter
    Dim blnStatus As Boolean = False
    Dim gStrConnection As String = Nothing
    gStrConnection = "Persist Security Info=False;"
    gStrConnection += "Integrated Security=False;"
    gStrConnection += "User ID=" + ConfigurationManager.AppSettings("UID") + ";"
    gStrConnection += "pwd=" + ConfigurationManager.AppSettings("PWD") + ";"
    gStrConnection += "Data Source=" + ConfigurationManager.AppSettings("Data Source")
    Dim OracleConnection1 As New OracleConnection(gStrConnection)
    Dim cmd As New OracleCommand
    Dim rowsAffected As Integer
    Dim index As Integer
    cmd.CommandText = "ldap_auth.login"
    cmd.CommandType = CommandType.StoredProcedure
    cmd.Connection = OracleConnection1
    OracleConnection1.Open()
    OracleParam(0) = New OracleParameter("LoginIDDesc", OracleType.LongVarChar)
    OracleParam(0).Direction = ParameterDirection.Input
    OracleParam(0).Value = strLoginIDDesc
    OracleParam(1) = New OracleParameter("PasswordDesc", OracleType.LongVarChar)
    OracleParam(1).Direction = ParameterDirection.Input
    OracleParam(1).Value = strPasswordDesc
    OracleParam(2) = New OracleParameter("SessionIDDesc", OracleType.LongVarChar)
    OracleParam(2).Direction = ParameterDirection.Input
    OracleParam(2).Value = strSessionIDDesc
    Dim UBound As Integer = OracleParam.Length
    For index = 0 To UBound - 1
    cmd.Parameters.Add(OracleParam(index))
    Next
    rowsAffected = cmd.ExecuteNonQuery()
    OracleConnection1.Close()
    If rowsAffected = -1 Then
    blnStatus = True
    End If
    Return blnStatus
    End Function
    Regards,
    SriRam.

    alter table tableName drop constraint constraintName ;
    You cannot drop an index being used to enforce uniqueness. You must drop the constraint - which will also drop the index. You also cannot drop a unique constraint being used as a reference of a foreign key. Adding the keyword CASCADE will allow you to get around that, but it will destroy the FK references.
    alter table tableName drop constraint constraintName CASCADE ;

  • Getting Error ORA-06550

    I am created a web service on top of complex type PL/SQL API, I am trying to test the service by passing all the parameters, but I am running into the following errorr
    i have checked all the APIS are valid only
    <?xml version="1.0" encoding="UTF-8"?>
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns0="http://srdemo/GetItemInstanceDetails.wsdl/types/"><env:Body><env:Fault><faultcode>env:Server</faultcode><faultstring>Internal Server Error (Caught exception while handling request: java.rmi.RemoteException: java.sql.SQLException: ORA-06550: line 1, column 61:
    PLS-00103: Encountered the symbol "$" when expecting one of the following:
    := . ( @ % ;
    The symbol ":= was inserted before "$" to continue.
    )</faultstring></env:Fault></env:Body></env:Envelope>
    Can any one please let me know, whats the easy way of debugging the service, while we run into the issues

    I know it's possible to debug PL/SQL code using SQL*Developer or JDeveloper. See e.g. http://www.oracle.com/technology/obe/sqldev/plsql_debug/plsql_debug.htm.
    I would first check the SOAP message that is sent to the web service. You can use the OC4J Enterprise Manager for that. It has a web service test page in which you can fill in a HTML form. You can then select to see the SOAP message that's going to be sent to the web service.
    Also print out the incoming parameters in the first line of the PL/SQL code that is being invoked by the web service (or debug it). At least then you know whether it's a fault in the PL/SQL code or whether the incoming SOAP message contains input errors, or whether the SOAP message is wrongly parsed by the generated web service code.
    Regards, Ronald

  • Error ORA-06550

    Declare fromrang number;
    torang number;
    BEGIN
    fromrang :=1;
    torang :=5;
    SELECT * FROM (select Col1,col2,col3,col4,
    row_number() over (order by 4 desc) rnum
    from mytable)
    where rnum >= fromrang and rnum <= fromrang;
    END;
    Error report:
    ORA-06550: line 6, column 1:
    PLS-00428: an INTO clause is expected in this SELECT statement
    06550. 00000 - "line %s, column %s:\n%s"
    *Cause:    Usually a PL/SQL compilation error.
    *Action:
    What is the wrong in the above string why i need to pass into casual here.
    Thanks!

    jeneesh wrote:
    I just googld for Java Pagination and saw This..
    Did you try googling?Jeneesh,
    In the above 'Googling' URL...
    http://www.google.co.in/search?hl=ml&source=hp&q=oracle+sql+pagination+java&gbv=2&oq=oracle+sql+pagination+java&gs_l=heirloom-hp.3..35i39.906.11047.0.11719.37.29.2.0.0.2.469.5143.2-12j4j2.18.0...0.0...1c.1.xXfEVUyZnuU&safe=activetry changing the hl=ml to hl=en
    http://www.google.co.in/search?hl=en&source=hp&q=oracle+sql+pagination+java&gbv=2&oq=oracle+sql+pagination+java&gs_l=heirloom-hp.3..35i39.906.11047.0.11719.37.29.2.0.0.2.469.5143.2-12j4j2.18.0...0.0...1c.1.xXfEVUyZnuU&safe=activeI guess...
    ml = 'Malayalam' a Palindrome
    en = 'English'
    B-)

  • Need help for error ORA-06550

    0 down vote favorite
    Can any body please help I am getting below error for the code.
    ORA-06550: line 20, column 33:
    PLS-00306: wrong number or types of arguments in call to '||'
    ORA-06550: line 20, column 12:
    PL/SQL: Statement ignored
    ...condition1: if I put value explicitly in my parametrize cursor then it is not reaching till 2nd FOR loop. and after printing 'Inside' statement is executed. Condition2. If I put variable as parameter then it is giving above mentioned error.
    DECLARE
    /* First cursor */
    CURSOR get_tables IS
    SELECT DISTINCT * FROM src_table_list tbl ;
    /* Second cursor */
    CURSOR get_columns(v_table_name varchar2) IS
    SELECT SUBSTR (SYS_CONNECT_BY_PATH (column_name, ','), 2) csv
    FROM (SELECT column_name , ROW_NUMBER () OVER (ORDER BY column_name ) rn,
    COUNT (*) OVER () cnt
    FROM USER_TAB_COLUMNS where table_name = v_table_name)
    WHERE rn = cnt
    -- and col.sn = v_sn
    START WITH rn = 1
    CONNECT BY rn = PRIOR rn + 1;
    BEGIN
    FOR i IN get_tables LOOP
    dbms_output.put_line( 'Inside ' );
    FOR j IN get_columns(i.table_name) LOOP
    dbms_output.put_line('SELECT '|| j ||'FROM'||i.table_name||' ;' );
    dbms_output.put_line( ' ' );
    END LOOP;
    END LOOP;
    END;
    /

    Hi,
    j is a cursor and you need to specify the column name <b>j.csv</b>
    Also you need to add space before and after literal 'FROM':
             DBMS_OUTPUT.put_line ('SELECT ' || j.csv || ' FROM ' || i.table_name || ' ;');Please read SQL and PL/SQL FAQ
    When you put some code please enclose it between two lines starting with {noformat}{noformat}
    i.e.:
    {noformat}{noformat}
    SELECT ...
    {noformat}{noformat}
    Regards.
    Al
    Edited by: Alberto Faenza on Dec 1, 2012 4:27 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Maybe you are looking for