SQLULDR2 can compress the output file in GZIP format

Links: http://www.dbatools.net/mytools/sqluldr2-compress.html

    Data compress can save a lot of storage for data archiving, GZIP is a good choise between the compress ratio and compress speed, many utilities support GZIP feature, such as rsync with "-z" option. I spent some days on the APIs of zlib module, and finally integrited it into SQLULDR2, so SQLULDR2 can generate the compress file directly, just suffix the output file with ".gz" as following example.

D:\OracleClient>sqluldr2zip parfile=testpar.txt file=a.txt.gz
      0 rows exported at 2009-04-16 17:48:09
      50 rows exported at 2009-04-16 17:48:09
        output file a.txt.gz closed at 50 rows.

    This is just a feature test, I can extract it with WinZip and gunzip utilities.

D:\OracleClient>dir a.txt.*
2009-04-16  09:48            1,589 a.txt
2009-04-16  17:48              704 a.txt.gz

    Of cause you can compress the output with pipe and OS utility.

sqluldr2 ... file=- | gzip > a.txt.gz

    I did a performance test between uncompress and compress modes.

D:\>sqluldr2zip parfile=testpar.txt key=sqluldr.key
      0 rows exported at 2009-04-16 19:04:13
1000000 rows exported at 2009-04-16 19:04:19
2000000 rows exported at 2009-04-16 19:04:25
3000000 rows exported at 2009-04-16 19:04:32
3670086 rows exported at 2009-04-16 19:04:37
        output file uldrdata.txt closed at 3670086 rows.

D:\>sqluldr2zip parfile=testpar.txt key=sqluldr.key file=uldrdata.txt.gz
      0 rows exported at 2009-04-16 19:04:45
1000000 rows exported at 2009-04-16 19:04:51
2000000 rows exported at 2009-04-16 19:04:58
3000000 rows exported at 2009-04-16 19:05:04
3670086 rows exported at 2009-04-16 19:05:09
        output file uldrdata.txt.gz closed at 3670086 rows.

D:\>dir uldr*.*
2009-04-16 19:04 198,971,091 uldrdata.txt
2009-04-16 19:05 1,270,269 uldrdata.txt.gz

    It's time to archive history data with SQLULDR2 utility.

« Previous | Main | Next »

Powered by
Movable Type 5.01