Rman Syntax

@

コマンド・ファイルの読取りを行い、コマンド・ファイル内の各コマンドを順番に実行します。

insert the code here

@filename

archivelogRecordSpecifier

この副次句では、アーカイブREDOログの範囲を指定します。

ARCHIVELOG
{ ALL
| LIKE 'string_pattern'
| archlogRange [LIKE 'string_pattern' [THREAD [=] integer]]
}
 
{ { { UNTIL TIME | FROM TIME } [=] 'date_string'
  | { TIME BETWEEN 'date_string' AND
    | FROM TIME [=] 'date_string' UNTIL TIME [=]
    }
    'date_string'
  | UNTIL SCN [=] integer
  | SCN BETWEEN integer AND integer
  | FROM SCN [=] integer [UNTIL SCN [=] integer]
  }
  [THREAD [=] integer]
| { UNTIL SEQUENCE [=] integer
  | FROM SEQUENCE [=] integer [UNTIL SEQUENCE [=] integer]
  | SEQUENCE [BETWEEN integer AND] integer
  }
  [THREAD [=] integer]
}

BACKUP

データベース・ファイル、アーカイブ・ログ、バックアップおよびコピーのバックアップを作成します。

BACKUP
[ (
  (FULL | INCREMENTAL LEVEL [=] integer)
  | [ (FULL | INCREMENTAL LEVEL [=] integer) ]
  AS (COPY | BACKUPSET)
  | AS (COPY | BACKUPSET)
  (FULL | INCREMENTAL LEVEL [=] integer)
  )
]
[backupOperand [backupOperand]...] backupSpec [backupSpec]...
[PLUS ARCHIVELOG [backupSpecOperand [backupSpecOperand]...]];
backupOperand::=
{ FORMAT [=] 'format_string' [, 'format_string']...
| CHANNEL ['] channel_id [']
| CUMULATIVE
| MAXSETSIZE [=] integer [ K | M | G ]
| TAG [=] ['] tag_name [']
| keepOption
| SKIP { OFFLINE | READONLY | INACCESSIBLE }
| VALIDATE
| NOT BACKED UP [SINCE TIME [=] 'date_string']
| COPIES [=] integer
| DEVICE TYPE deviceSpecifier
.
.
.
}
backupSpec::=
[(]
{ BACKUPSET
  { {ALL | completedTimeSpec }
  | primary_key) [, primary_key]...
  }
| COPY OF { DATABASE
          | TABLESPACE ['] tablespace_name ['] [, ['] tablespace_name [']]...
          | DATAFILE datafileSpec [, datafileSpec]...
          }
| DATAFILE datafileSpec [, datafileSpec]...
| DATAFILECOPY 'filename' [, 'filename']...
| DATAFILECOPY FROM TAG [=] ['] tag_name ['] [, ['] tag_name [']]...
| DATAFILECOPY { ALL | LIKE 'string_pattern' }
| TABLESPACE ['] tablespace_name ['] [, ['] tablespace_name [']]...
| DATABASE
| archivelogRecordSpecifier
| CURRENT CONTROLFILE [FOR STANDBY]
| CONTROLFILECOPY 'filename'
| SPFILE
}
[backupSpecOperand [backupSpecOperand]...]
backupSpecOperand::=
{ FORMAT [=] 'format_string' [, 'format_string']...
| CHANNEL ['] channel_id [']
| CUMULATIVE
| MAXSETSIZE [=] integer [ K | M | G ]
| TAG [=] ['] tag_name [']
| keepOption
| SKIP { OFFLINE | READONLY | INACCESSIBLE }
| NOT BACKED UP [ SINCE TIME [=] 'date_string'
                | integer TIMES
                ]
| DELETE [ALL] INPUT
.
.
.
}

CHANGE

Recovery Managerリポジトリにあるバックアップまたはコピーの状態を更新します。

CHANGE
{ { BACKUP | COPY } [OF listObjList] [ maintQualifier [maintQualifier]...]
| archivelogRecordSpecifier
| recordSpec [DEVICE TYPE deviceSpecifier [, deviceSpecifier]...]
}
{ AVAILABLE | UNAVAILABLE | UNCATALOG | keepOption }
[DEVICE TYPE deviceSpecifier [, deviceSpecifier]...];

completedTimeSpec

COMPLETED
{ AFTER [=]
| BETWEEN 'date_string' AND | BEFORE [=] } 'date_string'

CONFIGURE

Recovery Managerの永続的な構成設定を変更します。

CONFIGURE
{ deviceConf
| backupConf
| { AUXNAME FOR DATAFILE datafileSpec
  | SNAPSHOT CONTROLFILE NAME
  }
  { TO 'filename' | CLEAR }
| cfauConf
};
deviceCon::=
{ DEFAULT DEVICE TYPE { TO deviceSpecifier | CLEAR }
| DEVICE TYPE deviceSpecifier { PARALLELISM integer | CLEAR }
| [AUXILIARY] CHANNEL [integer] DEVICE TYPE deviceSpecifier
  { allocOperandList | CLEAR }
}
allocOperandList::=
{ PARMS [=] 'channel_parms'
| FORMAT [=] 'format_string' [, 'format_string']...
| { MAXPIECESIZE [=] integer | RATE [=] integer } [ K | M | G ]
.
.
.
}...
connectStringSpec::=
['] [userid] [/ [password]] [@net_service_name] [']
backupConf::=
{ RETENTION POLICY { TO { RECOVERY WINDOW OF integer DAYS
                           | REDUNDANCY [=] integer
                           | NONE
                         }
                      | CLEAR
                    }
| MAXSETSIZE { TO { integer [ K | M | G ]
                    | UNLIMITED
                   }
               | CLEAR
              }
| { ARCHIVELOG | DATAFILE }
  BACKUP COPIES FOR DEVICE TYPE deviceSpecifier
  { TO integer | CLEAR }
| BACKUP OPTIMIZATION { ON | OFF | CLEAR }
| EXCLUDE FOR TABLESPACE tablespace_name [CLEAR]
}
cfauConf::==
CONTROLFILE AUTOBACKUP
{ ON
| OFF
| CLEAR
| FORMAT FOR DEVICE TYPE deviceSpecifier { TO 'format string' | CLEAR }
}

CROSSCHECK

バックアップ・ピース、プロキシ・コピーおよびディスク・コピーが存在しているかどうかをチェックします。

CROSSCHECK
{
  { BACKUP [OF listObjList]
  | COPY [OF listObjList]
  | archivelogRecordSpecifier
  } [maintQualifier [maintQualifier]...]
| recordSpec [DEVICE TYPE deviceSpecifier [, deviceSpecifier]...]
};
listObjList::=
[ DATAFILE datafileSpec [, datafileSpec]...
| TABLESPACE ['] tablespace_name ['] [, ['] tablespace_name [']]...
| archivelogRecordSpecifier
| DATABASE [SKIP TABLESPACE ['] tablespace_name ['] [, ['] tablespace_name [']]...]
| CONTROLFILE
| SPFILE
]...
recordSpec::=
{ { BACKUPPIECE | PROXY }
  { 'media_handle' [, 'media_handle']...
  | primary_key [, primary_key]...
  | TAG [=] ['] tag_name [']
  }
| BACKUPSET primary_key [, primary_key]...
| { CONTROLFILECOPY | DATAFILECOPY }
  { { primary_key [, primary_key]...
    | 'filename' [, 'filename']...
    }
  | TAG [=] ['] tag_name ['] [, ['] tag_name [']]...
  }
| ARCHIVELOG
  { primary_key [, primary_key]...
  | 'filename' [, 'filename']...
  }
}
datafileSpec
 
datafileSpec::=
{ 'filename'| integer }

DELETE

バックアップおよびコピーをディスクまたはテープ・メディアから削除し、それに応じてRecovery Managerリポジトリを更新します。

