오 라 클 9i 의 새로운 특징 - SFFILE 사용

Oracle 9i 새로운 특징: SPFILE 사용
--How to backup and restore spfile and controlfile using autobackup option
Last Updated: Wednesday, 2004-10-27 0:40 Eygle     
 
본 고 는 itpub 기술 총서 인 에 발표 되 었 으 며 허가 없 이 본 고 를 전재 하 는 것 을 금지한다.
원문의 출처:
http://www.eygle.com/faq/Oracle9i.New.Feature.Spfile.04.htm
6. SPFILE 백업 및 복구
본 논문 에서 언급 한 바 와 같이 Oracle 은 Spfile 도 Rman 의 백업 복구 전략 에 포함 시 켰 다. 만약 에 제어 파일 자동 백업 (autoback) 을 설정 하면 Oracle 은 데이터 베이스 에 중대 한 변화 (예 를 들 어 증감 표 공간) 가 발생 할 때 자동 으로 제어 파일 과 Spfile 파일 의 백업 을 할 것 이다.
다음은 이 과정 을 살 펴 보 겠 습 니 다. a. 제어 파일 자동 백업 설정:
[oracle@jumper oracle]$ rman target /
Recovery Manager: Release 9.2.0.3.0 - Production
Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
connected to target database: HSJF (DBID=1052178311)
RMAN> CONFIGURE CONTROLFILE AUTOBACKUP ON;
using target database controlfile instead of recovery catalogold RMAN configuration parameters:CONFIGURE CONTROLFILE AUTOBACKUP OFF;new RMAN configuration parameters:CONFIGURE CONTROLFILE AUTOBACKUP ON;new RMAN configuration parameters are successfully stored
RMAN> exit
이 설정 은 데이터베이스 에서 다음 과 같은 방식 으로 조회 할 수 있 습 니 다.


[oracle@jumper bdump]$ sqlplus "/ as sysdba"
SQL*Plus: Release 9.2.0.3.0 - Production on Sat Jan 17 01:08:05 2004
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:Oracle9i Enterprise Edition Release 9.2.0.3.0 - ProductionWith the Partitioning, OLAP and Oracle Data Mining optionsJServer Release 9.2.0.3.0 - Production
SQL> select * from v$rman_configuration;CONF# NAME VALUE---------- ------------------------- ----------1 CONTROLFILE AUTOBACKUP ON
 
                        

 
b. 데이터베이스 변화 기록
 

SQL> create tablespace eygle 2 datafile '/data1/oracle/oradata/eygle01.dbf'3 size 5M;
Tablespace created.
 
                        

 
표 공간 을 새로 만 들 면 alert < sid >. log 파일 을 검사 하면 이러한 백업 정 보 를 발견 할 수 있 습 니 다.

Sat Jan 17 00:55:57 2004
Starting control autobackup
Control autobackup written to DISK device
handle '/opt/oracle/product/9.2.0/dbs/c-1052178311-20040117-00'
Completed: create tablespace eygle
datafile '/data1/oracle/oradata/eygle01.dbf’

rman 을 사용 하여 백업 을 하면 알림 에서 다음 과 같은 정 보 를 볼 수 있 습 니 다.


RMAN> configure controlfile autobackup on;
old RMAN configuration parameters:CONFIGURE CONTROLFILE AUTOBACKUP OFF;new RMAN configuration parameters:CONFIGURE CONTROLFILE AUTOBACKUP ON;new RMAN configuration parameters are successfully stored
RMAN> run2> {3> allocate channel ch1 type disk format='e:/oracle/orabak/penny%t.arc';4> backup archivelog all delete all input;5> release channel ch1;6> }
allocated channel: ch1channel ch1: sid=13 devtype=DISK
Starting backup at 02-DEC-03current log archivedchannel ch1: starting archive log backupsetchannel ch1: specifying archive log(s) in backup setinput archive log thread=1 sequence=63 recid=168 stamp=511712617input archive log thread=1 sequence=64 recid=169 stamp=511712620input archive log thread=1 sequence=65 recid=170 stamp=511712626input archive log thread=1 sequence=66 recid=171 stamp=511712690channel ch1: starting piece 1 at 02-DEC-03channel ch1: finished piece 1 at 02-DEC-03piece handle=E:/ORACLE/ORABAK/PENNY511712693.ARC comment=NONEchannel ch1: backup set complete, elapsed time: 00:00:03channel ch1: deleting archive log(s)archive log filename=E:/ORACLE/ORADATA/PENNY/ARCHIVE/1_63.DBF recid=168 stamp=511712617archive log filename=E:/ORACLE/ORADATA/PENNY/ARCHIVE/1_64.DBF recid=169 stamp=511712620archive log filename=E:/ORACLE/ORADATA/PENNY/ARCHIVE/1_65.DBF recid=170 stamp=511712626archive log filename=E:/ORACLE/ORADATA/PENNY/ARCHIVE/1_66.DBF recid=171 stamp=511712690Finished backup at 02-DEC-03
Starting Control File and SPFILE Autobackup at 02-DEC-03piece handle=E:/ORACLE/ORA92/DATABASE/C-3627775766-20031202-01 comment=NONEFinished Control File and SPFILE Autobackup at 02-DEC-03
released channel: ch1
 
                        

