Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Regarding Table Migration

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Regarding Table Migration
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: 1013
Location: India

PostPosted: Wed May 05, 2010 9:01 pm    Post subject:
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: 186
Location: chennai

PostPosted: Thu May 06, 2010 12:55 am    Post subject: Reply to: Regarding Table Migration
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: 1280
Location: Belgium

PostPosted: Thu May 06, 2010 12:51 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Data replication from multiple Db2 ta... kishpra DB2 5 Mon Mar 27, 2017 9:58 pm
No new posts how to send just 10 rows in a CICS sc... Megha Gupta CICS 5 Thu Feb 23, 2017 6:57 pm
No new posts Join of more than one table dibyendumandal11111 DB2 6 Mon Feb 13, 2017 11:36 pm
No new posts SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am
No new posts Need Rexx Program to Load in to DB2 T... Hareesh Verma CLIST & REXX 22 Tue Sep 20, 2016 2:59 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us