If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > rename table question...please help!

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-08-04, 09:42
dnix dnix is offline
Registered User
 
Join Date: Sep 2002
Posts: 51
rename table question...please help!

I plan to create a copy of a TableA called TableA2. Then I want to rename TableA to TableA_old, then rename TableA2 to TableA.

I wanted to do this so that (1) I have a fresh copy of table A in another dbspace with faster drives and (2) in the process I will be recreating the indexes which should also get some performance benefit. Based on the documentation, I was assuming that any stored procedures that act on TableA will remain unaware of this hocus-pocus, but any views over it would need to be recompiled because they attach to tables via part number and not part name.

Someone has since told me that they believed all my stored procedures will still end up pointing to TableA_old and not the new fresh TableA like I want, but thats not documented in the manuals! Can someone weigh in on this and let me know? If I have to recreate all the stored procedures then it makes this process much more complicated then I first thought.
__________________
When in doubt just ask your self,
-WWSBD?-
(what would Sponge Bob do?)
Reply With Quote
  #2 (permalink)  
Old 04-08-04, 13:21
RobP RobP is offline
Registered User
 
Join Date: Mar 2004
Location: Netherlands
Posts: 183
Hi,

Your plan should work, the things you should be aware of are:
- Constarints (primary/foreign key)
- Views
- Synonyms

All of the above are pointed to with the database internal unique identifier tabid (not the partnum). I think you need to recompile your procedures but you can do that with the update statistics fro procedure command.

Hope this helps,

Rob Prop
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On