How to Resolve ORA-02065 Error Message

  • by

ORA-02065: illegal option for ALTER SYSTEM

Some may try to enable archivelog mode like the followings, but it failed with ORA-02065:

SQL> alter system archivelog;
alter system archivelog
ERROR at line 1:
ORA-02065: illegal option for ALTER SYSTEM

ORA-02065 means that the operation at system-level is not valid, which means your ALTER SYSTEM statement is illegal syntactically. Actually, you should enable archivelog mode at database-level which uses ALTER DATABASE.

SQL> alter database archivelog;

Database altered.

Not all archived log related operations are invalid at system-level, at least, there's one operation on archived log is valid to use ALTER SYSTEM.

Explicit Archiving

To make current redo log archive and switch to the next redo, we can explicitly perform an archival.

SQL> alter system archive log current;

System altered.

I have talked about it in the post: ALTER SYSTEM SWITCH LOGFILE vs ARCHIVE LOG CURRENT.

Leave a Reply

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