DELETE [FORCE] [NOPROMPT]
{ [EXPIRED]
  {
    { BACKUP [OF listObjList]
    | COPY   [OF listObjList]
    | archivelogRecordSpecifier
    } [maintQualifier [maintQualifier]...]
  | recordSpec [DEVICE TYPE deviceSpecifier [, deviceSpecifier]...]
  }
| OBSOLETE [obsOperandList]
  [DEVICE TYPE (deviceSpecifier [, deviceSpecifier]...]
};
obsOperandList::=
[ REDUNDANCY [=] integer | RECOVERY WINDOW OF integer DAYS ]...

deviceSpecifier

deviceSpecifier::=
{ DISK | ['] media_device ['] }

LIST

リポジトリに記録されているバックアップとコピーをリストします。

LIST
{ INCARNATION [OF DATABASE [['] database_name [']]]
| [EXPIRED]
  { listObjectSpec
    [ maintQualifier | RECOVERABLE [untilClause] ]...
  | recordSpec
  }
};
listObjectSpec::=
{ BACKUP [OF listObjList] [listBackupOption]
| COPY [OF listObjList]
| archivelogRecordSpecifier
}
listObjectList::=
[ DATAFILE datafileSpec [, datafileSpec]...
| TABLESPACE ['] tablespace_name ['] [, ['] tablespace_name [']]...
| archivelogRecordSpecifier
| DATABASE [SKIP TABLESPACE ['] tablespace_name [']
  [, ['] tablespace_name [']]...]
| CONTROLFILE
| SPFILE
]...
listBackupOption::=
[ [BY BACKUP] [VERBOSE]
| SUMMARY
| BY { BACKUP SUMMARY | FILE }
]
maintQualifier
 
{ TAG [=] ['] tag_name [']
| completedTimeSpec
| LIKE 'string_pattern'
| DEVICE TYPE deviceSpecifier [, deviceSpecifier]...
| BACKED UP integer TIMES TO DEVICE TYPE deviceSpecifier
}

RECOVER

Recovery Managerのバックアップおよびコピーからメディア・リカバリを実行します。

RECOVER [DEVICE TYPE deviceSpecifier [, deviceSpecifier]...]
recoverObject [recoverOptionList];
recoverObject::=
{ DATABASE
  [ untilClause
  | [untilClause] SKIP [FOREVER] TABLESPACE
    ['] tablespace_name ['] [, ['] tablespace_name [']]...
  ]
| TABLESPACE ['] tablespace_name ['] [, ['] tablespace_name [']]...
| DATAFILE datafileSpec [, datafileSpec]...
}
recoverOptionList::=
{ DELETE ARCHIVELOG [MAXSIZE {integer [K | M | G]}]
| CHECK READONLY
| NOREDO
| { FROM TAG | ARCHIVELOG TAG } [=] ['] tag_name [']
.
.
.
}...

REPORT

データベースのバックアップ状態(データベース内のファイル、バックアップが必要なファイル、および不要またはリカバリ不能になったバックアップ)をレポートします。

REPORT
{ { NEED BACKUP [ { INCREMENTAL | DAYS } [=] integer
                  | REDUNDANCY [=] integer
                  | RECOVERY WINDOW OF integer DAYS)
                  ]
  | UNRECOVERABLE
  }
  reportObject
| SCHEMA [atClause]
| OBSOLETE [obsOperandList]
}
[ DEVICE TYPE deviceSpecifier [,deviceSpecifier]... ]
reportObject::=
[ DATAFILE datafileSpec [, datafileSpec]...
| TABLESPACE ['] tablespace_name ['] [, ['] tablespace_name [']]...
| DATABASE [SKIP TABLESPACE ['] tablespace_name ['] [, ['] tablespace_name [']]...]
]
atClause::=
{ AT TIME [=] 'date_string'
| AT SCN [=] integer
| AT SEQUENCE [=] integer THREAD [=] integer
}
obsOperandList::=
[ REDUNDANCY [=] integer | RECOVERY WINDOW OF integer DAYS ]...

RESTORE

Recovery Managerのバックアップとコピーをリストアします。

RESTORE
[(] restoreObject [(restoreSpecOperand [restoreSpecOperand]...] [)]...
[ CHANNEL ['] channel_id [']
| PARMS [=] 'channel_parms'
| FROM { BACKUPSET | DATAFILECOPY }
| untilClause
| FROM TAG [=] ['] tag_name [']
| VALIDATE
| DEVICE TYPE deviceSpecifier [, deviceSpecifier]...
.
.
.
]...;
restoreObject::=
{ CONTROLFILE [TO 'filename']
| DATABASE
  [SKIP [FOREVER] TABLESPACE
   ['] tablespace_name ['] [, ['] tablespace_name [']]...
  ]
| DATAFILE datafileSpec [, datafileSpec]...
| TABLESPACE ['] tablespace_name ['] [, ['] tablespace_name [']]...
| archivelogRecordSpecifier
| SPFILE [TO [PFILE] 'filename']
}
restoreSpecOperand::=
{ CHANNEL ['] channel_id [']
| FROM TAG [=] ['] tag_name [']
| PARMS [=] 'channel_parms'
| FROM
  { AUTOBACKUP
    [{ MAXSEQ | MAXDAYS } [=] integer)]...
  | 'media_handle'
  }
}

RUN

一部のRecovery Managerコマンドは、RUNブロック内でのみ有効です。

[[/code]]

RUN {
  ...
}

SET

現行のRecovery Managerセッションにのみ適用する設定を作成します。

SET { set_rman_option [;] | set_run_option; }
set_rman_option::=
{ ECHO { ON | OFF }
| DBID [=] integer
| CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE deviceSpecifier TO 'frmt_string'
set_run_option::=
{ NEWNAME FOR DATAFILE datafileSpec TO { 'filename' | NEW }
| ARCHIVELOG DESTINATION TO 'log_archive_dest'
| untilClause
| COMMAND ID TO 'string'
| CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE deviceSpecifier TO 'frmt_string'
.
.
.
}

SHOW

現在使用可能になっているCONFIGUREコマンドを表示します。

SHOW
{ RETENTION POLICY
| [DEFAULT] DEVICE TYPE
| [AUXILIARY] CHANNEL [FOR DEVICE TYPE deviceSpecifier]
| MAXSETSIZE
| { DATAFILE | ARCHIVELOG } BACKUP COPIES
| BACKUP OPTIMIZATION
| SNAPSHOT CONTROLFILE NAME
| AUXNAME
| EXCLUDE
| CONTROLFILE AUTOBACKUP [FORMAT]
| ALL
};
untilClause
 
{ UNTIL TIME [=] 'date_string'
| UNTIL SCN [=] integer
| UNTIL SEQUENCE [=] integer THREAD [=] integer
}