Sunday, August 01, 2004

Oracle - Turning archive logging on and off

Start.

1. add the following to init.ora file

log_archive_start = true
log_archive_dest = /path/to/archive/dir
log_archive_format = _%s.log

2. Starting archive logging

startup mount exclusive
alter database archivelog;
alter database open;

3. Check to make sure
SQL> archive log list
Database log mode ARCHIVELOG
Automatic archival ENABLED
Archive destination /path/to/archive/dir
Oldest online log sequence 2
Current log sequence 3

Stop.

1.
startup mount exclusive
alter database noarchivelog;
alter database open;
2.
SQL> archive log list
Database log mode NOARCHIVELOG
Automatic archival ENABLED
Archive destination /path/to/archive/dir
Oldest online log sequence 2
Current log sequence 3
SQL>

No comments: