Commands and parameters for Oracle archive Mode

Source: Internet
Author: User

 

 

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:

log_archive_start = true

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:

archive log start

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

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.