DBA_Oracle Archive Log basic application and enabling (concept), dba_oraclearchive

Source: Internet
Author: User

DBA_Oracle Archive Log basic application and enabling (concept), dba_oraclearchive

BaoXinjian

I. Summary

Archive logs are backups of redo logs. Archive logs are used for media recovery.

Log Operation Mode

1. Noarchivelog (non-archive Mode)

Do not save redo logs.

Physical backup cannot be performed in the open state; full database backup must be performed on a regular basis; the database can only be restored to the last full backup point.

2. Archivelog

When switching logs, the ARCH process copies the contents of the redo logs to the archive logs.

Before archiving redo logs, new transaction changes cannot overwrite old transaction changes.

You can perform physical backup in the open state.

The database can be restored to the status before failure.

 

Ii. Oracle Redo Log Mode

1. storage location of Redo Log

select * from v$log;select * from v$logfile;select * from v$log_history;

2. v $ log

3. v $ logfile

4. v $ log_history

 

Iii. Switch Database to Archive Mode

1. Create an Archive Log storage folder

[oracle@odellprod oracle]$ pwd/opt/oracle[oracle@odellprod oracle]$ mkdir archivelog[oracle@odellprod oracle]$ chmod 777 archivelog

2. Switch to Archive Mode

[oracle@odellprod oracle]$ sqlplus '/as sysdba'SQL*Plus: Release 11.2.0.1.0 Production on Fri Nov 14 23:29:58 2014Copyright (c) 1982, 2009, Oracle.  All rights reserved.Connected to:Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing optionsSQL> show parameter spfileNAME                                 TYPE        VALUE------------------------------------ ----------- ------------------------------spfile                               string      /opt/oracle/product/11.2.0/ode                                                 llprod/dbs/spfileodellprod.oraSQL> alter system set log_archive_dest='/opt/oracle/archivelog' scope=spfile;System altered.SQL> alter system set log_archive_format='ODELLPROD_ARCHIVELOG%s%t%r.log' scope=spfile; System altered.SQL> 

3. Confirm Parameters

4. Switch to the Mount mode and start Archive.

SQL> startup mount; ORACLE instance started.Total System Global Area  422670336 bytes Fixed Size                 1336960 bytes Variable Size            314575232 bytes Database Buffers         100663296 bytes Redo Buffers               6094848 bytes Database mounted. SQL> alter database archivelog;

5. Confirm the Archive Log information.

SQL> archive log list;Database log mode              Archive ModeAutomatic archival             EnabledArchive destination            /opt/oracle/archivelogOldest online log sequence     20Next log sequence to archive   22Current log sequence           22SQL>

 

4. manually switch the Redo Log to generate an Archive Log

1. Confirm the directory of the Archive Log

2. Redo Log location

3. Switch to Redo Log to generate a new Archive Log

4. Switch the Redo Log to the new Group.

5. How to switch the Redo Log

1: alter system checkpoint: Forces oracle to perform one-time checkpoint to ensure that all transaction changes committed are written to the disk data file. However, the database must be in the open state 2: alter system archive log all; manually archiving all log file groups 3: alter system archive log current; manually archiving active log File groups 4: alter system switch logfile; start to write a new log file group. Whether or not the current log file group is full

 

 

V. Conflict with Flash Recovery. disable this function.

Disable Flash Recovery

SQL> alter system set db_recovery_file_dest='';SQL> shutdown immediate;SQL> startup mount;SQL> alter database flashback off;SQL> alter database open;SQL> alter system set db_recovery_file_dest='';SQL> show parameter db_recovery_file_dest;

 

 

Thanks and Regards

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.