자동 백업 제어 파일 및 spfile 파일 의 형식 및 이름 규칙 을 간단히 살 펴 보 겠 습 니 다.
 
c. spfile 파일 을 자동 백업 으로 복원 합 니 다.


 
[oracle@jumper bdump]$ rman target /
Recovery Manager: Release 9.2.0.3.0 - Production
Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
connected to target database: HSJF (DBID=1052178311)
RMAN> restore spfile to '/tmp/spfileeygle.ora' from autobackup;
Starting restore at 17-JAN-04
using target database controlfile instead of recovery catalogallocated channel: ORA_DISK_1channel ORA_DISK_1: sid=18 devtype=DISKchannel ORA_DISK_1: looking for autobackup on day: 20040117channel ORA_DISK_1: autobackup found: c-1052178311-20040117-01channel ORA_DISK_1: SPFILE restore from autobackup completeFinished restore at 17-JAN-04
RMAN> exit
Recovery Manager complete.[oracle@jumperbdump] $ls - l / tmp / spfileeygle. ora - rw - r --- 1 oracle dba 3584 1 월 17 09: 34 / tmp / spfileeygle. ora
 
                        

당신 역시 이러한 방법 을 통 해 제어 파일 을 복원 할 수 있 습 니 다. 예 는 다음 과 같 습 니 다.


 
[oracle@jumper bdump]$ rman target /
Recovery Manager: Release 9.2.0.3.0 - Production
Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
connected to target database: HSJF (DBID=1052178311)
RMAN> restore controlfile to '/tmp/control01.ctl' from autobackup;
Starting restore at 17-JAN-04
using target database controlfile instead of recovery catalogallocated channel: ORA_DISK_1channel ORA_DISK_1: sid=10 devtype=DISKchannel ORA_DISK_1: looking for autobackup on day: 20040117channel ORA_DISK_1: autobackup found: c-1052178311-20040117-02channel ORA_DISK_1: controlfile restore from autobackup completeFinished restore at 17-JAN-04
RMAN> exit
Recovery Manager complete.[oracle@jumperbdump] $ls - l / tmp / control * - rw - r --- 1 oracle dba 1892352 1 월 17 09: 44 / tmp / control01. ctl
 
                        

Oracle 9i 자동 백업 제어 파일 의 기능 은 우리 에 게 큰 수익 을 가 져 다 주 었 습 니 다. 자동 백업 을 통 해 데이터 베이스 에 긴급 상황 이 발생 했 을 때 이 자동 백업 에서 더욱 효과 적 이 고 신속 한 제어 파일 을 얻 을 수 있 습 니 다.
부족 한, 이 자동 백업 기능 은 닫 힌 것 입 니 다. 당신 은 우리 가 위 에서 언급 한 방법 으로 이 기능 을 열 수 있 습 니 다.
 
< < 이전 페이지 다음 페이지 > >
본 논문 의 저자: eygle, Oracle 기술 관심 자, 중국 최대 의 Oracle 기술 포럼 itpub. www. eygle. com 은 작가 의 개인 사이트 입 니 다. Guoqiang 을 통 해[email protected]작가 에 게 연락 하 세 요. 기술 탐구 교류 와 링크 교환 을 환영 합 니 다.
원문의 출처:
http://www.eygle.com/faq/Oracle9i.New.Feature.Spfile.04.htm

좋은 웹페이지 즐겨찾기