IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Load Job to load only Few Partitions for Partition table


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
alluri12

New User


Joined: 15 Aug 2006
Posts: 44
Location: Virginia, USA

PostPosted: Thu Dec 10, 2009 3:10 am
Reply with quote

Hi,
I have a table = owner.Table1 with 16 partitions.

I want to load the Partition table with Load replace and i want to load only few partitions. I do not want to touch the data in other partitions.
I tried the syntax

Code:
LOAD REPLACE                                         
   LOG NO                                           
   ORDER YES                                         
   COPY YES INLINE REGISTER NONE                     
   UPDATEDB2STATS YES                               
   BMCSTATS YES                                     
   REDEFINE NO                                       
   INTO TABLE owner.table1 PART 1:11


It loaded successfully but the remaining partions data also deleted.
Could anybody please provide the syntax to load only 11 partitions and should not touch the other 12:16 partitions data.
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Thu Dec 10, 2009 1:49 pm
Reply with quote

Hello Alluri,

Since you have specified REPLACE option before the PART OPTION, replace will indicate entire tablespace to be replaced .

Please use below code for each partition :

Code:
LOAD
  INTO TABLE owner1.table1 PART 1 REPLACE
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Thu Dec 10, 2009 2:08 pm
Reply with quote

Alluri,

Quote:
It loaded successfully but the remaining partions data also deleted.

Well that is what your below syntax also meant, i guess. If you had worked in BMC, you could have said "TESTED SUCCESSFULLY" for BMC LOAD test documents.

Code:
LOAD REPLACE                                         
   LOG NO                                           
   ORDER YES                                         
   COPY YES INLINE REGISTER NONE                     
   UPDATEDB2STATS YES                               
   BMCSTATS YES                                     
   REDEFINE NO                                       
   INTO TABLE owner.table1 PART 1:11


Open-Up the BMC Load manual, Look for the "REPLACE" keyword and where to place it, while loading partitions. Since, i have never used BMC, i cannot tell you that position. But, my guess is somewhere near the PART keyword like
Code:
LOAD                                           
   LOG NO                                           
   ORDER YES                                         
   COPY YES INLINE REGISTER NONE                     
   UPDATEDB2STATS YES                               
   BMCSTATS YES                                     
   REDEFINE NO                                       
   INTO TABLE owner.table1 PART 1:11 REPLACE


Above is not tested, similar method is followed for IBM load utility & FASTLOAD utility for loading specific partitions.


Sushanth
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Thu Dec 10, 2009 2:19 pm
Reply with quote

Sorry guptae, i guess i didn't refresh my page.

Sushanth
Back to top
View user's profile Send private message
alluri12

New User


Joined: 15 Aug 2006
Posts: 44
Location: Virginia, USA

PostPosted: Fri Dec 11, 2009 9:52 am
Reply with quote

Thanks guys.... it worked, Here is the code i used

Code:
LOAD
   RESUME YES                                           
   LOG NO                                           
   ORDER YES                                         
   COPY YES INLINE REGISTER NONE                     
   UPDATEDB2STATS YES                               
   BMCSTATS YES                                     
   REDEFINE NO                                       
   INTO TABLE owner.table1 PART 1:11 REPLACE
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Fri Dec 11, 2009 11:32 am
Reply with quote

Thanks Alluri for the update.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Load new table with Old unload - DB2 DB2 6
No new posts Pulling a fixed number of records fro... DB2 2
No new posts How to load to DB2 with column level ... DB2 6
No new posts Multiple table unload using INZUTILB DB2 2
No new posts Check data with Exception Table DB2 0
Search our Forums:

Back to Top