ヘッダーをスキップ
Oracle® Fusion Middlewareディザスタ・リカバリ・ガイド
11g リリース1(11.1.1)
B61394-04
  目次へ移動
目次
索引へ移動
索引

前
 
次
 

C Oracle Site Guardコマンドライン・インタフェース・リファレンス

Oracle Site Guardは、Enterprise Managerコマンドライン・インタフェース(EM CLI)を使用して、Site Guard構成をコマンドラインから直接管理するか、バッチ・プログラムまたはスクリプトから管理します。


注意:

EM CLIコマンドは大文字と小文字を区別するため、正しいEM CLI動詞を使用し、正しい入力を渡しているか確認してください。


この章では、Site Guardの構成に使用するすべてのEM CLI動詞を一覧表示します。


関連項目:

EM CLIの詳細は、『Oracle Enterprise Managerコマンドライン・インタフェース』を参照してください。


C.1 add_siteguard_script_hosts

ホストをSite Guard構成スクリプトに追加します。複数のホストを追加できます。

書式

emcli add_siteguard_script_hosts
         -script_id="script_id"
         -host_name="name1;name2;..." 
パラメータ 説明

-script_id

スクリプトに関連付けられるID。

-host_name

スクリプトに関連付けるホスト。複数のホスト名を指定できます。


例C-1 ホストの追加

emcli add_siteguard_script_hosts 
         -script_id="10" 
         -host_name ="BIHOST1;BIHOST2"

C.2 create_operation_plan

Oracle Site Guard操作の操作計画を作成します。

書式

emcli create_operation_plan
        -primary_system_name="name"
        -standby_system_name="name"
        -system_name="name"
        -operation="name"
        -name="name"
        -role=""role"
パラメータ 説明

-primary_system_name

プライマリ・サイトに関連付けられるシステムの名前。スイッチオーバーまたはフェイルオーバー操作には、このオプションを入力します。

-standby_system_name

スタンバイ・サイトに関連付けられるシステムの名前。スイッチオーバーまたはフェイルオーバー操作には、このオプションを入力します。

-system_name

システムの名前。起動または停止操作には、このオプションを入力します。

-operation

操作の機能。例: switchoverfailoverstartまたはstop

-name

操作計画の名前。

-role

操作(起動または停止)を実行する時に、システムに関連付けられるロール。


例C-2 操作計画の作成

emcli create_operation_plan 
                      -primary_system_name="BISystem1"
                      -standby_system_name="BISystem2"
                      -operation="switchover"
                      -name="BISystem1-switchover-plan"
emcli create_operation_plan 
                      -system_name="austin"
                      -operation="start"
                      -name="BISystem1-start-plan"
                      -role="Primary"

C.3 create_siteguard_configuration

Site Guardのサイト構成を作成します。システムおよびロールを関連付けます。

書式

emcli create_siteguard_configuration
                                              -primary_system_name="name"
                      -standby_system_name="name1;name2;..."
パラメータ 説明

-primary_system_name

プライマリ・サイトに関連付けられるシステムの名前。

-standby_system_name

スタンバイ・システムに関連付けられるシステムの名前。複数のオプションおよび複数のシステム名を指定できます。


例C-3 Site Guard構成の作成

emcli create_siteguard_configuration 
                      -primary_system_name="BISystem1"
                      -standby_system_name="BISystem2"

C.4 create_siteguard_credential_association

資格証明をサイト内のターゲットに関連付けます。

書式

emcli create_siteguard_credential_association
                                              -system_name="name"
                     [-target_name="name"]
                              -credential_type="type"
                      -credential_name="name"
                      -credential_owner="owner"

[]は、オプションのパラメータであることを示します。

パラメータ 説明

-system_name

システムの名前。

-target_name

ターゲットの名前。このパラメータはオプションです。

-credential_type

資格証明のタイプ。例: HostNormalHostPrivilegedWLSAdminまたはDatabaseSysdba

-credential_name

資格証明の名前。

-credential_owner

資格証明の所有者。


例C-4 Site Guard資格証明アソシエーションの作成

emcli create_siteguard_credential_association 
                      -system_name="BISystem1"
                      -credential_type="HostNormal"
                      -credential_name="HOST-SGCRED"
                      -credential_owner="sysman"

