Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / January 2007

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
aj - 19 Jan 2007 16:07 GMT
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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.