アップストリームおよびダウンストリーム・リカバリ・アプライアンスの構成

このタスクでは、バックアップ用のホスト固有のファイルを作成し、それぞれのホストにスクリプトをロードして、資格証明を検証します。

  1. アップストリーム・リカバリ・アプライアンスのホストで、次の内容のbackup_database_rahadr1.rmanテキスト・ファイルを作成します。
    {
    allocate channel rahadr1_sbt_1 device type sbt
      format '%d_%U'
      PARMS="SBT_LIBRARY=/u01/app/oracle/product/12.2.0.1/dbhome_1/lib/libra.so,
      ENV=(RA_WALLET='location=file:/u01/app/oracle/product/12.2.0.1/dbhome_1/dbs/zdlra
      credential_alias=dr_rahadr1')";
    
    allocate channel rahadr1_sbt_2 device type sbt
      format '%d_%U'
      PARMS="SBT_LIBRARY=/u01/app/oracle/product/12.2.0.1/dbhome_1/lib/libra.so,
      ENV=(RA_WALLET='location=file:/u01/app/oracle/product/12.2.0.1/dbhome_1/dbs/zdlra
      credential_alias=dr_rahadr1')";
    
    backup
      tag '&1'
      cumulative incremental level 1
      filesperset 1
      section size 64g
      database
        plus archivelog
          not backed up
          filesperset 32
          delete input;
    }
  2. ダウンストリーム・リカバリ・アプライアンスのホストで、次の内容のbackup_database_rahadr2.rmanテキスト・ファイルを作成します。
    {
    allocate channel rahadr2_sbt_1 device type sbt
      format '%d_%U'
      PARMS="SBT_LIBRARY=/u01/app/oracle/product/12.2.0.1/dbhome_1/lib/libra.so,
      ENV=(RA_WALLET='location=file:/u01/app/oracle/product/12.2.0.1/dbhome_1/dbs/zdlra
      credential_alias=dr_rahadr2')";
    
    allocate channel rahadr1_sbt_2 device type sbt
      format '%d_%U'
      PARMS="SBT_LIBRARY=/u01/app/oracle/product/12.2.0.1/dbhome_1/lib/libra.so,
      ENV=(RA_WALLET='location=file:/u01/app/oracle/product/12.2.0.1/dbhome_1/dbs/zdlra
      credential_alias=dr_rahadr2')";
    
    backup
      tag '&1'
      cumulative incremental level 1
      filesperset 1
      section size 64g
      database
        plus archivelog
          not backed up
          filesperset 32
          delete input;
    }
  3. まずRAHADR1のスクリプトの削除を試行して、それが存在しないことを確認してください。次に、HADR1スクリプトをリカバリ・アプライアンスRAHADR1にロードします。
    $ rman target / catalog /@dr_rahadr1
    
    RMAN> delete script backup_database;
    
    RMAN> create script backup_database from file
    '/home/oracle/backup_database_rahadr1.rman';
  4. まずRAHADR2のスクリプトの削除を試行して、それが存在しないことを確認してください。次に、HADR2スクリプトをリカバリ・アプライアンスRAHADR2にロードします。
    $ rman target / catalog /@dr_rahadr2
    
    RMAN> delete script backup_database;
    
    RMAN> create script backup_database from file
    '/home/oracle/backup_database_rahadr2.rman';
  5. 資格証明にデータベースへのアクセス権があることを確認してください。
    $ rman target / catalog /@dr_rahadr
    
    RMAN> print script backup_database;
    
    printing stored script: backup_database
    {
    allocate channel rahadr1_sbt_1 device type sbt
      format '%d_%U'
      PARMS="SBT_LIBRARY=/u01/app/oracle/product/12.2.0.1/dbhome_1/lib/libra.so,
      ENV=(RA_WALLET='location=file:/u01/app/oracle/product/12.2.0.1/dbhome_1/dbs/zdlra
      credential_alias=dr_rahadr1')";
    
    allocate channel rahadr1_sbt_2 device type sbt
      format '%d_%U'
      PARMS="SBT_LIBRARY=/u01/app/oracle/product/12.2.0.1/dbhome_1/lib/libra.so,
      ENV=(RA_WALLET='location=file:/u01/app/oracle/product/12.2.0.1/dbhome_1/dbs/zdlra
      credential_alias=dr_rahadr1')";
    
    backup
      tag '&1'
      cumulative incremental level 1
      filesperset 1
      section size 64g
      database
        plus archivelog
          not backed up
          filesperset 32
          delete input;
    }