If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > load ... copy yes creates huge backup file

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-19-10, 15:48
MarkhamDBA MarkhamDBA is offline
Registered User
 
Join Date: Dec 2008
Location: Toronto, Canada
Posts: 381
load ... copy yes creates huge backup file

db2 v9.5 /aix 6.1
I am moving a table to another TS. so I create another table in new TS and load it
with COPY YES to /load_dir option. When I check the original (source) table size it is only 19MB:

select substr(t.tabschema,1,10)||’.’||substr(T.tabname,1, 20) as table
,char(date(T.stats_time)) as statsdate ,char(time(T.stats_time)) as statstime
,T.CARD as rows_per_tbl, decimal(float(T.npages)/(1024/(TS.pagesize/1024)),9,2) as used_mb
,decimal(float(T.fpages)/(1024/(TS.pagesize/1024)),9,2) as allocated_mb
from SYSCAT.TABLES T ,SYSCAT.TABLESPACES TS
where T.tbspace=TS.tbspace and T.tabname=’BV_AAA’ and T.TYPE=’T’”

TABLE STATSDATE STATSTIME ROWS_PER_TBL USED_MB ALLOCATED_MB
----------- ---------- --------- ------------ -------- ------------
DBA.BV_AAA 04/19/2010 15:28:01 135689 19.84 20.00

but load created a huge backup file for some reason (25GB):
25924329472 Apr 19 15:27 db_name.4.db2v9i1.NODE0000.CATN0000.20100419152500 .001

Is anything wrong here? It's not a problem with this table, but when I try
to do it with another table with 25 million rows in it, I run out of disk space because
LOAD...COPY YES creates a huge backup file (>630GB). Database has archival logging so
I have to use COPY YES option.

Thanks in advance
__________________
DB2 v9.5 ESE on AIX v6.1/ v9./10 on z/OS

Last edited by MarkhamDBA; 04-19-10 at 16:01.
Reply With Quote
  #2 (permalink)  
Old 04-19-10, 16:15
MarkhamDBA MarkhamDBA is offline
Registered User
 
Join Date: Dec 2008
Location: Toronto, Canada
Posts: 381
I figured I could use nonrecoverable option of load, but still don't understand why backup file created by load is so big...
__________________
DB2 v9.5 ESE on AIX v6.1/ v9./10 on z/OS
Reply With Quote
  #3 (permalink)  
Old 04-19-10, 22:34
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
This can be due to table containing small LOB/LF data. When there are lot of small LOB/LF, the copy image can be huge. Please see "Usage notes" here :

IBM DB2 9.5 Information Center for Linux, UNIX, and Windows


"The Load utility might generate a very large copy of the image file when the COPY YES option is used. This behavior is expected when the LOAD command writes out an entire buffer of data to the copy image (approximately 128kb) for every lob/lf column value that is loaded."
Reply With Quote
  #4 (permalink)  
Old 04-20-10, 09:29
MarkhamDBA MarkhamDBA is offline
Registered User
 
Join Date: Dec 2008
Location: Toronto, Canada
Posts: 381
Quote:
Originally Posted by db2girl View Post
This can be due to table containing small LOB/LF data. When there are lot of small LOB/LF, the copy image can be huge. Please see "Usage notes" here :

IBM DB2 9.5 Information Center for Linux, UNIX, and Windows


"The Load utility might generate a very large copy of the image file when the COPY YES option is used. This behavior is expected when the LOAD command writes out an entire buffer of data to the copy image (approximately 128kb) for every lob/lf column value that is loaded."
got it. these tables have long varchar column (32700 byte length).
thank you, Bella
__________________
DB2 v9.5 ESE on AIX v6.1/ v9./10 on z/OS
Reply With Quote
  #5 (permalink)  
Old 04-20-10, 11:19
Cougar8000 Cougar8000 is offline
Registered User
 
Join Date: Nov 2005
Location: IL
Posts: 554
As you have already found out you can do it with a nonrecoverable. Use this function when ever you are doing a total reload.
__________________
--
IBM Certified DBA on DB2 for Linux, UNIX, and Windows

DB2 v9.1.0.2 os 5.3.0.0
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On