- Cloud Controlデータベース・ライフサイクル・マネージメント管理者ガイド
- 付録
- Enterprise Managerコマンドライン・インタフェースの使用
- EM CLIを使用するプロビジョニング
- プラガブル・データベースのプロビジョニング
- 新規プラガブル・データベースの作成
新規プラガブル・データベースの作成
EM CLIを使用して新しいPDBを作成するには、次のステップに従います。
- 前提条件を満たします。新しいPDBの作成の前提条件の詳細は、新しいプラガブル・データベースを作成するための前提条件を参照してください。切断されたPDBをプラグインすることによりPDBを作成する際の前提条件の詳細は、切断されたプラガブル・データベースをプラグインするための前提条件を参照してください。既存のPDBをクローニングすることによりPDBを作成する際の前提条件の詳細は、プラガブル・データベースをクローニングするための前提条件を参照してください。
- OMSホストで次のコマンドを実行して、EM CLIにログインします。
$<OMS_HOME>/bin/emcli login -username=<name_of_user> -password=<password>
- 次のコマンドを実行して、動詞
create_pluggable_database
のヘルプ・ファイルを表示します。$<OMS_HOME>/bin/emcli help create_pluggable_database
create_pluggable_database
動詞を実行します。$<OMS_HOME>/bin/emcli create_pluggable_database -cdbTargetName=<Specify the CDB target name for creating new PDB> -cdbTargetType=<Specify the CDB target type - oracle_database, rac_database> -cdbHostCreds=<Specify the host credentials on which the CDB target is located> [-cdbTargetCreds=<Specify the credentials of container database on which the new PDB will be created.>] -pdbName=<Specify a name for the new PDB> [-numOfPdbs=<Specify the number of PDBs to be created>] -sourceType=<Type of pdb to be created - DEFAULT, UNPLUGGED_PDB, CLONE, PROFILE> [-sourceFromSWLIB=<If -sourceType is 'UNPLUGGED_PDB', specify if the dump location is SWLIB or not.>] [-pdbTemplateInSWLIB=<If -sourceFromSWLIB, specify the URN of pdb template component in SWLIB.>] [-sourcePDBTempStagingLocation=<If from SWLIB, specify fully qualified location for staging the source pdb dump temporarily>] [-unpluggedPDBType=<If -sourceType is 'UNPLUGGED_PDB', specify pdb dump type - ARCHIVE, RMAN, XML.>] [-sourcePDBArchiveLocation=<If -unpluggedPDBType=ARCHIVE, this is fully qualified archive location>] [-sourcePDBMetadataFile=<If -unpluggedPDBType=RMAN or XML, this is fully qualified path of the source PDB metadata file>] [-sourcePDBDatabackup=<If -unpluggedPDBType=RMAN, this is fully qualified path of the source PDB datafile>] [-sourcePDBName=<If -sourceType is 'CLONE', specify the name of an existing PDB which is a valid em target>] [-sourceCDBCreds=<If -sourceType is 'CLONE', specify the credentials of container database on which the -sourcePDBName is present>] [-pdbAdminCreds=<Name of pdb credentials with admin role>] [-useOMF=<Specifies that the datafiles can be stored in OMF location>] [-sameAsSource=<Specifies that the datafiles of new PDB can be stored in the same location as that of source CDB>] [-newPDBFileLocation=<Specify the storage location for datafiles of the created PDB.>] [-createAsClone=<If -sourceType is 'UNPLUGGED_PDB' and if 'createAsClone' is specified, the PDB will be created as clone.>] [-lockAllUsers=<If -sourceType is 'UNPLUGGED_PDB' and if 'lockAllUsers' is specified, all PDB users of the new PDB will be locked.>] [-noUserTablespace=<Specifies that the new DEFAULT PDB will not be created with USERS tablespace.>] [-useSnapClone=<If -sourceType is 'CLONE', specifies that Snap Clone must be used for cloning the PDB.>] [-sourceCDBHostCreds=<If -sourceType is 'CLONE' and -useSnapClone is specified, this specifies the host credentials for the source CDB.>] [-mountPointPrefix=<If -sourceType is 'CLONE' and -useSnapClone is specified, this specifies the mount point prefix for the cloned volumes.>] [-writableSpace=<If -sourceType is 'CLONE' and -useSnapClone is specified, this specifies the writable space, in GB, for the cloned volumes.>] [-privHostCreds=<If -sourceType is 'CLONE' and -useSnapClone is specified, this specifies the privileged host credentials required to mount the cloned volumes at the specified locations.>]
たとえば、次のコマンドを実行して新しいPDBを作成できます。
$<OMS_HOME>/bin/emcli create_pluggable_database -cdbTargetName=database -cdbTargetType=oracle_database -pdbName=pdb -sourceType=UNPLUGGED_PDB -unpluggedPDBType=ARCHIVE -sourcePDBArchiveLocation=/u01/app/oracle/product/12.1.0/dbhome_2/assistants/dbca/templates/a.tar.gz emcli create_pluggable_database -cdbTargetName=database -cdbTargetType=oracle_database -cdbHostCreds=HOST_CREDS -cdbTargetCreds=CDB_SYS_CREDS -pdbName=pdb -sourceType=CLONE -sourcePDBName=source_pdb -sourceCDBCreds=CDB_SYS_CREDS -useSnapClone -srcCDBHostCreds=HOST_CREDS -mountPointPrefix=/oracle -writableSpace=1 -sourcePDBTempStagingLocation=/tmp -privHostCreds=ROOT_CREDS