How to Setup Archive Log Destination Directory in Oracle Database

DBA need to configure a location where your Oracle Server can archive your redo logs. There are two ways of doing that. These are –

  1. Configure the Fast Recovery Area, and
  2. Configure the Archive log Destination Directory.

Archive Log Destination Directory

Archive log destination directory, As the name suggests is a location which Oracle Uses to save the Archived copies of the Online Redo log files during backup operations.

How To Setup Archive Log Destination Directory.

There are two main parameters that we need to configure to setup Archive log destination directory. These are –

  1. LOG_ARCHIVE_DEST_n, and
  2. LOG_ARCHIVE_MIN_SUCCEED_DEST

Log_Archive_Dest_n Parameter

Log_Archive_Dest_n parameter is used to set a location for Archive Log Destination Directory

Here are a few things about this parameter –

  • The prefix n is a number in range of 1 to 10.
  • Using LOG_ARCHIVE_DEST_n we can define up to 10 destinations for saving the archived logs. if you have more that one location setup then you will have redundant copies of archive logs created by the Oracle Database server. It will occupy some extra storage space but from backup perspective it’s always better to have multiple backups.
  • By default there is no Archive log destination directory setup in Oracle Database. Which means if you want to use one, then you have to set it up first.
  • Using LOG_ARCHIVE_DEST_n you can setup a location which could either be a
    • Local folder created on your hard drive somewhere on your system.
    • A network directory
    • A NAS location
    • Service Name, if you have a data guard setup.

How To Use Log_Archive_Dest_n Parameter

Step 1: Create a Directory at your prefer location.

[oracle@oracle-db-19c ~]$ mkdir ArchLog
[oracle@oracle-db-19c ~]$ pwd
/home/oracle
[oracle@oracle-db-19c ~]$

Step 2: Issue an ALTER SYSTEM Command

SQL> ALTER SYSTEM SET log_archive_dest_1 = 'location = /home/oracle/ArchLog';

Optional & Mandatory Archive log directory.

Any location set as Archive log directory using LOG_ARCHIVE_DEST_n parameter can either be an Optional or Mandatory location.

By default any location set using LOG_ARCHIVE_DEST_n parameter is always optional.

How To Create Mandatory Archive Log Directory

Creating a Mandatory Archive log directory in Oracle Database is actually very simple. We just have to add the Keyword Mandatory to the Alter system statement that we wrote previously. Like this –

SQL> ALTER SYSTEM SET log_archive_dest_1 = 'location=/home/oracle/ MANDATORY'

How To Alter LOG_ARCHIVE_MIN_SUCCEED_DEST.

SQL> ALTER SYSTEM SET log_archive_min_succeed_dest = 2;

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值