Skip to content

How to Resolve ORA-00946: missing TO keyword

  • by


Tried to rename a file of database, but it failed with ORA-00946.

SQL> alter database rename file '/oradata/ORCLCDB/ORCLPDB/example01.dbf' '/oradata/TESTCDB/ORCLPDB/example01.dbf';
alter database rename file '/oradata/ORCLCDB/ORCLPDB/example01.dbf' '/oradata/TESTCDB/ORCLPDB/example01.dbf'
ERROR at line 1:
ORA-00946: missing TO keyword

ORA-00946 means that the keyword TO is missing from the statement you issued, which causes a syntax error.


To solve ORA-00946, we should follow the error message.

SQL> alter database rename file '/oradata/ORCLCDB/ORCLPDB/example01.dbf' to '/oradata/TESTCDB/ORCLPDB/example01.dbf';

Database altered.

We made it.

Leave a Reply

Your email address will not be published. Required fields are marked *