Oracle databases can run in two modes: archivelog and noarchivelog ). The archive mode can improve the recoverability of Oracle databases. Production Databases should all run in this mode. The Archive mode should be combined with the corresponding backup policies, only when the archive mode does not have a corresponding backup policy will it be troublesome.
Command for checking archive mode:
SQL> archive log listDatabase log mode No Archive ModeAutomatic archival DisabledArchive destination USE_DB_RECOVERY_FILE_DESTOldest online log sequence 15Current log sequence 17 |
Set the archive mode:
SQL> shutdown immediate;Database closed.Database dismounted.ORACLE instance shut down.SQL> startup mountORACLE instance started.Total System Global Area 1258291200 bytesFixed Size 1219160 bytesVariable Size 318768552 bytesDatabase Buffers 922746880 bytesRedo Buffers 15556608 bytesDatabase mounted.SQL> alter database archivelog;Database altered.SQL> alter database open;Database altered.SQL> archive log list;Database log mode Archive ModeAutomatic archival EnabledArchive destination USE_DB_RECOVERY_FILE_DESTOldest online log sequence 15Next log sequence to archive 17Current log sequence 17 |
To stop the archive mode, run the alter database noarchivelog command. Before Oracle10g, you also need to modify the initialization parameters so that the database is in the automatic archiving mode. Set the following parameters in pfile/spfile:
Restart the database. This parameter takes effect when the database is in automatic archiving mode. You can also manually execute the following commands during database startup:
Enable automatic archiving for the database, but the database is still in manual archiving mode after restart. 10 Gb uses db_recovery_file_dest as the storage location for archiving logs.
SQL> show parameter db_recoveryNAME TYPE VALUEdb_recovery_file_dest string /home/oracle/ora10g/flash_recovery_area/db_recovery_file_dest_size big integer 20G |
You can modify the size of the db_recovery_file_dest_size parameter.
alter system set db_recovery_file_dest_size=21474836480 |
From: http://database.51cto.com/art/200611/35422.htm