ORA-01765
Saw an error ORA-01765 when tried to rename a table by SYS.
SQL> conn / as sysdba
Connected.
SQL> rename hr.employees to hr.employees_bak;
rename hr.employees to hr.employees_bak
*
ERROR at line 1:
ORA-01765: specifying owner's name of the table is not allowed
ORA-01765 means that you cannot specify the schema owner to qualify the object, which is not allowable even though you login as the owner.
SQL> conn hr/hr@orcl
Connected.
SQL> rename hr.employees to hr.employees_bak;
rename hr.employees to hr.employees_bak
*
ERROR at line 1:
ORA-01765: specifying owner's name of the table is not allowed
Solution
To solve ORA-01765, you should connect to the database as the schema owner and then RENAME the table without qualifying any schema name.
SQL> show user;
USER is "HR"
SQL> rename employees to employees_bak;
Table renamed.
There're more restrictions imposed on using RENAME statement.