This post was originally published on this site

In the previous blog post MV2ADB – One-Click Move of your Data into OCI Autonomous Databases – Step by Step I wrote about the new Oracle Cloud Infrastructure tool to transfer local data into Autonomous Databases step by step. There you see how to install and configure mv2adb and how to transfer your data to ADB step by step.

The auto operation parameter is now “all in one”, one parameter and all required steps like export, transfer etc. are done fully automated.

Prerequisites

  • mv2adb rpm package installed, always get the newest version from My Oracle Support (Doc ID 2463574.1)
  • HTTP/SQL*Net Connectivity from the on premises server to the Autonomous Database
  • Autonomous Database Wallet (can be downloaded from the ATP main page)
  • Instant Client with Basic Package, SQL*Plus Package and Data Pump, SQL*Loader and Workload Replay Client – if there is an existing RDBMS installation 18.3 or higher, you can use it
  • Java executable – same like above, you can use the RDBMS installation too
  • Perl Release 5.10 or above
  • Optional: Oracle OCI Command Line Interface – https://docs.cloud.oracle.com/iaas/Content/API/Concepts/cliconcepts.htm installed and configured

Let’s go – we transfer the local HR Schema to ADB fully automated

Example with parameter OCIC=true – visible in the output lines where the OCI bucket upload is done.

[root@mohnweg mv2adb]# ./mv2adb auto -conf conf/ATP01.mv2adb.cfg
INFO: 2019-12-28 13:39:11: Please check the logfile '/opt/mv2adb/out/log/mv2adb_9661.log' for more details

--------------------------------------------------------
mv2adb - Move data to Oracle Autonomous Database
Version: 2.0.1-76
Copyright (c) 1982-2019 Oracle and/or its affiliates.
--------------------------------------------------------
Author: Ruggero Citton <ruggero.citton@oracle.com>
RAC Pack, Cloud Innovation and Solution Engineering Team
--------------------------------------------------------

INFO: 2019-12-28 13:39:11: Reading the configuration file 'conf/ATP01.mv2adb.cfg'
INFO: 2019-12-28 13:39:14: Checking schemas on source DB
INFO: 2019-12-28 13:39:14: Performing schema expdp for 'HR' from source DB...
INFO: 2019-12-28 13:39:14: Step 1 - ...getting ADB parallelism
INFO: 2019-12-28 13:39:15: Step 2 - ...getting source DB version
INFO: 2019-12-28 13:39:15: Step 3 - ...creating expdp directory 'MV2ADB_EXPDP_DIR' for path '/datapump'
INFO: 2019-12-28 13:39:15: Step 4 - ...getting latest SCN
INFO: 2019-12-28 13:39:15: Step 5 - ...checking Cloud Service Type
INFO: 2019-12-28 13:39:16: Step 6 - ...executing export datapump
SUCCESS: 2019-12-28 13:40:00: Expdp executed successfully

INFO: 2019-12-28 13:40:00: Performing '6' dump upload to Oracle Object Store...
INFO: 2019-12-28 13:40:00: ...loading '/datapump/expdp_01.dmp' into bucket 'ocibucket01' using oci-client
SUCCESS: 2019-12-28 13:40:02: ...file '/datapump/expdp_01.dmp' uploaded on 'ocibucket01' successfully
INFO: 2019-12-28 13:40:02: ...loading '/datapump/expdp_02.dmp' into bucket 'ocibucket01' using oci-client
SUCCESS: 2019-12-28 13:40:03: ...file '/datapump/expdp_02.dmp' uploaded on 'ocibucket01' successfully
INFO: 2019-12-28 13:40:03: ...loading '/datapump/expdp_03.dmp' into bucket 'ocibucket01' using oci-client
SUCCESS: 2019-12-28 13:40:05: ...file '/datapump/expdp_03.dmp' uploaded on 'ocibucket01' successfully
INFO: 2019-12-28 13:40:05: ...loading '/datapump/expdp_04.dmp' into bucket 'ocibucket01' using oci-client
SUCCESS: 2019-12-28 13:40:06: ...file '/datapump/expdp_04.dmp' uploaded on 'ocibucket01' successfully
INFO: 2019-12-28 13:40:06: ...loading '/datapump/expdp_05.dmp' into bucket 'ocibucket01' using oci-client
SUCCESS: 2019-12-28 13:40:08: ...file '/datapump/expdp_05.dmp' uploaded on 'ocibucket01' successfully
INFO: 2019-12-28 13:40:08: ...loading '/datapump/expdp_06.dmp' into bucket 'ocibucket01' using oci-client
SUCCESS: 2019-12-28 13:40:09: ...file '/datapump/expdp_06.dmp' uploaded on 'ocibucket01' successfully
SUCCESS: 2019-12-28 13:40:09: Upload of '6' dumps over Oracle Object Store complete successfully

INFO: 2019-12-28 13:40:09: Performing impdp into ADB...
INFO: 2019-12-28 13:40:09: Step 1 - ...drop Object Store Credential
INFO: 2019-12-28 13:40:10: Step 2 - ...creating Object Store Credential
INFO: 2019-12-28 13:40:10: Step 3 - ...executing import datapump to ADB
INFO: 2019-12-28 13:41:00: Moving impdp log 'mv2adb_impdp_20191228-134010.log' to Object Store
SUCCESS: 2019-12-28 13:41:01: Impdp to ADB 'ATP01' executed successfully

Verification

[root@mohnweg mv2adb]# ./mv2adb report -conf conf/ATP01.mv2adb.cfg
INFO: 2019-12-28 13:43:18: Please check the logfile '/opt/mv2adb/out/log/mv2adb_10130.log' for more details

--------------------------------------------------------
mv2adb - Move data to Oracle Autonomous Database
Version: 2.0.1-76
Copyright (c) 1982-2019 Oracle and/or its affiliates.
--------------------------------------------------------
Author: Ruggero Citton <ruggero.citton@oracle.com>
RAC Pack, Cloud Innovation and Solution Engineering Team
--------------------------------------------------------

INFO: 2019-12-28 13:43:18: Reading the configuration file 'conf/ATP01.mv2adb.cfg'
INFO: 2019-12-28 13:43:18: Using Oracle Home '/u01/app/oracle/product/18.0.0/dbhome_1/'
INFO: 2019-12-28 13:43:18: Getting Obj report for '//mohnweg/pdbhr01.kestenholz.net'

0
Database Objects REPORT for //mohnweg/pdbhr01.kestenholz.net

HR |TABLE | 7
HR |SEQUENCE | 3
HR |TRIGGER | 2
HR |PROCEDURE | 2
HR |INDEX | 19
HR |VIEW | 1
| |----------
sum | | 34

INFO: 2019-12-28 13:43:18: Getting Obj report for ADB 'atp01_high'

0
Database Objects REPORT for atp01_high

HR |TABLE | 7
HR |SEQUENCE | 3
HR |TRIGGER | 2
HR |PROCEDURE | 2
HR |INDEX | 19
HR |VIEW | 1
| |----------
sum | | 34

Summary

The auto function completely eliminates the manual steps to upload your data into an Autonomous Database steps. And in case of any error, you have the same logfiles like you do it step by step. Great!

#ilikeit