DBMS_CLOUD_FUNCTION_ADMIN Package

The DBMS_CLOUD_FUNCTION_ADMIN package supports you invoking generic scripts from an Autonomous Database instance.

Summary of DBMS_CLOUD_FUNCTION_ADMIN Subprograms

This table summarizes the subprograms included in the DBMS_CLOUD_FUNCTION_ADMIN package.

Subprogram Description

DEREGISTER_REMOTE_EXECUTION_ENV Procedure

This procedure removes an endpoint that was previously registered.

GRANT_REMOTE_EXECUTION_ENV Procedure

This procedure enables the ADMIN user to grant privileges on a registered endpoint to a user other than the ADMIN.

REGISTER_REMOTE_EXECUTION_ENV Procedure

This procedure registers a remote endpoint environment.

REVOKE_REMOTE_EXECUTION_ENV Procedure

This procedure enables the ADMIN user to revoke privileges on a registered endpoint from a user other than the ADMIN.

DEREGISTER_REMOTE_EXECUTION_ENV Procedure

This procedure removes an endpoint that was previously registered.

Syntax

 DBMS_CLOUD_FUNCTION_ADMIN.DEREGISTER_REMOTE_EXECUTION_ENV(
     remote_endpoint_name IN VARCHAR2
);

Parameter

Parameter Description

remote_endpoint_name

Specifies the remote endpoint to remove.

This parameter is mandatory.

Examples

BEGIN
    DBMS_CLOUD_FUNCTION_ADMIN.DEREGISTER_REMOTE_EXECUTION_ENV (   
     remote_endpoint_name  => 'REM_EXECUTABLE',
);
END;
/

Usage Note

  • To run this procedure you must be logged in as the ADMIN user.

GRANT_REMOTE_EXECUTION_ENV Procedure

This procedure enables the ADMIN user to grant privileges on a registered endpoint to a user other than the ADMIN.

Syntax

DBMS_CLOUD_FUNCTION_ADMIN.GRANT_REMOTE_EXECUTION_ENV (         
    remote_endpoint_name IN VARCHAR2,
    user_name            IN VARCHAR2
);

Parameters

Parameter Description

remote_endpoint_name

Specifies the registered remote endpoint name.

This parameter is mandatory.

user_name

Specifies the username.

This parameter is mandatory.

Example

BEGIN
 DBMS_CLOUD_FUNCTION_ADMIN.GRANT_REMOTE_EXECUTION_ENV (   
    remote_endpoint_name => 'REM_EXECUTABLE',
    user_name            => 'username'
 );
END;
/

Usage Note

To run this procedure you must be logged in as the ADMIN user.

REGISTER_REMOTE_EXECUTION_ENV Procedure

This procedure registers a remote endpoint.

Syntax

DBMS_CLOUD_FUNCTION_ADMIN.REGISTER_REMOTE_EXECUTION_ENV (         
    remote_endpoint_name    IN VARCHAR2,
    remote_endpoint_url     IN CLOB,
    wallet_dir              IN VARCHAR2,
    remote_cert_dn          IN CLOB
);

Parameters

Parameter Description

remote_endpoint_name

Specifies the remote endpoint to register.

This parameter is mandatory.

remote_endpoint_url

Specifies the remote location of the library.

The parameter accepts a String value in host_name:port_number format.

For example: EHRPMZ_DBDOMAIN.adb-us-phoenix1.com:16000

This parameter is mandatory.

wallet_dir

Specifies the directory where the self-signed wallet is stored.

This parameter is mandatory.

remote_cert_dn

Specifies the server certificate Distinguished Name (DN).

This parameter is mandatory.

Example

BEGIN
 DBMS_CLOUD_FUNCTION_ADMIN.REGISTER_REMOTE_EXECUTION_ENV (   
    remote_endpoint_name   => 'REM_EXECUTABLE',
    remote_endpoint_url    => 'remote_hostname:16000',
    wallet_dir             => 'WALLET_DIR',
    remote_cert_dn         => 'CN=VM Hostname'
 );
END;
/

Usage Note

  • To run this procedure you must be logged in as the ADMIN user.

REVOKE_REMOTE_EXECUTION_ENV Procedure

This procedure enables the ADMIN user to revoke privileges on a registered endpoint from a user other than the ADMIN.

Syntax

DBMS_CLOUD_FUNCTION_ADMIN.REVOKE_REMOTE_EXECUTION_ENV(         
    remote_endpoint_name IN VARCHAR2,
    user_name            IN VARCHAR2
);

Parameters

Parameter Description

remote_endpoint_name

Specifies the registered remote endpoint name.

This parameter is mandatory.

user_name

Specifies the username.

This parameter is mandatory.

Examples

BEGIN
 DBMS_CLOUD_FUNCTION_ADMIN.REVOKE_REMOTE_EXECUTION_ENV (   
    remote_endpoint_name => 'REM_EXECUTABLE',
    user_name            => 'username'
 );
END;
/

Usage Note

To run this procedure you must be logged in as the ADMIN user.