Home » SQL & PL/SQL » SQL & PL/SQL » Impact on table when it is renamed (10.2.0.4.0 ,windows)
Impact on table when it is renamed [message #423613] Fri, 25 September 2009 09:47 Go to next message
Mohan10g
Messages: 159
Registered: May 2009
Location: INDIA
Senior Member

Hi All,

Will there be an impact in application and database
when the table is renamed using

alter table tab1 rename to tab;

Also the table is filled up with huge data ,constraints,indexes,
comments etc.. as well.



Regards,
Re: Impact on table when it is renamed [message #423614 is a reply to message #423613] Fri, 25 September 2009 09:50 Go to previous messageGo to next message
ThomasG
Messages: 3189
Registered: April 2005
Location: Heilbronn, Germany
Senior Member
Yes.
Re: Impact on table when it is renamed [message #423615 is a reply to message #423613] Fri, 25 September 2009 09:51 Go to previous messageGo to next message
BlackSwan
Messages: 25042
Registered: January 2009
Location: SoCal
Senior Member
>Will there be an impact in application and database when the table is renamed using
yes
Re: Impact on table when it is renamed [message #423616 is a reply to message #423615] Fri, 25 September 2009 09:58 Go to previous messageGo to next message
Mohan10g
Messages: 159
Registered: May 2009
Location: INDIA
Senior Member

May i know what could be the impact if the table having
huge data ,constraints,indexes,comments etc.. is renamed?


Regards,
Re: Impact on table when it is renamed [message #423617 is a reply to message #423616] Fri, 25 September 2009 09:59 Go to previous messageGo to next message
ThomasG
Messages: 3189
Registered: April 2005
Location: Heilbronn, Germany
Senior Member
Depends.
Re: Impact on table when it is renamed [message #423618 is a reply to message #423616] Fri, 25 September 2009 10:04 Go to previous messageGo to next message
BlackSwan
Messages: 25042
Registered: January 2009
Location: SoCal
Senior Member
It is like renaming a directory at the OS level.

Re: Impact on table when it is renamed [message #423649 is a reply to message #423613] Sat, 26 September 2009 00:02 Go to previous messageGo to next message
Kevin Meade
Messages: 2101
Registered: December 1999
Location: Connecticut USA
Senior Member
BlackSwan's analogy is a good one.

Quote:
It is like renaming a directory at the OS level.


Consider what happens when you rename a directory. All the files are still there, they have not changed in anyway. But any programs and scripts that looked for files in this directory are broken because they cannot find the files in the directory that was renamed. Similarly consider what happens to any piece of code that would reference the table you have renamed.

As for indexes/constraints,triggers, think of these like privileges on the directory and files inside it. Even though the directory was renamed, all the privileges stay the same.

Also, assuming the code you pasted was accurate, you may wish to rename the table to something other than tab. tab is a reserved word in oracle that refers to an old metadata view. The name is kept for backward compatability.

Good luck, Kevin
Re: Impact on table when it is renamed [message #423668 is a reply to message #423649] Sat, 26 September 2009 04:31 Go to previous message
Mohan10g
Messages: 159
Registered: May 2009
Location: INDIA
Senior Member



Nice explanation kevin.

Thanks a lot.
Previous Topic: Invalid record error with triggers
Next Topic: sending email with authentication
Goto Forum:
  


Current Time: Wed Dec 07 03:21:04 CST 2016

Total time taken to generate the page: 0.05135 seconds