migrate_noncdb_to_pdb

Classic Migration Using migrate_noncdb_to_pdb

Migrates a non-container database (non-CDB) as a PDB utilizing an XML based path and is known as Classic Migration. For Migration Workbench use verb migrate_db.

Format

 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)"]
  [-createAsClone="If -migrationMethod is 'PLUG_AS_PDB' and if 'createAsClone' is 'Y', the PDB will be created as clone. (Y|N)"]
  [-dataFilesLoc="Location on the CDB host where datafiles for the newly created PDB 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)"]
  [-locationSharedAcrossTargets="Export/Import location is shared across Source and Destination targets)"]
									           
[ ]  indicates that the parameter is optional.

Options

  • cdbTargetName

    Name of the Container Database (CDB) target in Enterprise Manager where the migration will take place.

  • cdbTargetType

    Target type of the CDB. "oracle_database" for single instance database and "rac_database" for a cluster database.

  • cdbDBCreds

    Named database credentials on the CDB of a DB user with sysdba privileges.

  • cdbHostCreds

    Named host credentials of the user who owns the Oracle Home installation of the CDB.

  • migrationMethod

    The method that will be used to migrate a database into the CDB. The valid values are:
    • DATAPUMP (Oracle Data Pump Full Transportable Export and Import) : Uses Data Pump Full Transportable Export and Import to export data from a non-CDB and import into a newly created PDB. This option is supported for non-CDBs of version 11.2.0.3 or higher.

    • PLUG_AS_PDB (Plug as PDB) : Uses the DBMS_PDB package to generate an XML metadata file. The XML metadata file describes the database files of the non-CDB that is used to plug it into a CDB. To use this option, the non-CDB must be an Oracle Database and the PDB must be a 12c database.

      Example case: Source non-CDB and destination PDB version 12.1

  • noncdbTargetName

    Enterprise Manager target name of the non-CDB to be migrated..

  • noncdbTargetType

    Target type of the non-CDB. "oracle_database" for single instance database and "rac_database" for a cluster database.

  • noncdbDBCreds

    Named database credentials on the non-CDB of a user with sysdba privileges.

  • noncdbHostCreds

    Named host credentials of the user who owns the Oracle Home installation of the non-CDB.

  • pdbName

    The name of the Pluggable database that will be created on the CDB..

  • pdbAdminName

    The username of the PDB administrator that will be created for the new PDB.

  • pdbAdminPassword

    The password for the PDB administrator.

  • exportDir

    The file system location on the non-CDB host where the exported datapump files (dump and data files) will be stored. This directory will be cleaned up after successful migration. Default export directory is the location pointed to by DATA_PUMP_DIR directory object on the non-CDB. Use a location on which non-CDB Oracle Home owner has read and write permissions.

  • importDir

    File system location on the CDB host that will be used to temporarily stage the migration metadata and/or datafiles. This directory will be cleaned up after successful migration. Default import directory is the location pointed to by DATA_PUMP_DIR directory object on the CDB. Use a location on which CDB Oracle Home owner has read and write permissions. If '-locationSharedAcrossTargets' is specified, export directory will be used.

  • useOMF

    Use OMF location as datafile location.

    Y: Supported only if the CDB uses OMF. Ignored otherwise.

    N (Default)

  • createAsClone

    This flag specifies whether the new pluggable database should be created as clone. Used only if the -migrationMethod is specified as 'PLUG_AS_PDB', ignored otherwise. The valid values are: Y | N (default).

  • dataFilesLoc

    The file system location on the CDB host where the datafiles for the newly created PDB will be stored. If the CDB uses ASM then a disk group name can also be used as the datafile location. Default datafile location is the location pointed to by DATA_FILE_DIR directory object on the CDB. Use a location on which CDB Oracle Home owner has read and write permissions. Ignored if useOMF is Y.

  • encryptionPwd

    Password to decrypt/encrypt datapump dump files. This is mandatory if the non-CDB contains encrypted tablespaces.

  • cdbWalletPwd

    Wallet password to open the wallet on the CDB. This is mandatory if the 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: Default value

    • REPLACE

  • precheck

    Option to run pre-requisite checks during the migration job.

    • YES (Default): Runs pre-requisite checks and proceeds to database migration if there are no errors during the pre-requisite checks.

    • NO: Proceeds to the database migration directly. Does not run the pre-requisite checks.

    • ONLY: Runs pre-requisite checks only. Does not migrate the database.

  • ignoreWarnings

    Option to ignore the warnings if any, during pre-requisite checking and proceed with migration. Used only when precheck is set to YES, ignored otherwise. The valid values are:
    • YES (Default) : Ignores warnings and proceeds to migration.

    • NO : Does not proceed to migration if warnings are found.

  • locationSharedAcrossTargets

    This parameter indicates that the exported location is shared across source and destination targets. This implies that import location is same as exported location in turn skipping the file transfer.

Examples

Example 1

The following example migrates the non-CDB target NON_CDB_1 as a PDB named NEW_PDB, using the datapump method, the non-CDB target credentials NON_CDB_DB_CREDS, and the non-CDB host credentials NON_CDB_HOST_CREDS, specifying the administrator user name of the newly created PDB as pdbAdmin, and the administrator password as welcome:

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