Skip to Main Content

General Cloud Infrastructure

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Error while trying to import a datapump file to my Autonomous Database

Yves Moriceau-OracleMay 13 2023 — edited May 17 2023

Hi,

Though I followed the process to import a datapump export file from a local DB (XE 18c) to my Autonomous DB, iit still doesn't work..

So I created a bucket (data_pump_bucket) in which I uploaded my dmp file. I generated an auth-token and then created the required credential ('Credential_For_DataPump' also set as a default in the autonomus db)

I created the parameter file (impdb_gci0300.par) below to execute the impdp command

directory=DATA_PUMP_DIR
credential=Credential_For_DataPump
schemas=gci0300
remap_schema=gci0310
dumpfile=https://swiftobjectstorage.eu-paris-1.oraclecloud.com/v1/mytenancyname/data_pump_bucket/exportGCI070523.dmp

tenancyshortened@cloudshell:~ (eu-paris-1)$ impdp userid=ADMIN@dbname_high parfile=impdb_gci0300.par

Import: Release 21.0.0.0.0 - Production on Sat May 13 12:31:40 2023
Version 21.9.0.0.0

Copyright (c) 1982, 2023, Oracle and/or its affiliates. All rights reserved.
Password:

Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
ORA-39001: invalid argument value
ORA-39000: bad dump file specification
ORA-31640: unable to open dump file "https://swiftobjectstorage.eu-paris-1.oraclecloud.com/v1/mytenancyname/data_pump_bucket/exportGCI070523.dmp" for readl
ORA-17503: ksfdopn:11 Failed to open file https://swiftobjectstorage.eu-paris-1.oraclecloud.com/v1/mytenancyname/data_pump_bucket/exportGCI070523.dmp
ORA-17500: ODM err:ODM HTTP Unauthorized

FYI I also got the same error by using the name given on the dmp file (object details) I used the “swiftobjectstorage” prefix following some articles I read on the internet.

Any help here would be definitely appreciated. Thanks in advance ffor your answers.

Cheers,

Yves


Hi,

I finally found the error and want to hereby share it with this community.

Actually first I found some contradictory articles about the username parameter when creating the credential. Actually the username should be in the format : ‘<mytenancy_username>’ and NOT oracleidentitycloudservice/<mytenancy_username>

BEGIN
DBMS_CLOUD.CREATE_CREDENTIAL(
credential_name => 'CRED_FOR_DATAPUMP',
username => 'john.doo@gmail.com', (this is an example)
password => 'xxxxxxxx' (the one you got when you generate the auth-token with your tenancy user)
);
END;
/

Secondly regarding the parameters to use with the import job, the file name should be the one you get from the object detail option while looking at the dump file located in your bucket and therefore not the format below :

'https://swiftobjectstorage.eu-paris-1.oraclecloud.com/v1/<tenancy_name>/<bucket_name>/<file_name>

but this one

'https://objectstorage.eu-paris-1.oraclecloud.com/n/xxxxx/b/<bucket_name>/o/<file_name>')

Regarding the parameter file I also had an error on the remap schema option and here is the right one

My parameter file impdp1.par

directory=DATA_PUMP_DIR
credential=CRED_FOR_DATAPUMP
remap_schema=schema_from:schema_to (your initial shema to the one you want to import)
dumpfile=https://objectstorage.eu-paris-1.oraclecloud.com/n/xxxxx/b/<bucket_name>/o/<file_name>
partition_options=merge
transform=segment_attributes:n
transform=dwcs_cvt_iots:y
transform=constraint_use_default_index:y
exclude=cluster,indextype,db_link

impdp userid=ADMIN@<your_dbname>_high parfile=impdp1.par

Hope you will enjoy to import your local data to the cloud like me ;-)

Cheers,

Yves

Comments
Post Details
Added on May 13 2023
1 comment
1,186 views