Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
Posted: Thu Oct 16, 2003 7:53 am Post subject:
Vani,
Yes you need to take into consideration in DB2 that Tablespace/Table/Column/Index names cannot be longer than 18 characters, while in Oracle, the maximum is 30 characters.
You can use the export utility to extract the definitions for the objects owned by that user. An example of this command would be:
Code:
$ exp scott/tiger rows=n file=scott.export
Once you have this file, you can modify the command to the DB2 environment.Basically it will be a shell script with the column name changes.To view the long names use the sql listed below and then decide on the db2 equivalent names. After you finalize the names make the changes in the script to convert.
You can retrieve the Oracle tablespace names longer than 18 bytes from the dba_tablespace with the following statement:
Code:
select tablespace_name, length(tablespace_name) from dba_tablespaces where
length(tablespace_name)>18;
You can retrieve the Oracle table names longer than 18 bytes from the Oracle catalog with the following statement:
Code:
select table_name, length(table_name) from cat
where length(table_name)>18;
You can retrieve the column names longer than 18 characters with the following statement:
Code:
select table_name, column_name, length(column_name)
from user_tab_columns where length(column_name)>18;
You can retrieve the index names longer than 18 characters with the following statement:
Code:
select index_name, length(index_name) from user_indexes where
length(index_name)>18;
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum