Re: ISQL "LOAD FROM" command
Posted in 1994
On Mon, 25 Apr 1994 davidn@geis.geis.com wrote:
>
>
>
> > is there any bug known with the above command when loading larger tables?
> > I just tried to load about 75000 records which i unloaded prevoiusly with
> > the"UNLOAD TO" command.
>
> > ISQL reports a syntax error in the load file after about 55000 records.
> > But everything seems to be ok and i had no problems to load all records
> > with dbload.
>
> > Environment: Online 5.0, ISQL 4.1 on a Siemens RM400
>
>
> Check the LOCKS parameter in your tbconfig file. Then do a "tbstat -u" and
> see how many locks the tbload process is holding. You might be running out
> of locks. If that's the case, then increase your locks. (check the OnLine
> message file also for a "lock table overflow" situation). tbload has a
> "feature" where it does row-level locking on a table that it's trying to
> load. Also, if you are loading a table which contains BLOBS, tbload locks
> BLOBpages as well. Since OnLine is limited to only 256,000 locks, there is
> a limitation on how big a table you can tbload with it.
>
> ##############################################################
> David Nguyen Internet: davidn@geis.geis.com
> GE Information Services UUCP: uunet!ge!davidn
> 401 North Washington Street Voice: 1-301-340-5461
> Rockville, MD 20850 USA
> ##############################################################
>
>
As people have already said, you are probably exceeding the number of
available locks or running into a long transaction.
If you are exceeding the number of locks, an alternative to Davids
suggestion is to first lock the table and then load the data as follows :
~sql~example~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
begin work;
lock table <table name> in exclusive mode;
load from <file> insert into <table name>;
commit work;
~end~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This will only generate one lock event (the lock on the table). This is
applicable to isql and 4gl. This method will also save you from having
to up the number of available locks on your OnLine instance.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Mark Lansley <mark@dsl.com> | "Whoa!....Maybe I'll just pass
Druid Systems Ltd, UK | on my usual barking frenzy."
+44 932 571212 (Vce) 571552 (Fax) |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~