* 사용자들이 수행하는 모든 변경사항들을 저장해두는 Redo Log File을 덮어쓰기 전에 파일로 생성해 보관하는 모드 *

 

** 요약 **

1. Parameter 확인

2. Archive Log Mode 확인

3. Archive Log File이 쌓일 Directory 확인

4. Parameter 변경

5. DB Shutdown

6. DB Mount 후, Archive Log Mode 변경

7. DB Open

8. Archive Log Mode 확인

 

 

1. 사용 중인 Parameter File을 확인 합니다. (SPFILE 사용 중)

SQL> show parameter pfile;

NAME       TYPE           VALUE
---------- -------------- ---------------------------------------------
spfile     string         /home/oracle/product/10g/dbs/spfileORA11.ora

 

 

2. Archive Log Mode를 확인 합니다. (현재는 No Archive Log Mode)

SQL> archive log list;

Database log mode              No Archive Mode
Automatic archival             Disabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     1
Current log sequence           1

 

 

3. Archive File이 쌓일 Directory를 확인 합니다. (/arch 로 권한은 oracle:dba 권한을 부여)

SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

[ORA11]oracle:/home/oracle>df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg_local-lv_root
                      7.6G  4.0G  3.2G  56% /
/dev/mapper/vg_local-lv_oracle
                       38G   28G  8.4G  77% /oracle
/dev/mapper/vg_local-lv_oradata
                       19G  5.1G   13G  29% /oradata
/dev/mapper/vg_local-LogVol00
                      4.8G  230M  4.3G   6% /arch
/dev/sda1             145M   31M  107M  23% /boot
tmpfs                 499M  153M  347M  31% /dev/shm

[ORA11]oracle:/home/oracle>id
uid=501(oracle) gid=500(dba) groups=500(dba)

[ORA11]oracle:/home/oracle>su - 
Password: 

[root@oracle ~]# chown -R oracle:dba /arch

[root@oracle ~]# exit
logout

 

 

4. Parameter를 변경 합니다. (Archive Log Dest 및 Archive Log File의 Format 설정)

[ORA11]oracle:/home/oracle>sqlplus "/as sysdba"

SQL*Plus: Release 11.2.0.4.0 Production on Fri Oct 2 13:56:46 2015

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> alter system set log_archive_dest_1='location=/arch' scope=spfile;

System altered.

SQL> alter system set log_archive_format='%t_%s_%r.arc' scope=spfile;

System altered.

 

 

5. DB를 Shutdown 합니다. (Parameter 변경 적용)

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

 

 

6. Archive Log Mode로 변경 합니다. (DB Mount 상태에서 변경 후, DB Open)

SQL> startup mount; 
ORACLE instance started.

Total System Global Area  313159680 bytes
Fixed Size                  2252824 bytes
Variable Size             222302184 bytes
Database Buffers           83886080 bytes
Redo Buffers                4718592 bytes
Database mounted.

SQL> alter database archivelog;

Database altered.

SQL> alter database open;

Database altered.

 

 

8. Archive Log Mode 확인 (정상적으로 변경)

SQL> archive log list;
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            /arch
Oldest online log sequence     63
Next log sequence to archive   65
Current log sequence           65


'오라클백업과복구 > Archive Log Mode' 카테고리의 다른 글

Archive Hang 발생 시 해결 방법  (0) 2015.10.02
,