468,457 Members | 1,771 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,457 developers. It's quick & easy.

Use SYSPROC.ALTOBJ() to simply rename a table?

aj
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
Jan 19 '07 #1
3 3141
aj wrote:
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..
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

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

WAIUG Conference
http://www.iiug.org/waiug/present/Fo...Forum2006.html
Jan 19 '07 #2
aj wrote:
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..
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/infoce...n/r0000980.htm

--
Knut Stolze
DB2 z/OS Utilities Development
IBM Germany
Jan 21 '07 #3
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.

Jan 22 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Andy S. | last post: by
7 posts views Thread by Serge Rielau | last post: by
3 posts views Thread by chettiar | last post: by
reply views Thread by aj | last post: by
1 post views Thread by Roger | last post: by
reply views Thread by David Beardsley | last post: by
reply views Thread by NPC403 | last post: by
1 post views Thread by subhajit12345 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.