- Archive Log mode 확인


SYS@PROD>archive log list

Database log mode       No Archive Mode

Automatic archival       Disabled

Archive destination       /u01/app/oracle/product/11.2.0/dbhome_1/dbs/arch

Oldest online log sequence     24

Current log sequence       26

 


- Archive Log Mode로 변경

해당 모드로의 변경은 데이터베이스가 Mount 상태일 때 가능.

SYS@PROD>alter database archivelog;

alter database archivelog

*

ERROR at line 1:

ORA-01126: database must be mounted in this instance and not open in any instance


SYS@PROD>shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.


SYS@PROD>startup mount

ORACLE instance started.

 

Total System Global Area  417546240 bytes

Fixed Size     2213936 bytes

Variable Size   327157712 bytes

Database Buffers   83886080 bytes

Redo Buffers     4288512 bytes

Database mounted.



SYS@PROD>alter database archivelog;

 

Database altered.

 

SYS@PROD>archive log list

Database log mode       Archive Mode

Automatic archival       Enabled

Archive destination       /u01/app/oracle/product/11.2.0/dbhome_1/dbs/arch

Oldest online log sequence     24

Next log sequence to archive   26

Current log sequence       26


 


- No Archive Log mode 변경

 SYS@PROD>startup mount

ORACLE instance started.

 

Total System Global Area  417546240 bytes

Fixed Size     2213936 bytes

Variable Size   327157712 bytes

Database Buffers   83886080 bytes

Redo Buffers     4288512 bytes

Database mounted.

SYS@PROD>alter database noarchivelog;

 

Database altered.

 

SYS@PROD>archive log list

Database log mode       No Archive Mode

Automatic archival       Disabled

Archive destination       /u01/app/oracle/product/11.2.0/dbhome_1/dbs/arch

Oldest online log sequence     24

Current log sequence       26