プライマリ・コンテンツに移動
Oracle® Enterprise Manager Cloud Control管理者ガイド
13c リリース3
E98542-01
目次へ移動
目次
索引へ移動
索引

前
前へ
次
次へ

20.5 クロス・プラットフォームのEnterprise Managerリポジトリの移行

Enterprise Managerリポジトリをサーバー間およびクロス・プラットフォームで移行するためのユーザー要件があります。

Enterprise Managerリポジトリ移行プロセスは、データベース移行の場合と完全に同じではありません。Enterprise Managerリポジトリ移行の場合、Enterprise Managerに固有のデータ、オプション、前提条件に注意してリポジトリを移動する必要があります。Enterprise ManagerとOracleデータベースの両方の観点からデータの整合性が維持されることを確認する必要があります。

このためには、最短時間で最大効率が得られる、正常で信頼性の高いリポジトリの移行を行うためにエンド・ユーザーが従うプロセスを定義する必要があります。

移行の全体の戦略は次の内容によって異なります。

ソースとターゲットがリリース12c以外の場合、クロス・プラットフォームでデータを移行する方法はエクスポート/インポートのみになります。

クロス・プラットフォームのトランスポータブル表領域、データ・ポンプ、エクスポート/インポートのオプションの詳細は、Oracle Technology Network (OTN)または『Oracle Database管理者ガイド』を参照してください。

20.5.1 一般的な前提条件

次に、リポジトリを移行するための一般的な前提条件を示します。

  • ソースとターゲットのデータベースは、同じ文字セットを使用し、同じリリースにします。

  • ソース・データベースとターゲット・データベースのプラットフォームは同じエンディアン形式である必要があります。

  • ターゲットのデータベースは、Oracle Enterprise Managerインストレーション・ガイドに示されたEnterprise Managerリポジトリのソフトウェア要件について言及されたすべての前提条件を満たす必要があります。

  • ソースとターゲットのデータベースが10gR2およびそれ以上のrdbmsバージョンにある場合、その他の前提条件を満たしているならば、クロス・プラットフォーム・リポジトリ移行に、クロス・プラットフォーム・トランスポータブル・データベース移行を使用できます。

  • 同じ名前の表領域がすでにあるターゲット・データベースに表領域をトランスポートすることはできません。ただし、トランスポート操作前に、トランスポートする表領域またはトランスポート先の表領域の名前を変更できます。

  • トランスポータブル表領域セットを別のプラットフォームのOracle Databaseにプラグインするには、両方のデータベースの互換性を最低でもリリース10.0に設定する必要があります。

  • ほとんどのプラットフォーム(ただしすべてではない)は、クロス・プラットフォームの表領域トランスポートがサポートされています。V$TRANSPORTABLE_PLATFORMビューに問合せを実行して、サポートされるプラットフォームを確認したり、そのプラットフォームIDやエンディアン形式(バイト順序)を判断したりすることができます。

  • ソースと移行先のホストでは、Enterprise Managerの管理エージェントが実行され、移行するインスタンスのために構成されている必要があります。

  • ターゲット・データベースにEnterprise Managerリポジトリがインストールされている場合、ターゲット・データベースに関連する手順を行う前に、RepManagerを使用してEMリポジトリを最初に削除する必要があります。

20.5.2 手法

次の項では、リポジトリ移行の2つの手順について説明します。

20.5.2.1 クロス・プラットフォーム・トランスポータブル・データベースの使用方法

Oracleのトランスポータブル・データベース機能では、Oracleデータベース間でユーザー表領域をすばやく移動できます。この方法は、データベース間で大量データを移動するのに最も効率的です。クロス・プラットフォーム・トランスポータブル・データベースを使用すると、プラットフォーム間で表領域をトランスポートできます。

