DB2 LUW 8.2 FP14 Red Hat AS 2.1
Can I use SYSPROC.ALTOBJ() to simply rename a table that has complex
dependencies (RI, functions, triggers, etc...)?
Seems like all the logic is in there to tear down all the dependencies,
rename the table, then build the dependencies back up again - but
I don't see how to do it..
TIA
aj
Serge Rielau - 19 Jan 2007 23:04 GMT
> DB2 LUW 8.2 FP14 Red Hat AS 2.1
>
[quoted text clipped - 4 lines]
> rename the table, then build the dependencies back up again - but
> I don't see how to do it..
You can have ALTOBJ() simply produce the script. Dump it to a text file,
muck with it any which way you want and then execute it.
Cheers
Serge

Signature
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
WAIUG Conference
http://www.iiug.org/waiug/present/Forum2006/Forum2006.html
Knut Stolze - 21 Jan 2007 18:37 GMT
> DB2 LUW 8.2 FP14 Red Hat AS 2.1
>
[quoted text clipped - 4 lines]
> rename the table, then build the dependencies back up again - but
> I don't see how to do it..
Depending on what you what to rename - schema name vs. table name, - the SQL
statement RENAME maybe a much simpler approach.
http://publib.boulder.ibm.com/infocenter/db2luw/v8/topic/com.ibm.db2.udb.doc/adm
in/r0000980.htm

Signature
Knut Stolze
DB2 z/OS Utilities Development
IBM Germany
andyhe - 22 Jan 2007 15:37 GMT
Maybe creating an alias for your table is an option? Leave the original
as it is and have a second object (alias, can be in another schema)
referring to the original.