DataGuard slave database deletes applied logs

Source: Internet
Author: User

DataGuard slave database deletes applied logs

The company set up a slave uard. At the beginning, it did not pay attention to the management of archiving logs in the slave database. After the system was running for a while, it was found that the space of the slave database was cracked up by archiving logs.

Solution: Oracle provides a view for you to view the execution status of archived logs. You can delete the archived logs through the operating system as long as they have been applied.

Script for viewing archived logs: select sequence #, applied from v $ archived_log order by sequence #;

The following is the scheduled Delete script for the operating system I configured:

#! /Bin/sh

Export PATH

ORACLE_SID = orcl

TABLE = 'v $ archived_log'

Export ORACLE_BASE ORACLE_SID

Export ORACLE_HOME =/u01/app/oracle/product/OraDb11g_home1

Export PATH = $ PATH: $ ORACLE_HOME/bin: $ ORACLE_HOME/OPatch

$ ORACLE_HOME/bin/sqlplus-silent "/as sysdba" <EOF>/home/oracle/deleteorclarch. sh
 
Set heading off;

Set pagesize 0;

Set term off;

Set feedback off;

Set linesize 32767;

Select 'rm-rf '| name from $ {TABLE} where DELETED = 'no' and APPLIED = 'yes ';

Exit;

EOF

Sh/home/oracle/deleteorclarch. sh

Rman target/<END

Crosscheck archivelog all;

Delete noprompt expired archivelog all;

Exit;

END

Use crontab to regularly run scripts on a daily basis;

Install Oracle 11gR2 (x64) in CentOS 6.4)

Steps for installing Oracle 11gR2 in vmwarevm

Install Oracle 11g XE R2 In Debian

Important configuration parameters of Oracle Data Guard

Configure Oracle 11g Data Guard based on the same host

Explore Oracle 11g elastic uard

Oracle Data Guard (RAC + DG) archive deletion policies and scripts

Role conversion for Oracle Data Guard

FAL gap in Oracle Data Guard logs

Oracle 11g Data Guard Error 16143 Heartbeat failed to connect to standby

Related Article

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.