How To Enable Archive Log Mode In Oracle Database 19c

Step 1: Connect With Container Database

[oracle@oracle-db-19c ~]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Wed Feb 1 12:32:21 2023
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle.  All rights reserved.


Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0

SQL>

Step 2: Check the status of log mode

SQL> archive log list;
Database log mode              No Archive Mode
Automatic archival             Disabled
Archive destination            /u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch
Oldest online log sequence     124
Current log sequence           126
SQL> 

Step 3: Shutdown the database

In order to switch the log mode we first need to shutdown the database.

SQL> 
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>

Step 4: Mount The Database

To perform the ALTER DDL statement (that we need to do in order to switch the log mode) we need to mount the database first.

SQL> 
SQL> startup mount;
ORACLE instance started.

Total System Global Area  629145392 bytes
Fixed Size                  9137968 bytes
Variable Size             385875968 bytes
Database Buffers          218103808 bytes
Redo Buffers               16027648 bytes
Database mounted.
SQL> 

Step 5: Enable the Archive log mode.

SQL> 
SQL> alter database archivelog;

Database altered.

SQL> 

Step 6: Open The Database

In order to use the database for normal database activities we need to open it.

SQL> 
SQL> alter database open;

Database altered.

SQL> 

Step 7: Check The Log mode

SQL> 

SQL> set pagesize 200
SQL> set linesize 200
SQL> select log_mode from v$database;

LOG_MODE
------------------------------------
ARCHIVELOG

SQL> 

If the result of this statement comes out as “ARCHIVELOG” then that means we have successfully enabled the ARCHIVELOG mode in our Oracle Database.

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值