Delete archive logs in Oracle RAC cluster environment

Source: Internet
Author: User

Archive logs are stored in the following ways:

I. ASM Method

If the operating systems of Oracle 10G, oracle11g, and oracle 12C are AIX, HPUX, and Linux, the ASM database creation method is generally adopted, especially for oracle 11g and oracle12C, because oracle does not support bare Device database creation (manual database creation or bare device creation), if you have not purchased HACMP or hp mc software, archive is generally enabled and archive logs can only be placed on ASM, of course, it can also be stored on a local disk, which makes backup more difficult and troublesome.

Backup of archived logs in Oracle RAC Environment

Oracle archiving logs

Oracle Control File)

Oracle ONLINE redo LOG FILE)

Linux/Unix shell scripts call SQL and RMAN scripts

Linux/Unix shell script to clear archived log files

Ii. Shared File System

AIX and HPUX can be made and rolled out using cluster software and stored in a shared file system. Linux can use oracle's OCFS shared cluster file system.

Iii. Local Disk File System

This is simple. You can create a directory in the local file system and point the archive path to the disk path of each node.

This archive backup method is complex and error-prone and is not recommended.

To delete archived logs in the preceding three methods, except for the first method, the other two methods can be deleted directly in the corresponding path, we recommend that you delete the archived logs in the earliest order. Do not delete the latest archived logs. The following describes how to delete the archived logs under ASM.

Switch to the oracle Installation user, oracle10g generally only one user, such as oracle, oracle11g or above, usually use the grid user.

Root # su-oracle [root user]

Oracle $ export ORACLE_SID = rac1 [switch to oracle]

Oracle $ asmcmd

Asmcmd>

Asmcmd> cd ARCH

Asmcmd> cd arch1

Asmcmd> pwd

+ ARCH/arch1

Asmcmd> rm 20140413 *. dbf

In this way, the archived log files can be deleted.

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.