Notes for setting the target database to archive in Oracle
1. Connect to sysdba
SQL> conn/as sysdba
2. Check whether the instance is archived.
SQL> select dbid, name, log_mode from v $ database;
3. Set archiving Parameters
SQL> alter system set log_archive_dest = '/oracle/product/database/archive' scope = spfile;
Note: The path here must exist. Otherwise, the database cannot find the path for archiving logs after restart, leading to database startup failure. Error message ORA-16032: parameter LOG_ARCHIVE_DEST destination:
But it can be from/oracle/product/10201/db_1/dbs/init <SID>. find this line in the ora file *. log_archive_dest = '/oracle/product/database/archive'. Check whether the path exists and the path does not exist.
4. Close and restart the instance to make the parameter take effect.
SQL> shutdown immediate
SQL> startup mount
SQL> select dbid, name, log_mode from v $ database;
Archive Mode
5. Switch the instance to archive mode.
SQL> alter database archivelog;
6. OPEN the instance as OPEN
SQL> alter database open;