EM CLIを使用した移行
EM CLIを使用してデータベースをクラウドに移行することもできます。
顧客は、EM CLI動詞
migrate_db
を使用して、Oracle Autonomous Cloud Databaseの宛先に移行できます。移行ワークベンチの移行の場合、migrate_db
動詞はJSONファイルを使用します。
ノート:
Oracleデータベース13.3.2.0.0以降でmigrate_db
を使用して移行を試行する前に、パッチ12.1.0.2.210119がデプロイされていることを確認します。
EM CLIを使用して移行するには、次のコマンドを使用します。
emcli migrate_db
-file="/home/migrations/DB_Migration.JSON"
ファイルDB_Migration.JSON
には、次のパラメータが含まれます。{
"action": "MIGRATE",
"options": "SPA",
"type": "DATAPUMP"
"proxy":{ --> Required if you have a proxy connection setup
"host":"<proxy-host>",
"port":"<proxy-port>"
},
"source":[{
"databaseInfo":{
"targetName":"<db-pdb-target-name>",
"targetType":"<db-pdb-target-type>",
"dbCredName":"<db-cred-name:em-cred-owner>", --> If not provided, preferred credentials will be used
"hostCredName":"<host-cred-name:em-cred-owner>" --> If not provided, preferred credentials will be used
},
"export":{
"args":{
"LOGTIME":"ALL",
"METRICS":"YES",
"COMPRESSION":"ALL",
"COMPRESSION_ALGORITHM":"MEDIUM",
"KEEP_MASTER":"YES",
"PARALLEL":"1",
"directory":"<dump directory name>",
"EXCLUDE":"index,cluster,indextype,materialized_view,materialized_view_log,materialized_zonemap,db_link",
"ENCRYPTION":"ALL",
"ENCRYPTION_PASSWORD":"<Encryption Password>",
"ENCRYPTION_ALGORITHM":"AES128"
}
}
}],
"storage":{
"type":"OBJECTSTORE"
"useProxy": <boolean, true/false> --> If true, the proxy from main section will be used to upload objects to OCI Object store
"objectstore":{
"credName":".."
"baseUrl":"..",
"bucketName":".."
},
},
"destination":[{
"useProxy": <boolean, true/false> --> If true, the proxy from main section will be used to connect to ADB
"databaseInfo":{
"targetName":"<adb-target-name>",
"targetType":"<adb-target-type>",
"dbCredName":"<db-cred-name:em-cred-owner>", --> If not provided, preferred credentials will be used
"hostCredName":"<adb monitoring host-cred-name:em-cred-owner>" --> If not provided, preferred credentials will be used
},
import": {
"args": {
"TABLE_EXISTS_ACTION": "SKIP",
"PARALLEL": "6",
"TRANSFORM": "SEGMENT_ATTRIBUTES:N,DWCS_CVT_IOTS:Y,CONSTRAINT_USE_DEFAULT_INDEX:Y",
"REMAP_TABLESPACE" : "<source_tablespace:target_tablespace> [, <source_tablespace:target_tablespace>, ...]"
"NOLOGFILE": "YES",
"DIRECTORY": "DATA_PUMP_DIR"
},
"dbOciAuthCred": "<cloud-cred-name:cloud-cred-owner>"
},
"tnsName": "<adb-service-name>",
"recomplieInvalidObjects": <true|false>, -->After migration recompiles all invalid objects within the migrated schemas
}],
"analyzePerformance": --optional
{
"useSPA": true/false,
"createSTS": true/false,
"usePreferredSTS”: true/false -->optional
"stsName": "stsname01" -->optional
"stsOwner": "stsOwnedSchema" -->optional
"stsOwner": "EXPUSER" -->optional
"baselineDurationDays": 7 -->optional, set duration for SPA to analyze
}
}
migrate_dbおよび移行に必要な許容パラメータの詳細は、Oracle Enterprise Managerコマンドライン・インタフェースのmigrate_dbを参照してください。