Import Data with Oracle Data Pump
Latest Version or an Older Version
The steps
to import data to Autonomous Database with
Oracle Data Pump differ depending on the Oracle Data Pump version.
Import Data Using Oracle Data Pump Version 18.3 or Later Oracle recommends using the latest Oracle Data Pump version for importing data from Data Pump files into your Autonomous Database, as it contains enhancements and fixes for a better experience.
Import Data Using Oracle Data Pump Version 18.3 or Later 🔗
Oracle recommends using the
latest Oracle Data Pump version for importing data from Data Pump files into your Autonomous Database, as it contains enhancements and
fixes for a better experience.
Download the latest version of Oracle Instant Client, which includes Oracle Data Pump, for your platform from Oracle Instant Client Downloads. See the installation instructions on the platform install download page for the installation steps required after you download Oracle Instant Client.
In Oracle Data Pump version 18.3 and later, the credential argument
authenticates Data Pump to the Cloud Object Storage service you are using for your source
files. The dumpfile argument is a comma delimited list of URLs for your
Data Pump files.
In Oracle Data Pump, if your source files reside on Oracle Cloud
Infrastructure Object Storage you can use Oracle Cloud
Infrastructure native URIs or Swift URIs. See DBMS_CLOUD URI Formats for details on these file URI formats.
To load an Oracle Data Pump dumpfile from Cloud Object Storage, run Oracle Data Pump Import
and include the credential parameter:
Store your Cloud Object Storage credential using DBMS_CLOUD.CREATE_CREDENTIAL.
For example, to create Oracle Cloud
Infrastructure Auth Token credentials with the default Identity domain:
For OCI Object Storage the username parameter value must include the Identity domain and
the user name from your profile. You can find the Identity domain associated with a user
in the Oracle Cloud Infrastructure Console. For example, with the
oracleidentitycloudservice Identity domain, this would be:
For more information on Oracle Cloud
Infrastructure Signing Key based credentials see CREATE_CREDENTIAL Procedure.
Supported credential types:
Data Pump Import supports Oracle Cloud
Infrastructure Auth Token based credentials and Oracle Cloud
Infrastructure Signing Key based credentials.
For more information on the credential types for Oracle Cloud
Infrastructure Cloud Object Storage, see CREATE_CREDENTIAL Procedure.
Data Pump supports using an
Oracle Cloud
Infrastructure Object Storage pre-authenticated URL for the dumpfile
parameter. When you use a pre-authenticated URL, providing the
credential parameter is required and the
credential value can be
NULL. See Using
Pre-Authenticated Requests for more
information.
Run Data Pump Import with the dumpfile parameter set to the list of file URLs on your Cloud Object Storage and the credential parameter set to the name of the credential you created in the previous step. For example:
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.
If your bucket and data do not reside in a commercial (OC1) realm,
where OCI Dedicated Endpoints are not supported, use the following URI format for
dumpfile:
The credential parameter cannot be an Azure service
principal, Amazon Resource Name (ARN), or a Google service account. See Configure Policies and Roles to Access Resources for more information on resource principal based
authentication.
When you specify the dumpfile value as a
pre-authenticated URL, the credential parameter is required and the
value can be NULL.
Import Data Using Oracle Data
Pump Version 18.3 or Later with OCI Resource Principal 🔗
Oracle Data Pump supports
importing data pump files into your Autonomous Database using an Oracle Cloud
Infrastructure resource principal as a credential object.
If you use Oracle Data Pump expdp to export directly to Object
Store then you must use the same credential that was used to export when you import with
impdp. In this case, Oracle Data Pump import does not support Oracle Cloud
Infrastructure resource principal credentials. Other methods for uploading are supported for using
impdp using resource principal credentials. For example, if you upload
Oracle Data Pump files on Object Store using DBMS_CLOUD.PUT_OBJECT, you can import the files using Oracle Data
pump impdp using resource principal credentials. Likewise, when you use the
Oracle Cloud
Infrastructure Console to upload data pump files to Object Store, you can use resource principal
credentials to import into an Autonomous Database
instance with Oracle Data pump impdp.
In Oracle Data Pump, if your source files reside on Oracle Cloud
Infrastructure Object Storage you can use Oracle Cloud
Infrastructure native URIs or Swift URIs. See DBMS_CLOUD URI Formats for details on these file URI formats.
Configure the dynamic groups and policies and enable Oracle Cloud
Infrastructure resource principal to access the Object Store location where the data pump files you
want to import reside.
Run Data Pump Import with the dumpfile parameter set to the list of file URLs on
your Cloud Object Storage and the credential parameter set to
OCI$RESOURCE_PRINCIPAL.
If during the export with expdp you used the
encryption_pwd_prompt=yes parameter, also 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.
If your bucket and data do not reside in a commercial (OC1) realm,
where OCI Dedicated Endpoints are not supported, use the following URI format for
dumpfile:
Import Data Using Oracle Data
Pump Version 12.2 and Earlier 🔗
You can import data from
Data Pump files into your Autonomous Database
using Data Pump client versions 12.2.0.1 and earlier by setting the
default_credential parameter.
Data Pump Import versions 12.2.0.1 and earlier do not have the credential parameter. If you are using an older version of Data Pump Import you need to define a default credential property for Autonomous Database and use the default_credential keyword in the dumpfile parameter.
In Oracle Data Pump, if your source files reside on Oracle Cloud
Infrastructure Object Storage you can use the Oracle Cloud
Infrastructure native URIs, or Swift URIs. See DBMS_CLOUD URI Formats for details on these file URI formats.
Importing with Older Oracle Data Pump Versions and Setting default_credential
Store your Cloud Object Storage credential using DBMS_CLOUD.CREATE_CREDENTIAL.
For example, to create Oracle Cloud
Infrastructure Auth Token credentials:
For more information on Oracle Cloud
Infrastructure Signing Key based credentials see CREATE_CREDENTIAL Procedure.
Supported credential types:
Data Pump import supports Oracle Cloud
Infrastructure Auth Token based credentials and Oracle Cloud
Infrastructure Signing Key based credentials.
For more information on the credential types for Oracle Cloud
Infrastructure Cloud Object Storage, see CREATE_CREDENTIAL Procedure.
Data Pump supports using an
Oracle Cloud
Infrastructure Object Storage pre-authenticated URL for the dumpfile. When you
use a pre-authenticated URL, setting the
DEFAULT_CREDENTIAL is required and the
DEFAULT_CREDENTIAL value can be
NULL. See Using
Pre-Authenticated Requests for more
information.
Data Pump supports using a resource principal credential with
impdp.
Set the credential as the default credential for your Autonomous Database, as the ADMIN user. For example:
ALTER DATABASE PROPERTY SET DEFAULT_CREDENTIAL = 'ADMIN.DEF_CRED_NAME'
The DEFAULT_CREDENTIAL can be an OCI Resource Principal. For
example:
ALTER DATABASE PROPERTY SET DEFAULT_CREDENTIAL = 'OCI$RESOURCE_PRINCIPAL'
The DEFAULT_CREDENTIAL value cannot be an Azure service principal,
Amazon Resource Name (ARN), or a Google service account.
The DEFAULT_CREDENTIAL value can be set to NULL if
you are using a pre-authenticated URL.
Run Data Pump Import with the dumpfile parameter set to the list of file URLs on your Cloud Object Storage, and set the default_credential keyword. For example:
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.
If your bucket and data do not reside in a commercial (OC1) realm,
where OCI Dedicated Endpoints are not supported, use the following URI format for
dumpfile:
Upload the dumpfile(s) to Oracle Cloud
Infrastructure Object Storage.
For example use DBMS_CLOUD.PUT_OBJECT to upload the
dumpfiles.
Create a pre-authenticated URL on Oracle Cloud
Infrastructure Object Storage, either on the object store bucket if there are multiple dumpfiles or on the
dumpfile, if there is only one file.