ORA-01044: size of buffer bound to variable exceeds maximum

Hello Oracle Gurus,
I have a tricky problem.
I have a stored procedure which has to retun more than 100,000 records. In my stored procedure, I have "TABLE OF VARCHAR2(512) INDEX BY BINARY_INTEGER". It fails when I try to get 80,000 records.
I get an error "ORA-01044: size 40960000 of buffer bound to variable exceeds maximum 33554432"
A simple calculation shows that 512*80000=40960000.
Oracle help suggests to reduce buffer size (i.e., number of records being returned or size of variable).
But, reducing the number of records returned or reducing the size of variable is not possible because of our product design constraints.
Are there any other options like changing some database startup parameters to solve this problem?
Thanks,
Sridhar

We are migrating an application running on Oracle 8i to 9i and found the same problem with some of the stored procedures.
Our setup:
+ Oracle 9.2.0.3.0
+ VB6 Application using OLEDB for Oracle ...
+ MDAC 2.8 msdaora.dll - 2.80.1022.0 (srv03_rtm.030324-2048)
I am calling a stored procedure from VB like this one:
{? = call trev.p_planung.GET_ALL_KONTEN(?,?,{resultset 3611, l_konto_id, l_name,l_ro_id, l_beschreibung, l_typ, l_plg_id})}
If setting the parameter "resultset" beyond a certain limit, I will eventually get this ORA-01044 error. This even happens, if the returned number of records is smaller than what supplied in the resultset parameter (I manually set the "resultset" param in the stored procedure string). E.g.:
resultset = 1000 -> ORA-06513: PL/SQL: Index der PL/SQL-Tabelle ungültig für Language-Array vom Host
resultset = 2000 -> OK (actual return: 1043 Recordsets)
resultset = 3000 -> ORA-01044: Größe 6000000 des Puffers für Variable überschreitet Höchstwert von 4194304
resultset = 3500 -> ORA-01044: Größe 7000000 des Puffers für Variable überschreitet Höchstwert von 4194304
... therefore one record is calculated here 7000000/3500=2000 bytes.
In Oracle 8i we never had this problem. As this is a huge application using a lot stored procedures, changing all "select" stored procedures to "get data by chunks" (suggestet in some forum threads in OTN) ist not an option.
Interesting: I can call the stored procedure above with the same parameters as given in VB from e.g. Quest SQL Navigator or sql plus successfully and retrieve all data!
Is there any other known solution to this problem in Oracle 9i? Is it possible to increase the maximum buffer size (Oracle documentation: ORA-01044 ... Action: Reduce the buffer size.)? What buffer size is meant here - which part in the communication chain supplies this buffer?
Any help highly appreciated!
Sincerely,
Sven Bombach

