Friday, January 29, 2021

Autonomous Database datapump Export and Import

Create Auth Token

Identity->Users->User Details->Auth Token

descripton: datapump
token: ]V5Yln>rsk#>U]Pb64VK

Create Object Storage Bucket

Namespace: yzlrtthntlse

Setup Credential in Autonomous Database

sql admin@prod_high

BEGIN
    dbms_cloud.create_credential(credential_name => 'EXPORT_CRED', username => 'oracleidentitycloudservice/pchiu@leavemealone.com',
                                password => ']V5Yln>rsk#>U]Pb64VK');
END;
/
ALTER DATABASE PROPERTY SET DEFAULT_CREDENTIAL = 'ADMIN.EXPORT_CRED';

Export schema from Autonomous Database to Object Storage Bucket

expdp admin@prod_high filesize=5GB schema=ABC dumpfile=default_credential:https://objectstorage.ca-toronto-1.oraclecloud.com/n/yzlrtthntlse/b/bucket/o/prod-%U.dmp parallel=16 directory=data_pump_dir

Import dumpfiles from Object Storage Bucket into Autonomous Database

impdp admin@prod_high dumpfile=default_credential:https://objectstorage.ca-toronto-1.oraclecloud.com/n/yzlrtthntlse/b/bucket/o/db01-%U.dmp parallel=16 directory=data_pump_dir

No comments:

Post a Comment