クロス・プラットフォームのトランスポータブル・データベースでは、プラットフォームから別のプラットフォームにデータベースを移行できます(データ・ポンプまたはインポート/エクスポートで使用)。次のトランスポータブル・データベースを使用した移行手順は、同じエンディアンのプラットフォーム間での移行に使用できます。

  1. v$db_transportable_platformから宛先プラットフォームで移行が可能かどうかを確認します。

    SQL> select platform_name from v$db_transportable_platform;

    次のリストのようなプラットフォームのリストが表示されます。

    Microsoft Windows IA (32-bit)
    Linux IA (32-bit)
    HP Tru64 UNIX
    Linux IA (64-bit)
    HP Open VMS
    Microsoft Windows IA (64-bit)
    Linux x86 64-bit
    Microsoft Windows x86 64-bit
    Solaris Operating System (x86)
    HP IA Open VMS
    Solaris Operating System (x86-64)
    
  2. 外部表およびファイルがデータベースに存在することを確認します。
    SQL> set serveroutput on
    SQL> declare x boolean;
      2  begin x := dbms_tdb.check_external;
      3  end;
      4  /

    出力結果は、次のようになります。

    The following external tables exist in the database:
    SH.SALES_TRANSACTIONS_EXT
    The following directories exist in the database:
    SYS.SUBDIR, SYS.SS_OE_XMLDIR, SYS.MEDIA_DIR, SYS.LOG_FILE_DIR,
    SYS.DATA_FILE_DIR, SYS.XMLDIR, SYS.DATA_PUMP_DIR, SYS.ORACLE_OCM_CONFIG_DIR
    The following BFILEs exist in the database:
    PM.PRINT_MEDIA
    

    次のコマンドを入力します。

    SQL> select directory_path from dba_directories;

    出力結果は、次のようになります。

    DIRECTORY_PATH
    --------------------------------------------------------------------------------
    /home/oracle/app/oracle/product/11.2.0/dbhome_1/demo/schema/order_entry//2002/Sep
    /home/oracle/app/oracle/product/11.2.0/dbhome_1/demo/schema/order_entry/
    /home/oracle/app/oracle/product/11.2.0/dbhome_1/demo/schema/log/
    /home/oracle/app/oracle/product/11.2.0/dbhome_1/demo/schema/sales_history/
    /ade/b/1191423112/oracle/rdbms/xml
    /home/oracle/app/oracle/product/11.2.0/dbhome_1/demo/schema/product_media/
    /home/oracle/app/oracle/admin/orcl/dpdump/
    /home/oracle/app/oracle/product/11.2.0/dbhome_1/ccr/state
     
    8 rows selected.
    

    次のコマンドを入力します。

    SQL> select directory_path||'/'||location External_file_path from dba_directories a, dba_external_locations b where a.directory_name=b.directory_name;

    出力結果は、次のようになります。

    EXTERNAL_FILE_PATH
    ----------------------------------------------------------------------------
    /home/oracle/app/oracle/product/11.2.0/dbhome_1/demo/schema/sales_history//sale1v3.dat
    

    次のコマンドを入力します。

    SQL> @tgt_get_bfile_dirs.sql

    出力結果は、次のようになります。

    The following directories contain external files for BFILE columns
    Copy the files within these directories to the same path on the target system
     
    /home/oracle/app/oracle/product/11.2.0/dbhome_1/demo/schema/product_media/
     
    There are 1 directories, 4 total BFILEs
     
    SQL> @tgt_get_bfiles.sql
    External files for BFILE column AD_GRAPHIC in table PM.PRINT_MEDIA
    /home/oracle/app/oracle/product/11.2.0/dbhome_1/demo/schema/product_media//monitor.jpg
    /home/oracle/app/oracle/product/11.2.0/dbhome_1/demo/schema/product_media//mousepad.jpg
    /home/oracle/app/oracle/product/11.2.0/dbhome_1/demo/schema/product_media//keyboard.jpg
    /home/oracle/app/oracle/product/11.2.0/dbhome_1/demo/schema/product_media//modem.jpg
    
    
  3. OMSを停止します。

    emctl stop oms -all

    次のSQLコマンドを入力します。

    SQL> shutdown immediate
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
     
    SQL> startup mount;
    ORACLE instance started.
     
    Total System Global Area 1473089536 bytes
    Fixed Size                  1336596 bytes
    Variable Size            1124076268 bytes
    Database Buffers          335544320 bytes
    Redo Buffers               12132352 bytes
    Database mounted.
    
  4. データベースを読取り専用モードでオープンします。

    SQL> alter database open read only;

    次のSQLコマンドを入力します。

    SQL> set serveroutput on
    SQL> declare
      2  retcode boolean;
      3  begin
      4  retcode := dbms_tdb.check_db('Linux IA (64-bit)',dbms_tdb.skip_none);
      5  end;
      6  /
     
    SQL> declare
      2  retcode boolean;
      3  begin
      4  retcode := dbms_tdb.check_db('Linux x86 64-bit',dbms_tdb.skip_none);
      5  end;
      6  /
     
    PL/SQL procedure successfully completed.
    
  5. RMAN変換スクリプトを生成します。
    [oracle]$ ./rman
    Recovery Manager: Release 11.2.0.1.0 - Production on Fri dd-mm-yy 12:10:29 2012
    Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
    RMAN> connect target /
    connected to target database: ORCL (DBID=1308105793)
    RMAN> convert database on target platform
    2> convert script '/tmp/convert_mydb.rman'
    3> transport script '/tmp/transport_mydb.sql'
    4> new database 'mydb'
    5> format '/tmp/mydb%U'
    6> db_file_name_convert '/home/oracle/app/oracle/oradata/mydb/','/tmp';
     
    Starting conversion at source at dd-mm-yy
    using target database control file instead of recovery catalog
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID=135 device type=DISK
     
    External table SH.SALES_TRANSACTIONS_EXT found in the database
     
    Directory SYS.SUBDIR found in the database
    Directory SYS.SS_OE_XMLDIR found in the database
    Directory SYS.MEDIA_DIR found in the database
    Directory SYS.LOG_FILE_DIR found in the database
    Directory SYS.DATA_FILE_DIR found in the database
    Directory SYS.XMLDIR found in the database
    Directory SYS.DATA_PUMP_DIR found in the database
    Directory SYS.ORACLE_OCM_CONFIG_DIR found in the database
     
    BFILE PM.PRINT_MEDIA found in the database
     
    User SYS with SYSDBA and SYSOPER privilege found in password file
    channel ORA_DISK_1: starting to check datafiles
    input datafile file number=00001 name=/home/oracle/app/oracle/oradata/orcl/system01.dbf
    channel ORA_DISK_1: datafile checking complete, elapsed time: 00:00:00
    channel ORA_DISK_1: starting to check datafiles
    input datafile file number=00002 name=/home/oracle/app/oracle/oradata/orcl/sysaux01.dbf
    channel ORA_DISK_1: datafile checking complete, elapsed time: 00:00:00
    channel ORA_DISK_1: starting to check datafiles
    input datafile file number=00007 name=/home/oracle/app/oracle/oradata/orcl/mgmt.dbf
    channel ORA_DISK_1: datafile checking complete, elapsed time: 00:00:00
    channel ORA_DISK_1: starting to check datafiles
    input datafile file number=00003 name=/home/oracle/app/oracle/oradata/orcl/undotbs01.dbf
    channel ORA_DISK_1: datafile checking complete, elapsed time: 00:00:00
    channel ORA_DISK_1: starting to check datafiles
    input datafile file number=00008 name=/home/oracle/app/oracle/oradata/orcl/mgmt_ad4j.dbf
    channel ORA_DISK_1: datafile checking complete, elapsed time: 00:00:00
    channel ORA_DISK_1: starting to check datafiles
    input datafile file number=00005 name=/home/oracle/app/oracle/oradata/orcl/example01.dbf
    channel ORA_DISK_1: datafile checking complete, elapsed time: 00:00:00
    channel ORA_DISK_1: starting to check datafiles
    input datafile file number=00006 name=/home/oracle/app/oracle/oradata/orcl/mgmt_depot.dbf
    channel ORA_DISK_1: datafile checking complete, elapsed time: 00:00:00
    channel ORA_DISK_1: starting to check datafiles
    input datafile file number=00004 name=/home/oracle/app/oracle/oradata/orcl/users01.dbf
    channel ORA_DISK_1: datafile checking complete, elapsed time: 00:00:00
    Edit init.ora file /tmp/init_mydb00nbs6dl_1_0.ora. This PFILE will be used to create the database on the target platform
    Run RMAN script /tmp/convert_mydb.rman on target platform to convert datafiles
    Run SQL script /tmp/transport_mydb.sql on the target platform to create database
    To recompile all PL/SQL modules, run utlirp.sql and utlrp.sql on the target platform
    To change the internal database identifier, use DBNEWID Utility
    Finished conversion at source at dd-mm-yy
    
  6. 必要なファイルはすべて一時的な場所にコピーし、ターゲット・マシンにマウントします。
    convert_mydb.rman
    init_mydb.ora
    transport_mydb.sql (and other data files listed in rman script [convert_mydb.rman] and redolog files)
    
  7. 手順5で生成したスクリプトをターゲット・マシンで実行します。

    RMANスクリプトにはデータファイルの変換コマンドが含まれています。SQLスクリプトには、コントロール・ファイルの作成、オブジェクトの無効化、オブジェクトの再コンパイルが含まれます。ターゲット・マシンで、次を実行します。

    RMAN> connect target /

    RMAN> @/home/oracle/migrate/convert_mydb.rman

  8. データベースが稼働中で、リスナーに登録されていることを確認します。

    RMAN> STARTUP NOMOUNT PFILE = '/home/oracle/migrate/init_mydb00nbs6dl_1_0.ora'; database is already started

  9. OMSを開始して、管理サーバーが起動中であることを確認します。

    [oracle]$ ./emctl status oms

    [oracle]$ ./emctl start oms

  10. OMSを停止します。

    [oracle]$ ./emctl stop oms

  11. リポジトリ・データベース接続の詳細を更新します。

    [oracle]$ ./emctl config oms -store_repos_details -repos_conndesc "(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=evildead.idc.oracle.com)(PORT=1521)))(CONNECT_DATA=(SID=mydb)))" -repos_user SYSMAN -repos_pwd Oracle123

    この環境にOracle Management Serviceが複数ある場合は、それらすべてでこのstore_repos_detailsコマンドを実行します。

  12. OMSを再起動します。

    [oracle]$ ./emctl start oms

    [oracle]$ ./emctl status oms

    Oracle Enterprise Manager Cloud Control 12c Release 12.1.0.4.0
    Copyright (c) 1996, 2013 Oracle Corporation.  All rights reserved.
    WebTier is Up
    Oracle Management Server is Up
    
  13. 管理サービスとリポジトリ・ターゲットを再配置します。

