Re: How to load table without log
Posted in 1997
Topics: Backup & Restore, Server Administration, Logging & Checkpoints, Platform-Specific Issues
>Adam Sorati wrote:
>>
>> Eng: online 7.23.UC1
>> OS: AIX 2.4.1
>> HW: 1x166Mhz CPU, 128MG RAM and 2x4.5GIG disk.
>> DB: 1.3 GIG
>>
>> Could someone please advise me of the best way to load
>> a table without using the logical log. I am getting a long
>> transaction error and the logical log is currently very large,
>> 360 MG for a 1.3 GIG DB.
Adam:
DBLoad can load data while committing rows in groups of, say 100 at a time.
If you're building indexes at the same time it might help to first sort the
load data by the value in your most unique index (and hence the largest
number of data pages). Although this still uses the log, it avoids the long
transaction timeout.
As for turning the database logging status off and then back on, I cheat by
changing TAPEDEV to NUL before turning logging back on. Then, ontape -s -B
databasename will be backed up to nul if no time, and the logging status
switched back on. I do this so often that I've created a command script to
yank out TAPEDEV, switch it to nul, perform an ontape and then fix the
ONCONFIG again. It's saved me hours of switching the DB logging status
without requiring an archive to tape when I know it's unnecessary. I think
Informix finally provided a similar workaround this inconvenience in 7.22.
However, this is not the technique for production databases. Try DBLoad
first.
Michael
mporemba@moscom.com