Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

rename table with sys in 11g

chijarApr 8 2014 — edited Apr 8 2014

Hi all,

Before Oracle 11g and in Oracle 10g (I think) we can rename a table like this:

(with sys user):

alter table SCOTT.OLD_NAME rename NEW_NAME;

I mean SYS user could rename a table from another schema (for instance, SCOTT)

Now, (oracle 11g) when I try to rename a table with SYS user from another schema, it shows me:

SQL> conn sys as sysdba

Enter password:

Connected.

SQL> rename table plantest.PEMVX_AFEPRE_ESP to PEMVX_AFEPRE_ESP_old;

rename table plantest.PEMVX_AFEPRE_ESP to PEMVX_AFEPRE_ESP_old

       *

ERROR at line 1:

ORA-00903: invalid table name

SQL> alter table plantest.PEMVX_AFEPRE_ESP to PEMVX_AFEPRE_ESP_old;

alter table plantest.PEMVX_AFEPRE_ESP to PEMVX_AFEPRE_ESP_old

                                      *

ERROR at line 1:

ORA-01735: invalid ALTER TABLE option

SQL>

I have read documentation and the only way (as far I know) rename table is that PLANTEST user have logged into database and rename its table. I mean, only the owner of the table can rename it ??

Please, how can I rename ANY table of my database with SYS or SYSTEM user?

thank you

This post has been answered by Yunus Simsek on Apr 8 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 6 2014
Added on Apr 8 2014
3 comments
4,702 views