20.5.2.2 フィジカル・スタンバイを使用した移行

次の手順で、フィジカル・スタンバイを使用してリポジトリを移行するのに使用できるプロセスについて説明します。この方法は、ソースとターゲットのプラットフォームがサポートされる場合に使用できます。サポートされるプラットフォームの組合せの詳細は、My Oracle Supportノート:413484.1を参照してください。

  1. データベースORACLE_HOMEをターゲット・マシンにインストールします。バイナリはソースと同じバージョンである必要があります。

    ターゲット・マシンがWindowsの場合、管理エージェントのデプロイには、WindowsマシンにCYGWINをインストールして構成します。

  2. 管理エージェントをターゲット・サーバーにデプロイします。
  3. Data Guardのドキュメントに従い、フィジカル・スタンバイを作成します。
  4. Data Guard Brokerのドキュメントに従い、Data Guard Brokerを構成します。
  5. OMSを停止します。

    emctl stop oms -all

  6. OMS接続記述子を確認します。

    ./emctl config oms -list_repos_details

  7. dgmgrlを使用してデータベースをスイッチオーバーします。

    次のコマンドを使用します。

    DGMGRL> switchover to target_db
    verify
    show configuration
    show database target_db
    show database source_db
    
  8. OMS管理サーバーを起動します。

    emctl start oms -admin_only

  9. スタンバイ・データベースを指すように接続記述子を更新します。

    eemctl config oms -store_repos_details -repos_conndesc "(DESC= )" -repos_user sysman

    [oracle]$ ./emctl config oms -store_repos_details -repos_conndesc "(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=sample2.us.company.com)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=test_win)))" -repos_user sysman
        Oracle Enterprise Manager Cloud Control 12c Release 12.1.0.4.0
        Copyright (c) 1996, 2013 Oracle Corporation. All rights reserved.
        Enter Repository User's Password :
        Successfully updated datasources and stored repository details in Credential Store.
    

    この環境にOracle Management Serviceが複数ある場合は、それらすべてでこのstore_repos_detailsコマンドを実行します。

  10. すべてのOracle Management Serviceを停止します。

    emctl stop oms -all

  11. OMSを起動します。

    emctl start oms

  12. Oracle Management Serviceとリポジトリを再配置します。

    emctl config emrep -conn_desc

    [oracle]$ ./emctl config emrep -conn_desc "(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=sample2.us.company)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=test_win)))"
    Oracle Enterprise Manager Cloud Control 12c Release 12.1.0.4.0
    Copyright (c) 1996, 2013 Oracle Corporation. All rights reserved.
    Please enter repository password:
    Enter password :
    Login successful
    Moved all targets from sample.us.company.com:3872 to sample2.us.company.com:3872
    Command completed successfully!
    Enter password :
    Login successful
    Moved all targets from sample.us.company.com:3872 to sample2.us.company.com:3872
    Command completed successfully!
    
  13. OMSのバックアップを作成します(管理サーバーが動作しているOMS)。

    $ <ORACLE_HOME>/bin/emctl exportconfig oms [-sysman_pwd <sysman password>]

    バックアップ・ファイルを保存するディレクトリを指定します。

    [-dir <backup dir>]

    OMSが仮想のホスト名を使用してインストール(ORACLE_HOSTNAME=<virtual_hostname>を使用)された場合は、次のパラメータを指定します。

    [-keep_host]

20.5.3 移行後の検証

次の検証手順を移行後に実行し、移行が完全に成功したかどうかを確認します。

  • ソース・データベースとターゲット・データベースをEnterprise Managerで比較してオブジェクトの矛盾を検証します。

  • 移行されたデータベースをEnterprise Managerで検証し、データベースが問題なく実行しているかどうかを確認します。

  • リポジトリ操作、dbmsジョブ、管理システム・エラーが報告されているかどうかを検証します。

  • すべてのEnterprise Manager機能が移行後適切に機能しているかどうかを検証します。

  • Enterprise Managerによる検証で、管理サービスとリポジトリ・データベースが適切に再配置されていることを確認します。