Enable Archivelog, Put Database into ARCHIVE mode
repA>SELECT LOG_MODE FROM SYS.V$DATABASE;
LOG_MODE
————
NOARCHIVELOG
repA> alter system set log_archive_dest_1=’location=/opt/oracle/oraarchive/repA/’
scope=spfile;
repA>show parameter log_archive_format
NAME TYPE VALUE
———————————— ———– ——————————
log_archive_format string %t_%s.dbf
repA>alter system set log_archive_format=’repA_%s.arc’ scope=spfile;
System altered.
repA>alter system set log_archive_start=TRUE scope=spfile;
System altered.
repA>shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
repA>startup mount
Total System Global Area 320563864 bytes
Fixed Size 735896 bytes
Variable Size 285212672 bytes
Database Buffers 33554432 bytes
Redo Buffers 1060864 bytes
Database mounted.
repA>alter database archivelog;
Database altered.
repA>alter database open;
Database altered.
repA>alter system switch logfile;
System altered.
repA>SELECT LOG_MODE FROM SYS.V$DATABASE;
LOG_MODE
————
ARCHIVELOG
$ ls -l
total 788
-rw-r—– 1 oracle dba 395264 Sep 25 11:06 repA_25.arc
-rw-r—– 1 oracle dba 2048 Sep 25 11:06 repA_26.arc
Leave a Reply
You must be logged in to post a comment.