사용자 도구

사이트 도구


study:oracle:10gadminii:configuringrecoverymanager

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
study:oracle:10gadminii:configuringrecoverymanager [2008/03/22 23:31]
starlits
study:oracle:10gadminii:configuringrecoverymanager [2008/03/23 02:10] (현재)
starlits
줄 80: 줄 80:
 ^ Privileges given to users | Database : SYSDBA \\ Operation System : Access to devices | ^ Privileges given to users | Database : SYSDBA \\ Operation System : Access to devices |
 ^ Remote operations | 패스워드파일 설정 \\ 패스워드파일 백업 | ^ Remote operations | 패스워드파일 설정 \\ 패스워드파일 백업 |
 +
  
 ===== Connection Types with RMAN ===== ===== Connection Types with RMAN =====
 {{study:oracle:10gadminii:connectiontypeswithrman.jpg|}} {{study:oracle:10gadminii:connectiontypeswithrman.jpg|}}
 +
 +^ Target Database | SYSDBA 권한으로 TARGET Database에 접속된다 |
 +^ Recovery Catalog Database | RMAN Repository가 구성된 Optional Database |
 +^ Auxiliary Database | Standby Database : Disaster(대참사) Recovery에 사용되어 질 수 있는 현재 운영중인 데이타베이스의 복사본 \\ Duplicate Database : RMAN DUPLICATE 명령으로 생성된 데이타베이스 \\ TSPITR Instance : 인스턴스를 시간 단위로 테이블 스페이스를 복구 |
 +
  
 ===== Starting RMAN ===== ===== Starting RMAN =====
 +
 +
 +==== Local ====
 +  - Unix <code bash>
 +$ export ORACLE_SID=ADMINDB
 +$ rman target system/password
 +</code>
 +  - Windows <code>
 +C:\> set ORACLE_SID=ADMINDB
 +C:\> rman target /
 +</code>
 +  - NOCATALOG 모드 (기본이 NOCATALOG 모드이다) \\ OS 인증으로 local에서 SYS 사용자로 Target Database를 연결할 수 있다. <code>
 +$ rman target / (nocatalog)
 +</code>
 +
 +==== Remote ====
 +  - 원격에서 실행 <code>
 +rman target sys/password@ADMINDB
 +</code>
 +
  
 ===== Additional RMAN Command Line Arguments ===== ===== Additional RMAN Command Line Arguments =====
 +
 +
 +==== Writing RMAN output to a logfile ====
 +
 +  - **LOG Filename** argument
 +    - RMAN 출력이 기록될 파일을 지정
 +    - 지정하지 않으면 메세지 로그파일이 Standard output에 기록된다.
 +    - 지정한 파일을 열 수 없을 경우에도 Standard output에 기록된다.
 +  - **APEND** keyword 
 +    - 같은 파일이름이 있으면 파일에 덧붙여 쓰여진다.
 +    - 이 옵션을 지정하지 않으면 같은 파일이 있을때 overwrite 한다.
 +  -  예제 <code>
 +$ rman target sys/password 
 +  LOG $HOME/ORADATA/rman.log APPEND
 +</code>
 +
 +==== Executing a command file when RMAN is invoked ====
 +
 +  - RMAN command 를 포함하는 파일을 실행한다.
 +  - 파일이름의 첫글자가 알파벳이면 ' 를 생략할 수 있다.
 +  - 명령어 형식은 아래와 같다 <code> CMDFILE 'filename' </code> or <code> @'filename'</code>
 +  -  예제 <code>
 +$ rman target sys/password
 +  LOG $HOME/ORADATA/rman.log APPEND
 +  @'$HOME/ORADATA/rman_script.rcv'
 +</code>
 +
 +==== Establishing database connections on RMAN startup ====
 +  - RMAN 실행시 데이타베이스 연결방식
 +
 +^ AUXILIARY | auxiliary database를 연결 |
 +^ CATALOG | recovery catalog를 포함한 데이타베이스 연결 |
 +^ NOCATALOG | recovery catalog 없이 RMAN 을 사용 |
 +^ TARGET | Target database에 연결 |
 +
 +  - 예제 <code>
 +$ rman TARGET SYS/sys_pwd@orcl CATALOG
 +rman/rman@rcat AUXILIARY sys/aux_pwd@aux1
 +</code>
 +
  
 ===== Configuring Persistent Settings for RMAN ===== ===== Configuring Persistent Settings for RMAN =====
 +
 +  - RMAN 은 기본 구성값을 가지고 미리 설치(preset) 되었다.
 +  - CONFIGURE 명령어
 +    - 자동 채널 구성
 +    - 백업 주기 정책
 +    - 백업본 수
 +    - BACKUPSET 이나 COPY의 백업종류
 +    - backup sets 의 크기 제한
 +    - 백업에서 테이블스페이스 면제(exempt)
 +    - 백업 최적화 활성/비활성
 +    - Control files의 자동백업 구성
 +
  
 ===== Configuring RMAN Settings Using EM ===== ===== Configuring RMAN Settings Using EM =====
 +
 +  - 위치 : **Maintenance** -> **Configure Backup Settings**
 +
  
 ===== Control File Autobackups ===== ===== Control File Autobackups =====
 +
 +  - 콘트롤파일 자동백업 <code> RMAN> CONFIGURE CONTROLFILE AUTOBACKUP ON; </code> 
 +  - 콘트롤파일 자동백업 기본 포멧 변경 <code>
 +CONFIGURE CONTROLFILE AUTOBACKUP FORMAT
 +FOR DEVICE TYPE DISK TO '/u01/oradata/cf_ORCL_auto_%F';
 +</code>
 +
  
 ===== Retention Policies ===== ===== Retention Policies =====
 +
 +  - 백업 유지 정책
 +  - 2가지 유지 정책
 +    - Recovery window : 7일로 설정했다면 7일 전으로 되돌아 갈 수 있어야 한다. \\ 그러기 위해서는 백업은 7일 이전의 것이 필요할 수도 있다. \\ (하나만 보존함)
 +    - Redundancy : 지정된 갯수 이상의 백업 또는 복사본은 보존할 필요가 없음
 +  - 이들 정책은 상호배타적(mutually exclusive)이며 CONFIGURE 명령으로 설정할 수 있다.
  
 ===== Managing Persistent Settings ===== ===== Managing Persistent Settings =====
 +
 +==== 현재 상태 보기 (SHOW) ====
 +
 +<code>
 +RMAN> SHOW CONTROLFILE AUTOBACKUP FORMAT;
 +RMAN> SHOW EXCLUDE;
 +RMAN> SHOW ALL;
 +</code>
 +
 +==== 지속적인 재설정 (CLEAR) - 기본값 ====
 +<code>
 +RMAN> CONFIGURE BACKUP OPTIMIZATION CLEAR;
 +RMAN> CONFIGURE MAXSETSIZE CLEAR;
 +RMAN> CONFIGURE DEFAULT DEVICE TYPE CLEAR;
 +</code>
  
  
 ===== Channel Allocation ===== ===== Channel Allocation =====
 {{study:oracle:10gadminii:channelallocation.jpg|}} {{study:oracle:10gadminii:channelallocation.jpg|}}
 +
 +  - 채널은 device type에 대한 단일 데이타 스트림을 나타낸다.
 +  - 채널은 반드시 백업, 복구명령을 실행하기 전에 할당되어 있어야 한다.
 +  - 할당된 각 채널은 해당 인스턴스에서 Sever Sessions을 시작하여 RMAN executable 에서 Auxiliary Database로 접속을 설정한다.
 +  - Only one RMAN session communicates with allocated server sessions;
 +
  
 ===== Automatic and Manual Channel Allocation ===== ===== Automatic and Manual Channel Allocation =====
 +
 +==== Automatic Channel Allocation ====
 +
 +  - 자동 채널 할당된 default device type 변경 <code>
 +RMAN> CONFIGURE DEFAULT DEVICE TYPE TO sbt;
 +</code>
 +  - RMAN provides a preconfigured DISK channel that you can use for backups and copies to disk.
 +
 +==== Manual Channel Allocation ====
 +  - 수동 채널 할당 <code>
 +RMAN> RUN {
 +2> ALLOCATE CHANNEL c1 DEVICE TYPE disk;
 +3> BACKUP DATAFILE '/u01/oradata/user01.dbf';
 +4> }
 +</code>
 +  - ALLOCATE CHANNEL command with a RUN
 +  - ALLOCATE CHANNEL FOR MAINTENANCE command
 +  - 수동 채널 할당은 자동 채널 할당을 overwrite 한다.
 +
  
 ===== Channel Control Options ===== ===== Channel Control Options =====
 +
 +==== Configure paralllism ====
 +<code> RMAN> CONFIGURE DEVICE TYPE DISK PARALLELISM 3; </code>
 +
 +
 +==== Specify the maximum backup piece size ====
 +<code> RMAN> CONFIGURE CHANNEL DEVICE TYPE DISK MAXPIECESIZE 2G; </code>
 +
 +
 +==== Format the name of generated backup files ====
 +<code>
 +RMAN> RUN {
 +2> ALLOCATE CHANNEL d1 DEVICE TYPE DISK
 +3> FORMAT '/disk1/backups/%U';
 +4> BACKUP DATABASE PLUS ARCHIVELOG; }
 +</code>
 +
 +
  
 ===== Summary ===== ===== Summary =====
 +  * 정리해보면
 +  - RMAN Repository 와 Recovery Catalog 를 설명할 수 있다.
 +  - **CONFIGURE** 를 이용하여 RMAN 기본설정을 변경할 수 있다.
 +  - 자동 채널 할당을 실행할 수 있다.
  
 ===== Practice Overview: Configuring RMAN ===== ===== Practice Overview: Configuring RMAN =====
  
study/oracle/10gadminii/configuringrecoverymanager.1206196314.txt.gz · 마지막으로 수정됨: 2008/03/22 23:31 저자 starlits