Similar Messages

  • Strange ORA-01044 error

    Hi Guys,
    I'm getting a very strange ORA-01044 error:
    Oracle.DataAccess.Client.OracleException ORA-01044: size 87160000 of buffer bound to variable exceeds maximum 288212783965667328    at Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx pOpoSqlValCtx, Object src, String procedure)*
    at Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode, OracleConnection conn, String procedure, IntPtr opsErrCtx, OpoSqlValCtx pOpoSqlValCtx, Object src)*
    at Oracle.DataAccess.Client.OracleCommand.ExecuteNonQuery()
    As you can see, the buffer size does not exceed the maximum stated, yet it is still causing an exception.
    Some background.. A new parameter has been added to a stored proc that was originally working fine, this new parameter is an associative array of numbers.
    On the ODP.Net side, I create a parameter that has a collection type of "*PLSQLAssociativeArray*" and Oracle DB Type of "*Int32*".
    Any ideas as to what might be causing this problem?

    Hi,
    What db version?
    There is an older bug where this error would be raised if the requested buffer size exceeded the granule size of the SGA. That was from the 9.2 timeframe as I recall.
    Regards,
    Mark

  • ORA-27067: size of I/O buffer is invalid

    Hi Experts,
    Today we have faced the below error in our ASM instance alert log file.. the day before we have moved one schema datafiles from one location to another another location ..and it is successfuly and the schema is accessble and verified ... we are not understaiding why exactly we got that error.
    error :"ORA-27067: size of I/O buffer is invalid"
    below is the alert log error.
    Thu Jan 02 05:43:26 2014
    NOTE: client +ASM:+ASM registered, osid 827, mbr 0x0
    Thu Jan 02 05:46:39 2014
    Errors in file /home/oracle/app/oracle/diag/asm/+asm/+ASM/trace/+ASM_ora_1188.trc:
    ORA-27067: size of I/O buffer is invalid
    Additional information: 2
    Thu Jan 02 05:48:59 2014
    NOTE: ASMB process exiting due to lack of ASM file activity for 302 seconds
    Thu Jan 02 06:45:58 2014
    Starting background process ASMB
    Thu Jan 02 06:45:58 2014
    ASMB started with pid=22, OS id=9021
    Thu Jan 02 06:45:58 2014
    NOTE: client +ASM:+ASM registered, osid 9023, mbr 0x0
    Thu Jan 02 06:47:06 2014
    Thanks...

    Are you trying to install a seeded database from a preconfigured template? If yes, there's a bug with such a configuration, if the seeded files are read-only.
    Here the statement from Oracle:
    Bug 3996124 Abstract: RMAN CANNOT RESTORE BACKUPSET ON READONLY MEDIA
    Bug 2835956 Abstract: RMAN CANNOT RESTORE FROM READ-ONLY BACKUPS
    When DBCA creates a database from a template, it uses RMAN on the seeded files Seed_Database.ctl
    and Seed_Database.dfb
    The bug is that RMAN cannot restore a file that is read only.
    Since the files Seed_Database.ctl Seed_Database.dfb are not read/write, DBCA gives the error.
    Solution
    To implement the solution, please execute the following steps:
    1. Change the file permissions to 644 on the files.
    2. Run the installation again.

  • ORA-06502 character string buffer too small, works in query not procedure

    The following query works prefect as a single query:
    with t as (select steroid_start_date as the_date from treatments where patientid = 1378 and visitnumber = 0)
        select max(case when instr(mon, '/') > 0 then NULL else mon end) mon,
             max(case when instr(yr, '/') > 0 then NULL else yr end) yr
      from ( select the_date, substr(the_date, nvl(last_pos,1), pos-1) mon, substr(the_date, pos+1) yr
              from ( select t.*,
                               instr(the_date, '/', 1, lvl) pos,
                            lag(instr(the_date, '/', 1, lvl))
                                over (
                                        partition by the_date
                                        order by instr(the_date, '/', 1, lvl)
                                     ) last_pos
                     from t, (
                                select 1 lvl
                                from dual
                                UNION ALL
                                select 2 lvl
                                from dual
                             ) b
                      where instr(the_date, '/', 1, lvl) > 0
          );I have a procedure contains:
    CREATE OR REPLACE PROCEDURE update_steroid_start_date(patid number, visit number)
    IS
        mon varchar2(3);
        yr varchar2(3);
    date1 varchar2(12);
    insert_date varchar2(12);
    BEGIN
        select steroid_start_date into date1 from treatments where patientid = patid and visitnumber = visit;
        with t as (select date1 the_date from dual)
        select max(case when instr(mon, '/') > 0 then NULL else mon end),
             max(case when instr(yr, '/') > 0 then NULL else yr end) into mon, yr
      from ( select the_date, substr(the_date, nvl(last_pos,1), pos-1) mon, substr(the_date, pos+1) yr
              from ( select t.*,
                               instr(the_date, '/', 1, lvl) pos,
                            lag(instr(the_date, '/', 1, lvl))
                                over (
                                        partition by the_date
                                        order by instr(the_date, '/', 1, lvl)
                                     ) last_pos
                     from t, (
                                select 1 lvl
                                from dual
                                UNION ALL
                                select 2 lvl
                                from dual
                             ) b
                      where instr(the_date, '/', 1, lvl) > 0
          );when I try to execute this procedure, I am getting ORA-06502 character string buffer too smal on the line
    with t as (select date1 the_date from dual)why is that? I am trying to break user input 1/2000, sometimes junk (1/ , /2000), and apply some logic so they will be 01/01/2000, NULL, 01/01/2000
    Edited by: OracleNoob on Feb 17, 2009 10:58 AM

    Hi,
    That error occurs when the variables that are being set are too short to hold the entire value being selected.
    Either make the variables longer, or the columns shorter.
    If you need mnore help, post
    (1) The version of Oracle (and any other relevant software) you're using
    (2) A little sample data (just enough to show what the problem is) from all the relevant tables
    (3) The results you want from that data
    (4) Your formatted code
    (5) The full error message(s), including line number
    Executable SQL statements (like "CREATE TABLE AS ..." or "INSERT ..." statements) are best for (2).
    Formatted tabular output is okay for (3) and essential for (4). Type {code} before and after the tabular text, to preserve spacing.

  • "ORA-01144: File size (7680000 blocks) exceeds maximum of 4194303 blocks.

    Hi Team,
    While increasing the tablespace i am getting below error. How to handle this any one please suggest.
    SQL> set lin 300
    SQL> col TABLESPACE_NAME for a25
    SQL> col FILE_NAME for a65
    SQL> select TABLESPACE_NAME,FILE_ID,FILE_NAME,AUTOEXTENSIBLE,sum(BYTES/1024/1024) MB
    2 from dba_data_files where TABLESPACE_NAME='SYSAUX' group by TABLESPACE_NAME,FILE_ID,FILE_NAME,AUTOEXTENSIBLE order by sum(BYTES/1024/1024) DESC,file_name;
    TABLESPACE_NAME FILE_ID FILE_NAME AUT MB
    SYSAUX 3 /ora2/oradata/dbname/sysaux_01.dbf NO 300
    SQL> Alter database datafile 3 RESIZE 60000M;
    Alter database datafile 3 RESIZE 60000M
    ERROR at line 1:
    ORA-01144: File size (7680000 blocks) exceeds maximum of 4194303 blocks
    Regards,

    941829 wrote:
    Hi Team,
    While increasing the tablespace i am getting below error. How to handle this any one please suggest.
    SQL> set lin 300
    SQL> col TABLESPACE_NAME for a25
    SQL> col FILE_NAME for a65
    SQL> select TABLESPACE_NAME,FILE_ID,FILE_NAME,AUTOEXTENSIBLE,sum(BYTES/1024/1024) MB
    2 from dba_data_files where TABLESPACE_NAME='SYSAUX' group by TABLESPACE_NAME,FILE_ID,FILE_NAME,AUTOEXTENSIBLE order by sum(BYTES/1024/1024) DESC,file_name;
    TABLESPACE_NAME FILE_ID FILE_NAME AUT MB
    SYSAUX 3 /ora2/oradata/dbname/sysaux_01.dbf NO 300
    SQL> Alter database datafile 3 RESIZE 60000M;
    Alter database datafile 3 RESIZE 60000M
    ERROR at line 1:
    ORA-01144: File size (7680000 blocks) exceeds maximum of 4194303 blocks
    Regards,You must know that its really important to mention your db version and other details so that we can answer in a more proper manner. Since you haven't mentioned your db size and block size so here is a generic reply. If you are using 8kb Blocksize,you should be able to go till 32gb of one file(8192*4194303/1024/1024=>32G). So your solution would be to either go for a different file or use Big File(if you are on 10g and above) .
    HTH
    Aman....

  • ORA-01144: File size (4194304 blocks) exceeds maximum of 4194303 blocks

    Hello all,
    Wen i try to add new datafile(32GB) to tablespace i found the below error. I have space available in my disk, why i am not able to add new datafile to tablespace?
    ERROR at line 1:
    ORA-01144: File size (4194304 blocks) exceeds maximum of 4194303 blocks
    here is my db_block_size information:
    NAME TYPE VALUE
    db_block_size integer 8192
    How can i add new datafile with out any issues.
    Regards,
    RHK

    Thanks,
    I minimise the size, now i am able to add new datafile.
    From long time back i am getting below error,
    ORA-1653: unable to extend table PQB_ADMIN.RPT_TR by 128 in tablespace USERS
    ORA-1653: unable to extend table PQB_ADMIN.RPT_TR by 8192 in tablespace USERS
    to avoid this error i added new datafile. Now the data will sync automatically? (it may be nearly 2 months data)
    Regards,
    RHK

  • ORA-13019: coordinates out of bounds (9i only, not 8.1.7)

    hi there,
    In my application, I face an error when using a 9i DB
    that I didn't have in 8.1.6 or 8.1.7. The error is the following:
    ORA-29902: error in executing ODCIIndexStart() routine
    ORA-13213: failed to generate spatial index for window object
    ORA-13019: coordinates out of bounds
    ORA-06512: at "MDSYS.SDO_INDEX_METHOD_9I", line 232
    ORA-06512: at line 1
    My feeling is that Spatial generates this error when I post an
    sdo_filter query that is near the frontiers of my layer's real
    extent (not the extent in USER_SDO_GEOM_METADATA that I have
    grown in order to avoid the error, without success).
    any idea ?
    Thanks in advance,
    Ali

    As far as I don't have any SRID, I guess Spatial in 9i consider that
    I'm in the case of a geodetic layer right ? No. If you have no SRID in user_sdo_geom_metadata and no SDO_SRID
    set in the geometry, then Oracle Spatial will assume you are in cartesian space.
    Is there any limit like this if I use an SRID ? The only time there is a limit is when you use a geodetic SRID. Then the bounds
    of the coordinate system have to be -180, 180 and -90, 90
    I guess the only solution I have in the case of geodetic layers
    is to change my queries in order to fit -180 180 -90 90, right ? If you are using geodetic layers then the bounds are -180, 180 and -90, 90.
    That would be the correct way to use this layer if in fact the data is geodetic.
    If it isn't geodetic, then you could adjust the bounds of the coordinate system
    in user_sdo_geom_metadata. If you do that and have a quadtree index you
    will need to reindex the data.
    If you are using 9i, you should seriously consider using r-tree indexes (especially
    if you've applied patch set 9.0.1.3). There are very few cases where r-trees aren't
    at least as performant as quadtrees, and also use of r-tree indexes gets you use
    of additional functionality that isn't available with quadtrees (like geodetic indexing
    and use of sdo_batch_size with nearest neighbor queries for incremental nearest
    neighbor processing).
    Hope this helps,
    Dan
    thanks a lot in advance,
    ALI

  • IOncrease size of buffer pool and PGA

    Dear All,
    Currently my DB is on Automatic Memory Management,
    I want to increase the size of Buffer cache and PGA, so do I need to move the DB out of Automatic Memory Managemen and manually manage the memory?
    Please help
    Thanks

    Wrong forum. This is for SQL and PL/SQL questions.
    Try General Database Discussions

  • ORA-13019: coordinates out of bounds

    Hi, I have the follow problem when I try to insert a shape with many coordinates in a shape column of a table:
    SQLException: insert strokeORA-29875: failed in the execution of the ODCIINDEXINSERT routine
    ORA-13019: coordinates out of bounds
    ORA-06512: at "MDSYS.SDO_IDX", line 161
    ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 332
    I haven't the problem when I don't create the index with parameters sdo_numtiles and sdo_level.
    Can anyone help me?

    Oracle recommends that people use R-tree indexes in Oracle versions higher than 9i. In your 10g instance, R-tree indexes should (in almost every situation) have as good or better performance characteristics as the quadtree indexed you are trying to use.
    Oracle has gone so far as to remove quadtree indexing information from the standard documentation, because quadtree indexes require in-depth knowledge and understanding in order to tune and use them properly.
    In your case, you've set the bounds in your user_sdo_geom_metadata too small - the bounds do not encompass the data in your data set. This is only an issue for quadtree indexes, so you will not get this error when creating an R-tree index.
    There are many other potential issues when using quadtree indexes as well. While quadtree indexes work and perform well, R-tree indexes work as well or better, with almost none of the learning curve. If you want to continue using quadtree indexes, i'd suggest you do a detailed reading of the quadtree indexing manual.

  • ORA – 06512: Character String Buffer Too Small.

    hi..
    when i'm call the Stored Procedure from php i'm getting this error
    ORA – 06512: Character String Buffer Too Small.
    but its working fine via pl/sql block in sqlplus
    CREATE OR REPLACE procedure sp_RecurringDetails(v_p in out pmxpackage.gen ,v_pmCount in out number, v_pmResult in out number) is
    v_Stmt varchar2(4000);
    v_stmtcount varchar2(4000);
    begin
    v_Stmt:= 'SELECT orders.ord_id, sub.smt_id, sub.smt_date,
    MEMBER.mem_fname,
         MEMBER.mem_lname,
         sub.smt_amount,
         sub.smt_qty,
    sub.smt_pv
         FROM MEMBER MEMBER,
         orders orders,
         sub_monthly_track sub
    WHERE ( (MEMBER.mem_id = orders.ord_memid)
    AND (MEMBER.mem_id = sub.smt_mem_id)
              AND ORDERS.ORD_RECURRING=2
              and member.MEM_DEL_STATUS=''N''
              and smt_status=0
    union
    (SELECT orders.ord_id, null,null,
    MEMBER.mem_fname,
         MEMBER.mem_lname,
         null,
         null,
    null
         FROM MEMBER MEMBER,
         orders orders
    where
    MEMBER.mem_id = orders.ord_memid
    and
    orders.ORD_RECURRINGID=2
    and orders.ord_status=''f'') order by ord_id     ';
              v_stmtcount:='select count(*) from ('||v_stmt||')';
    if (v_pmCount=-1) then
    dbms_output.put_line('');
              EXECUTE IMMEDIATE ' set serveroutput on';
              EXECUTE IMMEDIATE v_stmtcount INTO v_pmCount;
    end if;
    open v_p for v_stmt ;
    v_pmResult:=1;
    exception
    when others then
    null;
    end;
    when i'm gettting Count from the Stored Procedure sp returns the error... other wise its working fine in php
    pls give the solution for this issue
    Thanks,
    Message was edited by:
    venkatraman.L

    Tx for ur Response
    I didnt get any log when i excute this..... But it is woking fine in pl/sql Block .. But when i call from PHP page it Gives the Error
    Re: ORA – 06512: Character String Buffer Too Small.
    CREATE OR REPLACE procedure sp_RecurringDetails(v_p in out pmxpackage.gen ,v_pmCount in out Integer, v_pmResult in out Integer) is
    v_Stmt varchar2(4000);
    v_stmtcount varchar2(4000);
    v_ErrMsg varchar(1000);
    v_Errorcode number;
    begin
    v_ErrMsg:='Data--'||'Param1 is Cursor'||'--' ||Pmxpackage.Fun_Param(v_pmCount,'Param2 is null')||'--' ||Pmxpackage.Fun_Param(v_pmResult,'Param3 is null');
         IF v_pmCount IS NULL OR v_pmResult IS NULL THEN
         Pmxpackage.sp_pmxerrorlog(v_ErrMsg,'sp_RecurringDetails');
              v_pmResult:=0;
              dbms_output.put_line('nulld is ');
              RETURN ;
         END IF;
    v_Stmt:= 'SELECT orders.ord_id, sub.smt_id, sub.smt_date,
    MEMBER.mem_fname,
         MEMBER.mem_lname,
         sub.smt_amount,
         sub.smt_qty,
    sub.smt_pv
         FROM MEMBER MEMBER,
         orders orders,
         sub_monthly_track sub
    WHERE ( (MEMBER.mem_id = orders.ord_memid)
    AND (MEMBER.mem_id = sub.smt_mem_id)
              AND ORDERS.ORD_RECURRING=2
              and member.MEM_DEL_STATUS=''N''
              and smt_status=0
    union
    (SELECT orders.ord_id, null,null,
    MEMBER.mem_fname,
         MEMBER.mem_lname,
         null,
         null,
    null
         FROM MEMBER MEMBER,
         orders orders
    where
    MEMBER.mem_id = orders.ord_memid
    and
    orders.ORD_RECURRINGID=2
    and orders.ord_status=''f'') order by ord_id     ';
              v_stmtcount:='select count(*) from ('||v_stmt||')';
    if (v_pmCount=-1) then
    dbms_output.put_line('');
              EXECUTE IMMEDIATE ' set serveroutput on';
              EXECUTE IMMEDIATE v_stmtcount INTO v_pmCount;
    end if;
    open v_p for v_stmt ;
    v_pmResult:=1;
    EXCEPTION
         WHEN OTHERS THEN
              v_pmResult:=0;
              v_Errorcode:=SQLCODE;
              Pmxpackage.Sp_Pmxerrorlog(v_Errorcode,' sp_RecurringDetails',v_ErrMsg);
    end;

  • ORA-06502 character string buffer too small “  error

    We trying to insert a string of more then 500 character from our VB.net application (uses ODP.net), it’s giving “ORA-06502 character string buffer too small “ error.
    Kindly help us on this.
    OS version: AIX 5.1 (IBM/AIX RISC System/6000)
    Oracle Database version: 9.2.0.1.0

    Just for reference and to close the loop, I found the fix to this problem (quite by accident).
    The problem turned out to be a bug in the apex listener, which in some cases ended up doing a divide by zero, which caused the problem.
    This is listed as a known bug, and a fixed listener is available.
    Once I installed the fixed listener, problem solved!

  • ORA-01001: not all veriables bound

    Hi,
    I am calling stored procedure from java. I have registered all OUT parameters and set all IN parameters, also INOUT parameters are taken care of....
    I am getting this exception from database..
    ORA-01001: not all verialbes bound
    does anybody know what this means ?? or where I can find out some documentation which explains about this error ?
    -Thanks

    I found a different description for ORA-01001:
    ORA-01001 invalid cursor
    Cause: Either a host language program call specified an invalid cursor or the values of the AREASIZE and MAXOPENCURSORS options in the precompiler command were too small. All cursors must be opened using the OOPEN call before being referenced in any of the following calls: SQL, DESCRIBE, NAME, DEFINE, BIND, EXEC, FETCH, and CLOSE. The Logon Data Area (LDA) must be defined by using OLON or OLOGON. If the LDA is not defined, this message is issued for the following calls: OPEN, COM, CON, ROL, and LOGOFF.
    Action: Check the erroneous call statement. Specify a correct LDA area or open the cursor as required. If there is no problem with the cursor, it may be necessary to increase the AREASIZE and MAXOPENCURSORS options before precompiling.
    Jamie

  • ORA-20001: Unauthorized access (security group package variable not set).

    I'm creating an app that uses APEX authentication and features self-registration (working) and forgot password (not working) forms.
    My forgot password is public (requires no authentication). The user provides username and secret answer, which are validated, then provides the new password. I attempt to use htmldb_util.reset_pw to reset the user's password, but it's not working.
    I have a process on the new password page calling a PL/SQL anonymous block that looks like this (see below), where P16_ITEM1 = username and P18_ITEM1 = new password.
    BEGIN
    apex_040000.htmldb_util.reset_pw( V('P16_ITEM1'), V('P18_ITEM1') );
    END;
    I also don't know how to send accurate success/failure messages from such PL/SQL block back to APEX, but that's a separate issue I guess.
    Anyway, when testing via SQL Developer as the user with APEX_ADMINISTRATOR_ROLE, I get the following error:
    ORA-20001: Unauthorized access (security group package variable not set).
    ORA-06512: at "APEX_040000.WWV_FLOW_FND_USER_API", line 22
    ORA-06512: at "APEX_040000.WWV_FLOW_FND_USER_API", line 1220
    ORA-06512: at "APEX_040000.HTMLDB_UTIL", line 1253
    ORA-06512: at line 8
    I've searched previous threads and tried different suggestions with no luck.
    I'm on Oracle DB XE 11g and APEX 4.x.
    Any help will be appreciated. Thanks,
    Alex.

    Anyway, when testing via SQL Developer as the user with APEX_ADMINISTRATOR_ROLE, I get the following error:
    ORA-20001: Unauthorized access (security group package variable not set).When running code outside Apex that depends on the Apex security group being set, run the following before your own code:
    wwv_flow_api.set_security_group_id(apex_util.find_security_group_id('YOUR_SCHEMA_NAME'));Google "wwv_flow_api.set_security_group_id" for more details, such as this blog post:
    http://www.easyapex.com/index.php?p=502
    - Morten
    http://ora-00001.blogspot.com

  • DBIF_RSQL_INVALID_RSQL The maximum size of an SQL statement was exceeded

    Dear,
    I would appreciate a helping hand
    I have a problem with a dump I could not find any note that I can help solve the problem.
    A dump is appearing at various consultants which indicates the following.
    >>> SELECT * FROM KNA1                     "client specified
    559                  APPENDING TABLE IKNA1
    560                  UP TO RSEUMOD-TBMAXSEL ROWS BYPASSING BUFFER
    ST22
    What happened?
        Error in the ABAP Application Program
        The current ABAP program "/1BCDWB/DBKNA1" had to be terminated because it has
        come across a statement that unfortunately cannot be executed.
    Error analysis
        An exception occurred that is explained in detail below.
        The exception, which is assigned to class 'CX_SY_OPEN_SQL_DB', was not caught
         and
        therefore caused a runtime error.
        The reason for the exception is:
        The SQL statement generated from the SAP Open SQL statement violates a
        restriction imposed by the underlying database system of the ABAP
        system.
        Possible error causes:
         o The maximum size of an SQL statement was exceeded.
         o The statement contains too many input variables.
         o The input data requires more space than is available.
         o ...
        You can generally find details in the system log (SM21) and in the
        developer trace of the relevant work process (ST11).
        In the case of an error, current restrictions are frequently displayed
        in the developer trace.
    SQL sentence
    550     if not %_l_lines is initial.
    551       %_TAB2[] = %_tab2_field[].
    552     endif.
    553   endif.
    554 ENDIF.
    555 CASE ACTION.
    556   WHEN 'ANZE'.
    557 try.
    >>> SELECT * FROM KNA1                     "client specified
    559                  APPENDING TABLE IKNA1
    560                  UP TO RSEUMOD-TBMAXSEL ROWS BYPASSING BUFFER
    561    WHERE KUNNR IN I1
    562    AND   NAME1 IN I2
    563    AND   ANRED IN I3
    564    AND   ERDAT IN I4
    565    AND   ERNAM IN I5
    566    AND   KTOKD IN I6
    567    AND   STCD1 IN I7
    568    AND   VBUND IN I8
    569    AND   J_3GETYP IN I9
    570    AND   J_3GAGDUMI IN I10
    571    AND   KOKRS IN I11.
    572
    573   CATCH CX_SY_DYNAMIC_OSQL_SEMANTICS INTO xref.
    574     IF xref->kernel_errid = 'SAPSQL_ESCAPE_WITH_POOLTABLE'.
    575       message i412(mo).
    576       exit.
    577     ELSE.
    wp trace:
    D  *** ERROR => dySaveDataBindingValue: Abap-Field= >TEXT-SYS< not found [dypbdatab.c  510]
    D  *** ERROR => dySaveDataBindingEntry: dySaveDataBindingValue() Rc=-1 Reference= >TEXT-SYS< [dypbdatab.c  430]
    D  *** ERROR => dySaveDataBinding: dySaveDataBindingEntry() Rc= -1 Reference=>TEXT-SYS< [dypbdatab.c  137]
    Y  *** ERROR => dyPbSaveDataBindingForField: dySaveDataBinding() Rc= 1 [dypropbag.c  641]
    Y  *** ERROR => ... Dynpro-Field= >DISPLAY_SY_SUBRC_TEXT< [dypropbag.c  642]
    Y  *** ERROR => ... Dynpro= >SAPLSTPDA_CARRIER< >0700< [dypropbag.c  643]
    D  *** ERROR => dySaveDataBindingValue: Abap-Field= >TEXT-SYS< not found [dypbdatab.c  510]
    D  *** ERROR => dySaveDataBindingEntry: dySaveDataBindingValue() Rc=-1 Reference= >TEXT-SYS< [dypbdatab.c  430]
    D  *** ERROR => dySaveDataBinding: dySaveDataBindingEntry() Rc= -1 Reference=>TEXT-SYS< [dypbdatab.c  137]
    Y  *** ERROR => dyPbSaveDataBindingForField: dySaveDataBinding() Rc= 1 [dypropbag.c  641]
    Y  *** ERROR => ... Dynpro-Field= >DISPLAY_FREE_VAR_TEXT< [dypropbag.c  642]
    Y  *** ERROR => ... Dynpro= >SAPLSTPDA_CARRIER< >0700< [dypropbag.c  643]
    I thank you in advance
    If you require other information please request

    Hi,
    Under certain conditions, an Open SQL statement with range tables can be reformulated into a FOR ALL ENTRIES statement:
        DESCRIBE TABLE range_tab LINES lines.
        IF lines EQ 0.
          [SELECT for blank range_tab]
        ELSE.
          SELECT .. FOR ALL ENTRIES IN range_tab ..
          WHERE .. f EQ range_tab-LOW ...
          ENDSELECT.
        ENDF.
    Since FOR ALL ENTRIES statements are automatically converted in accordance with the database restrictions, this solution is always met by means of a choice if the following requirements are fulfilled:
    1. The statement operates on transparent tables, on database views or on a projection view on a transparent table.
    2. The requirement on the range table is not negated. Moreover, the range table only contains entries with range_tab-SIGN = 'I'
    and only one value ever occurs in the field range_tab OPTION.
    This value is then used as an operator with operand range_tab-LOW or range_tab-HIGH.In the above example, case 'EQ range_tab-LOW' was the typical case.
    3. Duplicates are removed from the result by FOR ALL ENTRIES.This must not falsify the desired result, that is, the previous Open SQL statement can be written as SELECT DISTINCT.
    For the reformulation, if the range table is empty it must be handled in a different way:with FOR ALL ENTRIES, all the records would be selected here while this applies for the original query only if the WHERE clause consisted of the 'f IN range_tab' condition.
    FOR ALL ENTRIES should also be used if the Open SQL statement contains several range tables.Then (probably) the most extensive of the range tables which fill the second condition is chosen as a FOR ALL ENTRIES table.
    OR
    What you could do in your code is,
    prior to querying;
    since your select options parameter is ultimately an internal range table,
    1. split the select-option values into a group of say 3000 based on your limit,
    2. run your query against each chunck of 3000 parameters,
    3. then put together the results of each chunk.
    For further reading, you might want to have a look at the Note# 13607 as the first suggestion is what I read from the note.

  • ORA-30951: Element or attribute at Xpath /AC//Doc[@] exceeds maximum length

    Hi All,
    I am trying to load the XML Files into a Table using the SQL Loader and i am getting the Error
    Record 1: Rejected - Error on table COMMONASSETCATALOG.
    ORA-30951: Element or attribute at Xpath /AC/T[1]/T[1]/T[1]/T[1]/T[1]/Doc[@] exceeds maximum length
    The <Doc> Element which is child of the <T> contains an XML Schema inside it..
    The Doc Element is declared in Schema as
    <xs:complexType name="AsDocType">
              <xs:annotation>
                   <xs:documentation>A (Doc)ument, a container for any type of file</xs:documentation>
              </xs:annotation>
              <xs:sequence minOccurs="0" maxOccurs="unbounded">
                   <xs:any namespace="##any" processContents="lax"/>
              </xs:sequence>
              <xs:attributeGroup ref="AsDocAtts"/>
         </xs:complexType>
    The Size of the XML Content that <Doc> Node has is around 34Kb.
    Could you pls let me know how to resolve this..
    Thanks
    Sateesh

    Hi All,
    I am trying to load the XML Files into a Table using the SQL Loader and i am getting the Error
    Record 1: Rejected - Error on table COMMONASSETCATALOG.
    ORA-30951: Element or attribute at Xpath /AC/T[1]/T[1]/T[1]/T[1]/T[1]/Doc[@] exceeds maximum length
    The <Doc> Element which is child of the <T> contains an XML Schema inside it..
    The Doc Element is declared in Schema as
    <xs:complexType name="AsDocType">
              <xs:annotation>
                   <xs:documentation>A (Doc)ument, a container for any type of file</xs:documentation>
              </xs:annotation>
              <xs:sequence minOccurs="0" maxOccurs="unbounded">
                   <xs:any namespace="##any" processContents="lax"/>
              </xs:sequence>
              <xs:attributeGroup ref="AsDocAtts"/>
         </xs:complexType>
    The Size of the XML Content that <Doc> Node has is around 34Kb.
    Could you pls let me know how to resolve this..
    Thanks
    Sateesh

Maybe you are looking for

  • Printing?

    This seems like it should be fairly simple to figure out, but I just cant do it. I want to print my iCal in list view, but only the days that have an event on them. It keeps showing every day in between. Im sure theres some way to fix this, I just ca

  • Document is not relevant for billing

    Dear All, We are implementing ECC 6 in one of our client. Our client manufacturer of x finished product, they want monitor the production process through Project system and deliver should be through project system, We did the complete configuration f

  • J2ME: can you clear the key pressed buffer on a cell?

    I am having trouble with keypressed. I am writing a cell phone game in MIDP 2.0. Basically its the standard GameCanvas setup, where you have a main game loop and it calls your input function. The input function then does: int keyStates = getKeyStates

  • Transferring photos/videos from Mac to PC...while preserving metadata

    In short, I need to move my media collection (music, movies, photos, etc) off from my macbook pro and on to my windows server (Win 7) due to hard drive space limitations. I'm afraid that if/when I transfer all of my media over to the NTFS storage dri

  • Connect ATV to an 16:9 analog TV with Component/RGB-Scart adapter

    Hi all. I will use an ATV on a older 16:9 analog TV. My TV has a Scart connector with RGB input. I will connect the ATV over a component cable with a component/RGB-Scart adapter. Is this possible or need i a new digital TV with dvi or component conne