A) Archive 모드 전환
운영 모드 현황 조사
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 18 Current log sequence 20
{}
아카이브 경로 파라미터 조사
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
Archive 경로 관련 파라미터 변경
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.
데이터베이스 중지 및 재기동
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.
Archive 모드 전환 및 Database Open
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 18 Next log sequence to archive 20 Current log sequence 20 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