버전 비교

  • 이 줄이 추가되었습니다.
  • 이 줄이 삭제되었습니다.
  • 서식이 변경되었습니다.

Archive 모드 전환

코드 블럭
title운영 모드 현황 조사
linenumberstrue
archive log list;


펼치기


서식 미적용
SQL> archive log list;
Database log mode              No Archive Mode
Automatic archival             Disabled
Archive destination            /u01/app/oracle/product/11.2.0/db_1/dbs/arch
Oldest online log sequence     17
Current log sequence           19





코드 블럭
title아카이브 경로 파라미터 조사
linenumberstrue
select NAME, DISPLAY_VALUE 
from V$PARAMETER 
where NAME like 'db_recovery_file_dest%';


펼치기


서식 미적용
SQL> col NAME form a30
SQL> col DISPLAY_VALUE form a15

SQL> select NAME, DISPLAY_VALUE from V$PARAMETER where NAME like 'db_recovery_file_dest%';

NAME                           DISPLAY_VALUE
------------------------------ ---------------
db_recovery_file_dest
db_recovery_file_dest_size     0





코드 블럭
titleArchive 경로 관련 파라미터 변경
linenumberstrue
alter system set db_recovery_file_dest_size=4G sid='*';
alter system set db_recovery_file_dest='/FRA' sid='*';


펼치기


서식 미적용
SQL> alter system set db_recovery_file_dest_size=4G sid='*';

System altered.

SQL> alter system set db_recovery_file_dest='/FRA' sid='*';

System altered.





코드 블럭
title데이터베이스 중지 및 재기동
linenumberstrue
host srvctl stop database -d racdb -o immediate
conn / as sysdba
startup mount


펼치기


서식 미적용
SQL> host srvctl stop database -d racdb -o immediate

SQL> host crsctl stat res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.LISTENER.lsnr
               ONLINE  ONLINE       rac1
               ONLINE  ONLINE       rac2
ora.gsd
               OFFLINE OFFLINE      rac1
               OFFLINE OFFLINE      rac2
ora.net1.network
               ONLINE  ONLINE       rac1
               ONLINE  ONLINE       rac2
ora.ons
               ONLINE  ONLINE       rac1
               ONLINE  ONLINE       rac2
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       rac1
ora.LISTENER_SCAN2.lsnr
      1        ONLINE  ONLINE       rac2
ora.LISTENER_SCAN3.lsnr
      1        ONLINE  ONLINE       rac2
ora.cvu
      1        ONLINE  ONLINE       rac2
ora.oc4j
      1        ONLINE  ONLINE       rac2
ora.rac1.vip
      1        ONLINE  ONLINE       rac1
ora.rac2.vip
      1        ONLINE  ONLINE       rac2
ora.racdb.db
      1        OFFLINE OFFLINE                               Instance Shutdown
      2        OFFLINE OFFLINE                               Instance Shutdown
ora.scan1.vip
      1        ONLINE  ONLINE       rac1
ora.scan2.vip
      1        ONLINE  ONLINE       rac2
ora.scan3.vip
      1        ONLINE  ONLINE       rac2


SQL> conn / as sysdba
Connected to an idle instance.

SQL> startup mount
ORACLE instance started.

Total System Global Area 3206836224 bytes
Fixed Size                  2257520 bytes
Variable Size             721423760 bytes
Database Buffers         2466250752 bytes
Redo Buffers               16904192 bytes
Database mounted.





코드 블럭
titleArchive 모드 전환 및 Database Open
linenumberstrue
alter database archivelog;
archive log list;
shutdown abort
host srvctl start database -d racdb


펼치기


서식 미적용
SQL> alter database archivelog;

Database altered.

SQL> archive log list;
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     17
Next log sequence to archive   19
Current log sequence           19

SQL> shutdown abort
ORACLE instance shut down.

SQL> host srvctl start database -d racdb

SQL> host crsctl stat res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.LISTENER.lsnr
               ONLINE  ONLINE       rac1
               ONLINE  ONLINE       rac2
ora.gsd
               OFFLINE OFFLINE      rac1
               OFFLINE OFFLINE      rac2
ora.net1.network
               ONLINE  ONLINE       rac1
               ONLINE  ONLINE       rac2
ora.ons
               ONLINE  ONLINE       rac1
               ONLINE  ONLINE       rac2
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       rac1
ora.LISTENER_SCAN2.lsnr
      1        ONLINE  ONLINE       rac2
ora.LISTENER_SCAN3.lsnr
      1        ONLINE  ONLINE       rac2
ora.cvu
      1        ONLINE  ONLINE       rac2
ora.oc4j
      1        ONLINE  ONLINE       rac2
ora.rac1.vip
      1        ONLINE  ONLINE       rac1
ora.rac2.vip
      1        ONLINE  ONLINE       rac2
ora.racdb.db
      1        ONLINE  ONLINE       rac1                     Open
      2        ONLINE  ONLINE       rac2                     Open
ora.scan1.vip
      1        ONLINE  ONLINE       rac1
ora.scan2.vip
      1        ONLINE  ONLINE       rac2
ora.scan3.vip
      1        ONLINE  ONLINE       rac2

SQL> conn / as sysdba
Connected.

SQL> col INSTANCE_NAME form a30
SQL> col STATUS form a10
SQL> select INSTANCE_NAME, STATUS from GV$INSTANCE;

INSTANCE_NAME                  STATUS
------------------------------ ----------
racdb1                         OPEN
racdb2                         OPEN

...