Re: change table name

From: Ron Reidy <rereidy_at_indra.com>
Date: Wed, 12 Dec 2001 08:14:18 -0700
Message-ID: <3C17744A.2D03B9FB_at_indra.com>


Jean-baptiste Guignard wrote:
>
> How can we modify table name physically.
>
> Is the following request enough?
>
> UPDATE USER_OBJECTS
> SET OBJECT_NAME = 'NEW_TABLE_NAME'
> FROM USER_OBJECTS owing
> WHERE OBJECT_NAME = 'OLD_TABLE_NAME';
>
> COMMIT;
>
> ALTER SYSTEM FLUSH SHARED POOL;
>
> Last question: What does the last line mean?
>
> Regards before any help.
>
> Jean-Baptiste
>
> --
> Posted from mix-dijon-117-2-185.abo.wanadoo.fr [80.9.65.185]
> via Mailgate.ORG Server - http://www.Mailgate.ORG
The view USER_OBJECTS is a view, owned by SYS. The definition of this view is based on two 'base' tables (sys.link$ and sys.obj$) that comprise the instance data dictionary.

It is not meant to be INSERTed, UPDATEd, or DELETEd from. Even if you could somehow do this, it could end up being a disaster to the instance because of possible side effects from performing this type of operation.

You should use the RENAME SQL*Plus command to accomplish what you want.

-- 
Ron Reidy
Oracle DBA
Reidy Consulting, L.L.C.
Received on Wed Dec 12 2001 - 16:14:18 CET

Original text of this message