非コンテナ・データベースのプラガブル・データベースとしての移行

非コンテナ・データベース(CDB)をPDBとして移行するには、次のステップを実行します。

  1. 前提条件を満たします。

    非コンテナ・データベースをPDBとして移行する際の前提条件の詳細は、非CDBをプラガブル・データベースとして移行するための前提条件を参照してください。

  2. OMSホストで次のコマンドを実行して、EM CLIにログインします。
    $<OMS_HOME>/bin/emcli login -username=<name_of_user> -password=<password>
    
  3. 次のコマンドを実行して、動詞migrate_noncdb_to_pdbのヘルプ・ファイルを表示します。
    $<OMS_HOME>/bin/emcli help migrate_noncdb_to_pdb
    
  4. 動詞migrate_noncdb_to_pdbを実行します。
    $<OMS_HOME>/bin/emcli migrate_noncdb_to_pdb 
    -cdbTargetName=<EM CDB target into which the database will be added as PDB>
    -cdbTargetType=<EM CDB target type (oracle_database|rac_database)>
    -cdbDBCreds=<Named DB credentials of CDB user having sysdba privileges>
    -cdbHostCreds=<Named host credentials for Oracle Home owner of CDB>
    -migrationMethod=<Migration method to be used (DATAPUMP|PLUG_AS_PDB)>
    -noncdbTargetName=<EM non-CDB target to be migrated>
    -noncdbTargetType=<EM non-CDB target type (oracle_database|rac_database)>
    -noncdbDBCreds=<Named DB credentials for non-CDB user having sysdba privileges>
    -noncdbHostCreds=<Named host credentials for Oracle Home owner of non-CDB>
    -pdbName=<Name of the PDB to be created on the CDB>
    -pdbAdminName=<Username of the PDB administrator to be created>
    -pdbAdminPassword=<Password for the PDB administrator>
    [-exportDir=<Temporary file system location on the non-CDB host where the exported files will be stored>]
    [-importDir=<Temporary file system location on the CDB host used to stage the migration metadata and/or datafiles>]
    [-useOMF=<Use OMF for datafile location if CDB is OMF enabled (Y|N)>]
    [-dataFilesLoc=<Location on the CDB host where datafiles for the newly created DB will be stored. Disk Group name in case of ASM>]
    [-encryptionPwd=<Password to decrypt/encrypt datapump dump file. Mandatory if non-CDB contains encrypted tablespaces>]
    [-cdbWalletPwd=<Wallet password of the CDB. Mandatory if non-CDB contains encrypted tablespaces>]
    [-objectExistsAction=<Action to be taken when the exported object with same name is found on the newly created PDB (SKIP|REPLACE). Defaulted to SKIP>]
    [-precheck=<Perform pre-requisite checks (YES|NO|ONLY). Defaulted to YES>]
    [-ignoreWarnings=<Ignore the warnings from precheck (Y|N)>]
    
    

    たとえば、次のコマンドを実行して非CDBをPDBとして移行できます。

    $<OMS_HOME>/bin/emcli migrate_noncdb_to_pdb -migrationMethod=datapump -noncdbTargetName=NON_CDB_NAME -noncdbTargetType=oracle_database -noncdbHostCreds=NON_CDB_HOST_CREDS -noncdbDBCreds=NON_CDB_DB_CREDS -cdbTargetName=CDB_NAME -cdbTargetType=oracle_database -cdbHostCreds=CDB_HOST_CREDS -cdbDBCreds=CDB_DB_CREDS -pdbName=NEW_PDB -pdbAdminName=pdbAdmin -pdbAdminPassword=welcome -precheck=ONLY -ignoreWarnings