Bulk Record Creation

rzr

Member
Hello All,

I'm trying to create bulk records via a script in my dev for testing another program. When i run my data creation script get the following error:

---------------------------
Error (Press HELP to view stack trace)
---------------------------
SYSTEM ERROR: Attempt to define too many indexes for area 6 database DBI1936a05408. (40) (14675)
---------------------------
OK Help
---------------------------

here's my script:


Code:
DEFINE VARIABLE iCount         AS INTEGER     NO-UNDO.
DEFINE VARIABLE iSeqNo         AS INTEGER     NO-UNDO.

{sequence.i}
ON CREATE OF MyTable OVERRIDE
DO:
END.

DO iCount = 1 TO 1000 :

        RUN IP_GetNxtSeq(OUTPUT iSeqNo). 
        CREATE MyTable.                        
            ASSIGN
               MyTable.Seqno                 = iSeqNo
               MyTable.CreateDate          = TODAY                  .
END.

got any ideas?
 

GregTomkins

Active Member
I looked at this for 5 minutes (standard tactic to delay doing real work). It's hard to say much without knowing the schema of MyTable and the contents of sequence.i.I don't recall seeing this error before though and the code looks reasonable. I don't think MyTable is a TT because it's not defined anywhere and IIRC you can't put triggers on TT's like that.
 

rstanciu

Member
of course, a bulkload can not have TEMP-TABLES ... may be the application has behide.
Try to give more memory to the client session -mmax 4096
 

rzr

Member
* as noted by Greg...MyTable is not a TT.
* MyTable has three fields, SeqNo, CreateDate and Description (this field is not used as of now) .
* MyTable is not a new table, it is an existing table.
* The output of IP_GetNxtSeq "iSeqNo" is a standard sequence created in Db, that we use for increments.
 

TomBascom

Curmudgeon
The error messages is complaining about too many indexes in the temp-table database -- "area 6 database DBI1936a05408".

So I suspect that temp-tables are being created somewhere.

One way that you can get this error is by dynamically creating lots of temp-tables and never deleting them.

"MyTable" seems an unlikely name for the real table. There are some interesting variations on CREATE that might behave in unexpected ways if the word that is really where "mytable" is is "table" (or some other things...)
 

rzr

Member
Mytable is not the *real* name.. but the table is a *real* table :)

Interesting that you mentioned the error's were abt TT's. I'm going to have a look at the include file used here... maybe it's doing something that I may have missed...Anyways for now, I got around that bug by rewriting the code to below...

Code:
[FONT=courier new]
DEFINE VARIABLE iCount AS INTEGER NO-UNDO.
DEFINE VARIABLE iSeqNo AS INTEGER NO-UNDO.

    {sequence.i}
    ON CREATE OF MyTable OVERRIDE
    DO:
    END.

    DO iCount = 1 TO 1000 :
         RUN P_CreateMyTable.
    END.

PROCEDURE P_CreatMyTable PRIVATE :
    RUN IP_GetNxtSeq(OUTPUT iSeqNo). 
    CREATE MyTable. 
    ASSIGN
        MyTable.Seqno = iSeqNo
        MyTable.CreateDate = TODAY .
END PROCEDURE.[/FONT]
 
Top