emcli create_siteguard_credential_association 
                      -system_name="BIsystem1"
                      -target_name="database-instance"
                      -credential_type="HostNormal"
                      -credential_name="HOST-DBCRED"
                      -credential_owner="sysman"

C.5 create_siteguard_script

スクリプト(前処理スクリプト、後処理スクリプトおよびストレージ・スクリプト)をSiteGuard構成に関連付けます。

書式

emcli create_siteguard_script
                                              -system_name="name"
                      -operation="name"
                      -script_type="type"
                             [-host_name=["name1;name2;..."]
                      -path="path"
                     [-all_hosts=["true or false"]
                     [-role=["role"]
パラメータ 説明

-system_name

システムの名前。

-operation

操作の名前。例: SwitchoverFailoverStartまたはStop

-script_type

スクリプトのタイプ。MountUnMountPre-ScriptPost-ScriptFailoverまたはSwitchoverを指定できます。

-host_name

このスクリプトを実行するホストの名前。

このパラメータはオプションで、2回以上指定できます。

-path

スクリプトのパス。

-all_hosts

スクリプトを、システム内のすべてのホストで実行できるようにするためのオプション・フラグ。このパラメータは、host_nameを無視します。例: trueまたはfalse

-role

システム・ロールに基づいたスクリプトを構成するためのオプション・フラグ。デフォルトでは、スクリプトは、特定のシステムのプライマリ・ロールおよびスタンバイ・ロールの両方に対して構成されます。例: PrimaryまたはStandby


例C-5 Site Guardスクリプトの作成

emcli create_siteguard_script 
                      -system_name="BISystem1"
                      -operation="Switchover"
                      -script_type="Pre-Script"
                      -path="/tmp/prescript"
                      -all_hosts="true"
                      -role="Primary"

emcli create_siteguard_script 
                      -system_name="BISystem1"
                      -operation="Switchover"
                      -script_type="Pre-Script"
                      -path="/tmp/prescript"
                      -host_name="BIHOST1"
                      -host_name="BIHOST2"

C.6 delete_operation_plan

Site Guard構成から指定された操作計画を削除します。

書式

emcli delete_operation_plan
        -name="plan_name"
パラメータ 説明

-name

削除する操作計画の名前を指定します。


例C-6 操作計画の削除

emcli delete_operation_plan 
                      -name="BISystem1-switchover"

C.7 delete_siteguard_configuration

Site Guard構成を削除します。指定されたシステムに関連する全体の構成(スクリプト、資格証明アソシエーション、サイト・アソシエーション、操作計画)および関連付けられているすべてのスタンバイ・システムは削除されます。

書式

emcli delete_siteguard_configuration
                                              -primary_system_name="name"
                      -standby_system_name="name"
パラメータ 説明

-primary_system_name

プライマリ・システムの名前。primary_system_nameまたはstandby_system_nameのいずれかを指定します。

-standby_system_name

スタンバイ・システムの名前。


例C-7 Site Guard構成の削除

emcli delete_siteguard_configuartion 
                      -primary_system_name="BISystem1"

emcli delete_siteguard_configuration
                      -standby_system_name="BISystem2"

C.8 delete_siteguard_credential_association

Site Guard構成から資格証明アソシエーションを削除します。

書式

emcli delete_siteguard_credential_association
                                              -system_name="name"
                     [-target_name=["name"]
                              -credential_type="type"
パラメータ 説明

-system_name

サービスが置かれているシステムを指定します。

-credential_type

資格証明のタイプを指定します。HostNormalHostPrivilegedWLSAdminまたはDatabaseSysdbaを指定できます。

-target_name

ターゲットの名前。このパラメータはオプションです。


例C-8 Site Guard資格証明アソシエーションの削除

emcli delete_siteguard_credential_association
                      -system_name="austin-system"
                      -credential_type="HostNormal"

emcli delete_siteguard_credential_association 
                      -system_name="austin-system"
                      -target_name="austin-database-instance"
                      -credential_type="HostNormal"

C.9 delete_siteguard_script

Site Guard構成から指定されたスクリプトを削除します。

書式

emcli delete_siteguard_script
                             -script_id="script id"
パラメータ 説明

-script_id

スクリプトに関連付けられるID


例C-9 Site Guardスクリプトの削除

emcli delete_siteguard_script 
                      -script_id="10"

C.10 delete_siteguard_script_hosts

ホストまたは特定のスクリプトと関連付けられたホストを削除します。

書式

emcli delete_siteguard_script_hosts
                            -script_id="script id"
    -host_name="name1;name2;..."
パラメータ 説明

-script_id

スクリプトに関連付けられるID

-host_name

このスクリプトを実行するホストの名前。

このパラメータは、2回以上指定できます。


例C-10 Site Guardスクリプト・ホストの削除

emcli delete_siteguard_script_hosts 
                      -script_id="10"
                      -host_name="BIHOST1"

C.11 get_operation_plan_details

指定された操作計画に関する手順ごとの詳細な情報を提供します。

書式

emcli get_operation_plan_details
                                             -name="plan name"
パラメータ 説明

-name

操作計画の名前。


例C-11 操作計画の詳細の取得

emcli get_operation_plan_details 
                      -name="BISystem1-switchover"

C.12 get_operation_plans

構成されたすべての操作計画を一覧表示します。

書式

emcli get_operation_plans
                            -name="operation plan_name"
    -operation="operation_name"
パラメータ 説明

-name

操作計画の名前を指定します。

-operation

操作の名前を指定します。例: switchoverfailoverstartまたはstop


例C-12 操作計画の取得

emcli get_operation_plans 
                      -name="austin-switchover"
                      -operation="switchover"

C.13 get_siteguard_configuration

Site Guard構成を提供します。

書式

emcli get_siteguard_configuration
                           [-primary_system_name={name of the primary system}]
   [-standby_system_name={name of the standby system}]
パラメータ 説明

-primary_system_name

プライマリ・システムの名前。このパラメータはオプションです。

-standby_system_name

スタンバイ・システムの名前。このパラメータはオプションです。


例C-13 Site Guard構成の取得

emcli get_siteguard_configuartion 
                      -primary_system_name="BISystem1"
                      -standby_system_name="BISystem2"

C.14 get_siteguard_credential_association

システムに構成された資格証明アソシエーションを一覧表示します。

書式

emcli get_siteguard_credential_association
                           -system_name="name of the system"
   [-target_name={name of the target}]
           [-credential_type={type of the credential}]
パラメータ 説明

-system_name

システムの名前。

-target_name

ターゲットの名前。このパラメータはオプションです。

-credential_type

資格証明のタイプ。HostNormalHostPrivilegedWLSAdminまたはDatabaseSysdbaを指定できます。

このパラメータはオプションです。


例C-14 Site Guard資格証明アソシエーションの取得

emcli get_siteguard_credential_association 
                      -system_name="austin-system"
                      -credential_type="HostNormal"

emcli create_siteguard_credential_association 
                      -system_name="austin-system"
                      -target_name="austin-database-instance"
                      -credential_type="HostNormal"

C.15 get_siteguard_script_hosts

スクリプトが実行されるように設計されたすべてのスクリプトに関連付けられたホストを一覧表示します。

書式

emcli get_siteguard_script_hosts
         -script_id="script id" 
パラメータ 説明

-script_id

スクリプトに関連付けられるID


例C-15 Site Guardスクリプト・ホストの取得

emcli get_siteguard_script_hosts 
         -script_id="10"

C.16 get_siteguard_scripts

指定されたシステムに関連付けられたSite Guardスクリプトを取得します。

書式

emcli get_siteguard_scripts
                            -system_name="system_name"
    -operation="operation_name"
   [-script_type={type of the script}]
   [-role={role of the system}]
パラメータ 説明

-system_name

システムの名前。

-operation

操作の名前。例: switchoverfailoverstartまたはstop

-script_type

スクリプトのタイプ。例: mountunmountpre-scriptpost-scriptfailoverまたはswitchover

-role

(プライマリ/スタンバイ)。システムに関連付けられたロールに基づいてスクリプトをフィルタ処理するオプションのパラメータ。例: PrimaryまたはStandby


例C-16 Site Guardスクリプトの取得

emcli get_siteguard_scripts
                      -system_name="BISystem1"
                      -operation="Switchover"
                      -script_type="Pre-Script"

emcli get_siteguard_scripts
                      -system_name="austin-system"
                      -operation="Switchover"
                      -script_type="Pre-Script"
                      -role="Primary"

C.17 run_prechecks

特定の操作計画に対する事前チェック操作を送信します。

書式

emcli run_prechecks
                           -operation_plan="name_operation plan"
パラメータ 説明

-operation_plan

操作計画の名前。


Example C-17 事前チェックの実行

emcli run_prechecks 
                      -operation_plan="BISystem1-switchover"

C.18 submit_operation_plan

指定された操作計画を送信して実行します。

書式

emcli submit_operation_plan
                            -name="name_operation plan"
   [-run_prechecks={true/false}]
パラメータ 説明

-name

操作計画の名前。

-run_prechecks

事前チェックを実行します(trueまたはfalse)。このパラメータはオプションです。


例C-18 操作計画の送信

emcli submit_operation_plan
                      -name="austin-switchover"
                      -run_prechecks="true"

C.19 update_operation_plan

特定の操作計画の任意の手順で、エラー・モードおよび実行モードを更新します。

書式

emcli update_operation_plan
                            -name="operation plan_name"
   [-step_number={step number}]
   [-target_host={host name}]
   [error_mode={error mode}]
   [enabled={true/false}]
パラメータ 説明

-name

操作計画の名前。

-step_number

更新する必要のある手順の数。

-target_host

システムの名前。このオプションを入力して、操作を開始または停止します。

-error_mode

操作の機能。例: stopまたはcontinue

-enabled



例C-19 操作計画の更新

emcli update_operation_plan
                      -name="austin-switchover"
                      -step_number="1"
                      -error_mode="Continue"
                      -enabled="true"

emcli update_operation_plan
                      -name="austin-switchover"
                      -target_host="myhost.domain.com"
                      -error_mode="Continue"
                      -enabled="true"

C.20 update_siteguard_configuration

Site Guard構成を更新して、スタンバイ・システムを追加します。1つのプライマリ・システムを、1つ以上のスタンバイ・システムに関連付けることができます。

書式

emcli update_siteguard_configuration
                            -primary_system_name="primary system_name"
    -standby_system_name="standby system_name"
パラメータ 説明

-primary_system_name

プライマリ・システムの名前。

-standby_system_name

スタンバイ・システムの名前。このパラメータは、2回以上指定できます。


例C-20 Site Guard構成の更新

emcli update_siteguard_configuartion 
                      -primary_system_name="BISystem1"
                      -standby_system_name="BISystem2"

注意:

サイト構成を更新する場合、「update_operation_plan」の説明に従って操作計画を更新する必要があります。


C.21 update_siteguard_credential_association

資格証明アソシエーションを更新します。

書式

emcli update_siteguard_credential_association
                            -system_name="name of the system"
   [-target_name={name of the target}]
            -credential_type="type of the credential"
    -credential_name="name of the credential"
    -credential_owner="credential owner"
パラメータ 説明

-system_name

システムの名前。

-target_name

ターゲットの名前。このパラメータはオプションです。

-credential_type

資格証明のタイプ。HostNormalHostPrivilegedWLSAdminまたはDatabaseSysdbaを指定できます。

-credential_name

資格証明の名前。

-credential_owner

資格証明の所有者。


例C-21 Site Guard資格証明アソシエーションの更新

emcli create_siteguard_credential_association 
                      -system_name="austin-system"
                      -credential_type="HostNormal"
                      -credential_name="HOST-SGCRED"
                      -credential_owner="sysman"

emcli create_siteguard_credential_association 
                      -system_name="austin-system"
                      -target_name="austin-database-instance"
                      -credential_type="HostNormal"
                      -credential_name="HOST-DBCRED"
                      -credential_owner="sysman"

C.22 update_siteguard_script

任意のスクリプトに関連付けられたパスおよびall_hostsフラグを更新します。

書式

emcli update_siteguard_script
    -script_id="ID associated with the script"
   [-path={path of the script}]
   [-all_hosts={flag to let script run on all the hosts in the system}]
パラメータ 説明

-script_id

スクリプトID。

-path

スクリプトのパス。

-all_hosts

スクリプトを、システム内のすべてのホストで実行できるようにするためのオプション・フラグ。例: trueまたはfalse


例C-22 Site Guardスクリプトの更新

emcli update_siteguard_script 
                      -script_id="10"
                      -path="/tmp/newprescript"
                      -all_hosts="true"