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 > db2 v8 unload

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-26-10, 07:56
bic bic is offline
Registered User
 
Join Date: Feb 2007
Posts: 42
db2 v8 unload

I need to unload a production 380 gig db onto dev, most of the bulk is in the lobs. Can I do this say maybe overnight without the lobs? What kind of locking is done with unload? Some tables probably have a million or more rows.

I cannot restore the db onto dev as there is not enough disk space.
Reply With Quote
  #2 (permalink)  
Old 05-26-10, 09:44
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
The following answer assumes you use DB2 for Linux, UNIX, Windows (z/OS is different):

You can use export command to extract individual tables. If you use IXF format you need to specify LOBs qualifier (file name or location) or the LOBs will be truncated at 32K (which may be OK in your case).

When you do an export, you create a SQL select statement that determines which rows you want (or leave off WHERE clause to extract all rows). You can specify WITH UR on the end of the select to avoid any locking during the extract. You can also use db2move to pull all the data for all tables. Check the Command Reference manual for export command and db2move utility.

Then load the exported data back into the dev system. If you used db2move, then use db2move again to load the exported data (see manual for correct options).
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
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