* 기본정보
SQL> select name from v$controlfile;
NAME
---------------
/dev/raw/raw10
/dev/raw/raw11
/dev/raw/raw12
SQL> select member from v$logfile;
MEMBER
---------------
/dev/raw/raw13
/dev/raw/raw14
/dev/raw/raw15
/dev/raw/raw16
or
$ vi log.sql
set line 200
col group# for 999
col member for a20
select a.group#, a.member, b.bytes/1024/1024 MB, b.archived, b.SEQUENCE# "SEQ#", b.status
from v$logfile a, v$log b
where a.group#=b.group#
order by 1,2
/
SQL> @log
GROUP# MEMBER MB ARC SEQ# STATUS
------ -------------------- ----- --- ---------- ----------------
1 /dev/raw/raw13 50 NO 11 CURRENT
2 /dev/raw/raw14 50 YES 10 INACTIVE
3 /dev/raw/raw15 50 YES 3 INACTIVE
4 /dev/raw/raw16 50 NO 4 CURRENT
SQL> @dd
TABLESPACE_NAME MB FILE_NAME
--------------- ----- --------------------
SYSTEM 300 /dev/raw/raw6
UNDOTBS1 200 /dev/raw/raw18
SYSAUX 120 /dev/raw/raw7
UNDOTBS2 200 /dev/raw/raw19
USERS 5 /dev/raw/raw21
TS_NEW 19 /dev/raw/raw22
6 rows selected.
1. 양쪽노드 종료
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
2. dd 명령어로 복사
1) 필요한 각 파일을 아래의 형식으로 백업하면 된다.
[oracle@rac1 all]$ dd if=/dev/raw/raw10 of=/data/backup/all/raw10_contorolfile bs=8k
25600+0개의 레코드를 입력하였습니다
25600+0개의 레코드를 출력하였습니다
※ 명령어 형식
$ dd if=파일 of=복사할파일 if=복사될파일 bs=8k
→ $ cp a b 와 같은 형식이지만, raw device일 경우 사용하는 방법.
bs부분은 block size를 지정해주면 된다.(10g 기본 8k)
※ 스크립트 만들어서 일괄적으로 백업하기
$ vi backup.sh
dd if=/dev/raw/raw10 of=/data/backup/all/raw10_contorolfile bs=8k
dd if=/dev/raw/raw11 of=/data/backup/all/raw11_contorolfile bs=8k
dd if=/dev/raw/raw12 of=/data/backup/all/raw12_contorolfile bs=8k
dd if=/dev/raw/raw13 of=/data/backup/all/raw13_redo1_a bs=8k
dd if=/dev/raw/raw14 of=/data/backup/all/raw14_redo1_b bs=8k
dd if=/dev/raw/raw15 of=/data/backup/all/raw15_redo2_a bs=8k
dd if=/dev/raw/raw16 of=/data/backup/all/raw16_redo2_b bs=8k
dd if=/dev/raw/raw6 of=/data/backup/all/raw6_system bs=8k
dd if=/dev/raw/raw18 of=/data/backup/all/raw18_undotbs1 bs=8k
dd if=/dev/raw/raw7 of=/data/backup/all/raw7_sysaux bs=8k
dd if=/dev/raw/raw19 of=/data/backup/all/raw19_undotbs2 bs=8k
dd if=/dev/raw/raw21 of=/data/backup/all/raw21_users bs=8k
dd if=/dev/raw/raw22 of=/data/backup/all/raw22_ts_new bs=8k
:wq!
$ sh backup.sh
================== 끝
================== 시작
복구하기 형식
SQL> !dd if=/data/backup/all/raw22_ts_new of=/dev/raw/raw22 bs=8k
================== 끝
'Oracle > Oracle - RAC' 카테고리의 다른 글
RAC 리두로그,컨트롤파일 재생성할때. (0) | 2012.03.09 |
---|---|
RAC Extra - Single 노드로 복구시 ORA-38856 발생 (2) | 2012.03.09 |
RAC - Archive log mode 로 변경하기 (0) | 2012.03.08 |
RAC - VMware 환경, RAC 모드일때 디스크 추가하기 (1) | 2012.03.08 |
RAC 3 - RAC 구성 완료 후 테스트 하기 (1) | 2012.03.07 |