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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-22-05, 07:03
AnilKale AnilKale is offline
Registered User
 
Join Date: Feb 2005
Posts: 118
Load

In the os/390 world, emptying a table without any logging overheads was quite simple.
Simply LOAD REPLACE using an DUMMY dataset WITH LOG NO option.
Is there an equivalent concept for UDB Db2 on Windows.
I tried the following but no luck.
1. EXPORT from tab1 (making sure no rows are returned)
use the LOAD command and specify the empty file.
LOAD didn't go thru because it didn't like the file format
2. EXPORT 1 row from tab1
use LOAD with REPLACE option and non-recoverable (for LOG NO)
one row was replaced, which means row count hasn't changed. the purpose of loading one row (replacing data with one row) was defeated.

Bottomline, my question is
In UDB DB2 for Windows, how do you empty a large table without incurring any LOG overheads ?

thanks.
Anil
Reply With Quote
  #2 (permalink)  
Old 02-22-05, 07:27
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
load from /dev/null of del replace into tablename nonrecoverable

On windoes, use a empty file instead of /dev/null

Cheers
Sathyaram
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #3 (permalink)  
Old 02-22-05, 08:02
grofaty grofaty is offline
Registered User
 
Join Date: Jan 2003
Posts: 1,570
On Windows:
Code:
load from nul: of del replace into schema.tablename
or even better if more tables are in one tablespace (load locks tablespace in inclusive mode)
Code:
import from nul: of del replace into schema.tablename
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