There are 2 types of modes in Oracle Database.
1. Archivelog mode
In this mode, after the online redo logs are filled , it will move to archive location
2. Noarchivelog mode
In this mode, filled online redo logs wont be archives, instead they will be overwritten.
How to Enable archive log mode:
[code]
SQL> select name,log_mode from v$database;
NAME LOG_MODE
--------- ------------
ORCL1 NOARCHIVELOG
SQL> archive log list;
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination /u01/app/oracle/product/19.0.0/dbhome_1/dbs/arch
Oldest online log sequence 9
Current log sequence 11
SQL>
SQL> show parameter spfile;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
spfile string /u01/app/oracle/product/19.0.0
/dbhome_1/dbs/spfileorcl1.ora
SQL>
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>
SQL> startup mount
ORACLE instance started.
Total System Global Area 893385440 bytes
Fixed Size 9140960 bytes
Variable Size 234881024 bytes
Database Buffers 641728512 bytes
Redo Buffers 7634944 bytes
Database mounted.
SQL>
SQL> alter database archivelog;
Database altered.
SQL> alter database open;
Database altered.
SQL> select name,log_mode from v$database;
NAME LOG_MODE
--------- ------------
ORCL1 ARCHIVELOG
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /u01/app/oracle/product/19.0.0/dbhome_1/dbs/arch
Oldest online log sequence 9
Next log sequence to archive 11
Current log sequence 11
SQL>
[/code]
No comments:
Post a Comment