Note
Import the collection data using the
option CONTENT=DATA_ONLY
.
Specify the collection you want to import using the
INCLUDE
parameter. This is useful if a data file set contains the
entire schema and the SODA collection you need to import is included as part of the dump
file set.
Use REMAP_DATA
to change any of the columns during
import. This example shows using REMAP_DATA
to change the version
column method from SHA256
to UUID
.
impdp admin/password@db2022adb_high \
directory=data_pump_dir \
credential=def_cred_name \
dumpfile= https://namespace-string.objectstorage.us-ashburn-1.oci.customer-oci.com/n/namespace-string/b/bucketname/o/export%l.dmp \
encryption_pwd_prompt=yes \
SCHEMA=my_schema \
INCLUDE=TABLE:\"= \'MyCollectionName\'\" \
CONTENT=DATA_ONLY \
REMAP_DATA=my_schema.'\"MyCollectionName\"'.VERSION:SYS.DBMS_SODA.TO_UUID
Notes for Data Pump parameters:
-
If during the export with expdp
you used the
encryption_pwd_prompt=yes
parameter then use
encryption_pwd_prompt=yes
and input the same password at the
impdp
prompt that you specified during the export.
-
The
dumpfile
parameter supports the
%L
and %l
wildcards in
addition to the legacy %U
and %u
wildcards. For example, dumpfile=export%L.dmp
. Use
the %L
or %l
wildcard for exports
from Oracle Database Release 12.2 and higher. This wildcard expands
the dumpfile file name into a 3-digit to 10-digit, variable-width
incrementing integer, starting at 100 and ending at
2147483646.
Use the legacy
%U
or %u
wildcard for
exports from Oracle Database prior to Release 12.2. If you use this
option and more than 99 dump files are needed, you must specify
multiple dumpfile names, each with the %U
or
%u
parameter.
For dumpfile
, this
example uses the recommended URI format using OCI Dedicated
Endpoints for commercial realm (OC1). The
namespace-string
is the Oracle Cloud Infrastructure object storage namespace and
bucketname
is the bucket
name. See Object Storage
Dedicated Endpoints, Regions and
Availability Domains, and Understanding
Object Storage Namespaces for more
information.
In Oracle Data Pump version 19.6 and later, the credential argument
authenticates Oracle Data Pump to the Cloud Object Storage service you are using for
your source files. The credential
parameter cannot be an Azure service
principal, Amazon Resource Name (ARN), or a Google service account. See Accessing Cloud Resources by Configuring Policies and
Roles for more information on resource principal based authentication.
The dumpfile argument is a comma delimited list of URLs for your Data Pump
files.
For the best import performance use the HIGH
database
service for your import connection and set the parallel
parameter
to one quarter the number of ECPUs (.25 x ECPU
count). If you are using OCPU compute model, set
the parallel parameter to the number of OCPUs (1 x OCPU
count).
For information on which database service name to connect to run Data Pump
Import, see Manage Concurrency and Priorities on Autonomous Database.
For the dump file URL format for different Cloud Object Storage services,
see DBMS_CLOUD Package File URI Formats.
Note
To perform a full import or to import
objects that are owned by other users, you need the DATAPUMP_CLOUD_IMP
role.
For information on disallowed objects in Autonomous Database, see SQL Commands.
In this import example, the specification for the
REMAP_DATA
parameter uses the function
DBMS_SODA.TO_UUID
to generate UUID values. By default, for on-premise
databases, the version column of a SODA collection is computed using SHA-256 hash of the
document's content. On Autonomous Database the
version column uses UUID generated values, which are independent of the document's
content.
In this example the REMAP_DATA
parameter uses the
DBMS_SODA.TO_UUID
function to replace the source collection version
type with UUID versioning. If in the export dump file set that you are importing the
versionColumn.method
is already set to UUID, then the
REMAP_DATA
for this field is not required.
For detailed information on Oracle Data Pump Import parameters see Oracle Database Utilities.