DBMS_DATA_ACCESS_SCOPE Package

The DBMS_DATA_ACCESS_SCOPE package provides routines to register, unregister, update and retrieve creation scope.

DBMS_DATA_ACCESS_SCOPE Overview

Describes the use of the DBMS_DATA_ACCESS_SCOPE package.

DBMS_DATA_ACCESS_SCOPE supports these operations:

  • Register Creation Scope
  • Unregister Creation Scope
  • Update Creation Scope
  • List Creation Scope

DBMS_DATA_ACCESS_SCOPE Security Model

The DBMS_DATA_ACCESS_SCOPE package is implemented as an invoker-rights PL/SQL package, where privileges are checked at runtime for the calling user.

The EXECUTE privilege is provided by default to ADMIN with the GRANT option, and to PDB_DBA without the GRANT option.

Summary of DBMS_DATA_ACCESS_SCOPE Subprograms

This section covers the DBMS_DATA_ACCESS_SCOPE subprograms provided with Autonomous AI Database.

REGISTER_CREATION_SCOPE Procedure

This procedure registers allowed authorization scopes for table hyperlink creation on specific schemas, tables, or views.

Syntax

procedure register_creation_scope(
  schema_name         IN VARCHAR2 DEFAULT NULL,
  schema_object_name  IN VARCHAR2 DEFAULT NULL,
  scope               IN VARCHAR2
);

procedure register_creation_scope(
  schema_name         IN VARCHAR2 DEFAULT NULL,
  schema_object_list  IN CLOB DEFAULT NULL,
  scope               IN VARCHAR2
);

Parameters

Parameter Description

schema_name

Specifies the schema that allows table creation within the given scope. This field is optional.

schema_object_name

Specifies the schema object where table creation is allowed for the given scope. This parameter is optional; if you leave it null or unspecified, the setting applies to the entire schema.

schema_object_list

This is an optional JSON array that lists objects in the schema. If the field is null or omitted, it applies to the entire schema.​

scope

Defines the creation scope for the Table Hyperlinks.

UNREGISTER_CREATION_SCOPE Procedure

This procedure unregisters an already registered creation scope.

Syntax

procedure unregister_creation_scope(
  schema_name         IN VARCHAR2 DEFAULT NULL,
  schema_object_name  IN VARCHAR2 DEFAULT NULL
);

procedure unregister_creation_scope(
  schema_name         IN VARCHAR2 DEFAULT NULL,
  schema_object_list  IN CLOB DEFAULT NULL
);

Parameters

Parameter Description

schema_name

Specifies schema for which the scope needs to be deleted. This field is optional. If you don’t provide it or it is set to null, the system automatically uses the schema of the user who runs the dbms_data_access_admin procedure.

schema_object_name

Specifies schema object for which the scope needs to be deleted. This field is optional. If you omit it or specify NULL, the unregister operation applies to the creation scope of the entire schema.

schema_object_list

Specifies list of objects in the schema for which the scope needs to be deleted. This field is optional. If it is not specified or its value is specified as null, then the unregister operation applies to the creation scope of the entire schema.

UPDATE_CREATION_SCOPE Procedure

This procedure updates an already registered creation scope.

Syntax

procedure update_creation_scope(
  schema_name         IN VARCHAR2 DEFAULT NULL,
  schema_object_name  IN VARCHAR2 DEFAULT NULL,
  scope               IN VARCHAR2
);

procedure update_creation_scope(
  schema_name         IN VARCHAR2 DEFAULT NULL,
  schema_object_list  IN CLOB DEFAULT NULL,
  scope               IN VARCHAR2
);

Parameters

Parameter Description

schema_name

Specifies the schema for which the scope needs to be updated. This field is optional. If you omit it or pass NULL, the system automatically uses the schema of the user running the routine.

schema_object_name

Specifies the schema object for which the scope needs to be updated. This field is optional. If you omit it or pass NULL, the update applies to the creation scope for the entire schema.

schema_object_list

Specifies JSON array list of objects in the schema. This field is optional. If it is not specified or its value is specified as null, then the update operation applies to the creation scope of the entire schema.

scope

Specifies the modified creation scope for Table Hyperlinks.

LIST_CREATION_SCOPES Procedure

This procedure retrieves the already registered creation scope(s).

Syntax

procedure list_creation_scopes(
  schema_name         IN VARCHAR2 DEFAULT NULL,
  schema_object_name  IN VARCHAR2 DEFAULT NULL,
  result              OUT CLOB
);

Parameters

Parameter Description

schema_name

Specifies the schema for which the scope needs to be returned. This field is optional. If you don’t provide it or it is set to null, the system automatically uses the schema of the user who runs the dbms_data_access_admin procedure.

schema_object_name

Specifies the Schema object for which the scope needs to be returned. This field is optional. If you omit it or specify NULL, the unregister operation applies to the creation scope of the entire schema.

result

Lists the output containing registered scope information.