View previous topic :: View next topic
|
Author |
Message |
tushar_study
New User
Joined: 01 Feb 2007 Posts: 30 Location: Mumbai
|
|
|
|
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 |
|
|
sushanth bobby
Senior Member
Joined: 29 Jul 2008 Posts: 1020 Location: India
|
|
|
|
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 |
|
|
Raghu navaikulam
Active User
Joined: 27 Sep 2008 Posts: 193 Location: chennai
|
|
|
|
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 |
|
|
GuyC
Senior Member
Joined: 11 Aug 2009 Posts: 1281 Location: Belgium
|
|
|
|
Any decent site has tools to do this. |
|
Back to top |
|
|
|