새싹 DBA/Oracle

[오라클] 아카이브 로그 조회 및 변경 절차

LIMMI 2024. 9. 13. 16:46

Archive log mode 조회 (sys 계정으로)

SQL > archive log list

Database log mode              No Archive Mode
Automatic archival             Disabled
Archive destination            /u01/app/oracle/product/11g/dbs/arch
Oldest online log sequence     399
Current log sequence           401

 

Archive log mode 변경

1. DB Shutdown

SQL> shutdown immediate

Database closed.
Database dismounted.
ORACLE instance shut down.

2. startup mount

SQL > startup mount;

ORACLE instance started.

Total System Global Area 1169149952 bytes
Fixed Size                  2252624 bytes
Variable Size             385876144 bytes
Database Buffers          771751936 bytes
Redo Buffers                9269248 bytes
Database mounted.

3. Archive mode 변경

--No Archive Mode -> Archive Mode로 변경


SQL> alter database archivelog;

Database altered.

SQL> archive log list
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            /u01/app/oracle/product/11g/dbs/arch
Oldest online log sequence     399
Next log sequence to archive   401
Current log sequence           401

--Archive Mode -> No Archive Mode로 변경

SQL> alter database noarchivelog;

Database altered.

SQL> archive log list
Database log mode              No Archive Mode
Automatic archival             Disabled
Archive destination            /u01/app/oracle/product/11g/dbs/arch
Oldest online log sequence     399
Current log sequence           401

4. DB open

SQL> alter database open;

Database altered.