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

Regarding Table Migration


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

New User


Joined: 01 Feb 2007
Posts: 30
Location: Mumbai

PostPosted: Wed May 05, 2010 5:49 pm
Reply with quote

Hello All,

I have a situation where I am required to change the length of one of the columns in a table.

The following is the sequence I am following :

1) Take an unload of the table
2) Drop the table and the tablespace(there is only one table in the tablespace)
3)Recreate the table,Indexes and Views with the modified length for the column in consideration
4)Migrate the data which was taken by using UNLOAD so that now it is in the new format.
5)Load the table with the new migrated data.

As I understand after reading the documents the tablespace is in COPY PENDING status on running the LOAD UTILITY

6)The following is the control card for the LOAD UTILITY

LOAD DATA LOG NO INDDN FIC1 INTO TABLE DATABASENAME.TABLENAME

After reading manuals/documents I came to understand that we need to run a FULL IMAGE COPY on the tablespace to reset the copy pending status.

7)The following is the control card for the Full Image COPY

COPY TABLESPACE DATABASENAME.TABLESPACENAME FULL YES

I have the following queries:

1) Is it fine to run the LOAD first and then RUN the FULL IMAGE COPY ,also please suggest if the parameters are correct for LOAD and FULL IMAGE COPY

2) Is there a better approach to do it ,please suggest.

Thanks in advance for your help,

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

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Wed May 05, 2010 9:01 pm
Reply with quote

Tushar,

I suggest you take an inline copy while doing the load, look for "Creating inline copies" in utility reference manul.

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

Active User


Joined: 27 Sep 2008
Posts: 193
Location: chennai

PostPosted: Thu May 06, 2010 12:55 am
Reply with quote

Hi Tushar


Quote:
I have a situation where I am required to change the length of one of the columns in a table.


Change means increase the length or decrease the length?
If it is increase the length, I have a suggestion. If the column of the existing table permit expansion by length, it is better to ALTER the table instead of doing all these things you mentioned. Since all data types are not permitted for altering, you should examine the column for the possibility of expansion by increasing the length.

Regards
Raghu
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Thu May 06, 2010 12:51 pm
Reply with quote

Any decent site has tools to do this.
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 Multiple table unload using INZUTILB DB2 2
No new posts Check data with Exception Table DB2 0
No new posts Dynamically pass table name to a sele... DB2 2
Search our Forums:

Back to Top