GET_OBJECT Procedure

This procedure reads an object from Cloud Object Storage and copies it to Autonomous Database. The maximum file size allowed in this procedure is 5 gigabytes (GB).


	credential_name      IN VARCHAR2,		
	object_uri           IN VARCHAR2,		
	directory_name       IN VARCHAR2,
	file_name            IN VARCHAR2 DEFAULT  NULL,
	startoffset          IN NUMBER DEFAULT  0,
	endoffset            IN NUMBER DEFAULT  0,
	compression          IN VARCHAR2 DEFAULT  NULL);	


Parameter Description


The name of the credential to access the Cloud Object Storage.


Object or file URI. The format of the URI depends on the Cloud Object Storage service you are using, for details see Cloud Object Storage URI Formats.


The name of the directory on the database.


Specifies the name of the file to create. If file name is not specified, the file name is taken from after the last slash in the object_uri parameter. For special cases, for example when the file name contains slashes, use the file_name parameter.


The offset, in bytes, from where the procedure starts reading.


The offset, in bytes, until where the procedure stops reading.


Specifies the compression used to store the object. When compression is set to ‘AUTO’ the file is uncompressed (the value ‘AUTO’ implies the object specified with object_uri is compressed with Gzip).


To run DBMS_CLOUD.GET_OBJECT with a user other than ADMIN you need to grant WRITE privileges on the directory to that user. For example, run the following command as ADMIN to grant write privileges to atpc_user:

GRANT WRITE ON DIRECTORY data_pump_dir TO atpc_user;


     credential_name => 'OBJ_STORE_CRED',
     object_uri => '',
     directory_name => 'DATA_PUMP_DIR'); 

In this example, object_uri is an Oracle Cloud Infrastructure Swift URI that specifies the cwallet.sso file in the mybucket bucket in the us-phoenix-1 region. (idthydc0kinr is the object storage namespace in which the bucket resides.) For information about the supported URI formats, see Cloud Object Storage URI Formats.