RAC(OPS) 환경하에서 양쪽 Node의 archived log file을 RMAN을 사용하여 동시에 BACKUP 받는 방법
======================================================================================

ORACLE 9i 이전 버전
-------------------

Oracle 8i까지는 다음과 같은 Script를 통하여 Backup을 받을 수 있었습니다.

1) Script Name: arch_backup.rcv

run{
allocate channel node_1 type disk connect 'system/manager@v92hp1';
allocate channel node_2 type disk connect 'system/manager@v92hp2';

backup filesperset 1
(archivelog until time 'SYSDATE' thread 1 channel node_1)
(archivelog until time 'SYSDATE' thread 2 channel node_2);

release channel node_1;
release channel node_2;

}

2) 수행 방법

$ rman target=system/manager catalog=rman_user/rmanpw cmdfile='arch_backup.rcv' log='arch_backup.log'


ORACLE 9i 이후 버전
-------------------

그러나 Oracle9i 이상부터는 Archived file backup전에 다음과 같은 설정을 먼저
해 주셔야만 합니다.

1) Configuration 설정

$ rman target=system/manager catalog=rman_user/rmanpw
RMAN> Show all;
RMAN> CONFIGURE DEVICE TYPE DISK PARALLELISM 2;
RMAN> configure default device type to disk;
RMAN> configure channel 1 device type disk connect 'system/manager@v92hp1';
RMAN> configure channel 2 device type disk connect 'system/manager@v92hp2';

위 설정은 backup을 Disk에 받는 경우로 가정하고 device type을 모두 disk로 설정하였습니다.
만일 backup solution을 사용하여 tape에 받는다면 device type을 'sbt_tape'으로 변경해 주시면 됩니다

몇개의 Channel을 설정할 것인가에 따라 PARALLELISM의 값을 반드시맞춰 주어야 합니다.
이것을 맞춰주지 않으면 다음과 같은 형태의 Error가 발생하면서 다른 Node의 archive file들을 인식하지
못하게 됩니다.(실제로 Archived file들은 정상적으로 존재합니다)

RMAN-06059: expected archived log not found, lost of archived log compromises recoverability
ORA-19625: error identifying file /u01/64bit/app/oracle/product/9.2.0/admin/V92HP/arch/arch1_146.dbf
ORA-27037: unable to obtain file status
HP-UX Error: 2: No such file or directory
Additional information: 3

위 설정은 한번만 수행해 주시면 됩니다.
만일 CHANNEL을 잘못 설정하였으면 다음과 같은 명령으로 Clear 해 주시면 됩니다.

RMAN> configure channel 1 device type disk clear;


2)Archived file을 Backup 받습니다.

RMAN> run { backup
format='/u01/64bit/app/oracle/product/9.2.0/admin/V92HP/arch/%U'
archivelog all delete input;
}


ADDITIONAL INFORMATION(1)
-------------------------
RAC 환경 하에서 일부 Archived file들이 OS에서 삭제 되었을 경우 다음과 같은 명령을 통하여
validation check를 수행한 후에 backup을 수행하여 주십시요

RMAN> allocate channel for maintenance type disk connect 'system/manager@v92hp1';
RMAN> allocate channel for maintenance type disk connect 'system/manager@v92hp2';
RMAN> crosscheck archivelog all;

만약에 Configuration에서 이미 Channel을 설정해 주었다면
Channel allocation 없이 바로 crosscheck명령어를 수행해 주시면 됩니다.


ADDITIONAL INFORMATION(2)
-------------------------
Channel Configuration 설정시에 Backup FORMAT을 함께 설정하려면 다음과 같은 형태로 수행합니다.

RMAN> CONFIGURE DEVICE TYPE DISK PARALLELISM 2;
RMAN> configure default device type to disk;
RMAN> configure channel 1 device type disk connect 'system/manager@v92hp1' FORMAT '/arch/bkup%t_s%s_s%p';
RMAN> configure channel 2 device type disk connect 'system/manager@v92hp2' FORMAT '/arch/bkup%t_s%s_s%p';


ADDITIONAL INFORMATION(3)
-------------------------
Tape device를 사용할 경우 device type은 'sbt_tape'을 사용합니다.

RMAN> CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 2;
RMAN> configure default device type to 'sbt_tape';
RMAN> configure channel 1 device type 'sbt_tape' connect 'system/manager@v92hp1' FORMAT 'bkup%t_s%s_s%p';
RMAN> configure channel 2 device type 'sbt_tape' connect 'system/manager@v92hp2' FORMAT 'bkup%t_s%s_s%p';

Posted by pat98

05-10 00:00
Flag Counter
Yesterday
Today
Total

글 보관함

최근에 올라온 글

달력

 « |  » 2024.5
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31

최근에 달린 댓글