How To Enable/Disable Archive Log Mode In Oracle Database?

How To Enable/Disable Archive Log Mode In Oracle Database
Step 1: Connect to the database the following command
==============================
[oracle@localhost ~]$ sqlplus / as sysdba
SQL*Plus: Release 19.0.0.0.0 - Production on Thu Apr 22 14:40:27 2021
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 1157627168 bytes
Fixed Size 8895776 bytes
Variable Size 436207616 bytes
Database Buffers 704643072 bytes
Redo Buffers 7880704 bytes
Database mounted.
Database opened.
Step 2: To check the ARCHIVELOG mode status, enter the following SQL command:
==================================
SQL> archive log list;
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination /u01/app/oracle/archive
Oldest online log sequence 22
Current log sequence 24

Step 3:To enable ARCHIVELOG mode status, enter the following SQL commands:
==================================
SQL > shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.
Total System Global Area 1157627168 bytes
Fixed Size 8895776 bytes
Variable Size 436207616 bytes
Database Buffers 704643072 bytes
Redo Buffers 7880704 bytes
Database mounted.
SQL> alter database archivelog;

Database altered.
SQL> alter database open;

Database altered.
Step 4: To check the ARCHIVELOG mode status, enter the following SQL command:
==================================

SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /u01/app/oracle/archive
Oldest online log sequence 23
Next log sequence to archive 25
Current log sequence 25
SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
Disable archivelog mode:
=====================
Step 1: To check the ARCHIVELOG mode status, enter the following SQL command:
==================================
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /u01/app/oracle/archive
Oldest online log sequence 23
Next log sequence to archive 25
Current log sequence 25
Step 2: To disable ARCHIVELOG mode status, enter the following SQL commands:
==================================
SQL > shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.
Total System Global Area 1157627168 bytes
Fixed Size 8895776 bytes
Variable Size 436207616 bytes
Database Buffers 704643072 bytes
Redo Buffers 7880704 bytes
Database mounted.
SQL >alter database noarchivelog;
database altered.
SQL >alter database open;
database altered.
Step 3: To check the ARCHIVELOG mode status, enter the following SQL command:
==================================
SQL> archive log list;
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination /u01/app/oracle/archive
Oldest online log sequence 23
Current log sequence 25

Comments

Popular posts from this blog

How to Install Java? How to set Paths in Java?

What is char charAt (int index) in Java, and how can I use it?

What is the alert log?