DBMS_TELEMETRY_ADMIN

The DBMS_TELEMETRY_ADMIN package provides a collection of administration procedures to manage the users of a workspace.

This chapter contains the following topics:

DBMS_TELEMETRY_ADMIN Overview

These workspace administration APIs that are implemented using the DBMS_TELEMETRY_ADMIN package enable the Telemetry workspace administrator to:

See Also: User Roles and Privileges for more information about the Telemetry workspace administrator user role.

DBMS_TELEMETRY_ADMIN Security Model

The DBMS_TELEMETRY_ADMIN is an invoker’s right package owned by the user with the Telemetry workspace administrator role. The Telemetry workspace administrator can use DBMS_TELEMETRY_ADMIN for workspace administration tasks.

Summary of DBMS_TELEMETRY_ADMIN Subprograms

This table lists and briefly describes the DBMS_TELEMETRY_ADMIN package subprograms.

Table 1 DBMS_TELEMETRY_ADMIN Package

Subprogram Description
ENABLE_WORKSPACE_USER Procedure Enables a database user in the Oracle AI Database Telemetry Streaming workspace
DISABLE_WORKSPACE_USER Procedure Disables a user in the Oracle AI Database Telemetry Streaming workspace
SET_WORKSPACE_PARAMETER Procedure Sets workspace parameters for an Oracle AI Database Telemetry Streaming workspace
GET_WORKSPACE_PARAMETER Function Returns the value of a workspace parameter for an Oracle AI Database Telemetry Streaming workspace
ENABLE_WORKSPACE_ORDS Procedure Enables ORDS for an Oracle AI Database Telemetry Streaming workspace
GET_WORKSPACE_ORDS_ADMIN_AUTH Function Gets an ORDS Auth ID in the form of clientID-client secret for an ORDS user

ENABLE_WORKSPACE_USER Procedure

This procedure enables an existing database user as an ingest, a query user, or both for a Oracle AI Database Telemetry Streaming workspace.

Syntax

enable_workspace_user(
       workspace_name IN VARCHAR2,
       user_name      IN VARCHAR2,
       user_role      IN VARCHAR2);

Parameters

Table 2 ENABLE_WORKSPACE_USER

Parameter Description
workspace_name Name of the workspace to which an existing database user needs to be enabled
user_name

Name of an already existing database user who needs to be enabled in the workspace as an ingest user, query user, or both.

Ingest user and query user names can be any valid database user names and can contain non-ASCII characters.

user_role The user_role can be one of the following: ‘INGEST’, ‘QUERY’, ‘INGEST|QUERY’

Note: Multiple workspaces cannot have the same user assigned to them. An error is returned if the user_name does not exist or is already associated with another workspace.

DISABLE_WORKSPACE_USER Procedure

This procedure disables an ingest or a query user from a Oracle AI Database Telemetry Streaming workspace.

Syntax

disable_workspace_user(
        workspace_name IN VARCHAR2,
        user_name      IN VARCHAR2);

Parameters

Table 3 DISABLE_WORKSPACE_USER

Parameter Description
workspace_name Name of the workspace in which a workspace user needs to be disabled
user_name Name of the ingest or query user (who is an already existing database user) who needs to be disabled in the workspace

Note: An error is returned if a user_name that is not associated the workspace_name is used.

SET_WORKSPACE_PARAMETER Procedure

This procedure sets workspace parameters for an Oracle AI Database Telemetry Streaming workspace.

Syntax

set_workspace_parameter(
    workspace_name  IN VARCHAR2,
    parameter_name  IN VARCHAR2,
    parameter_value IN VARCHAR2);

Parameters

Table 4 SET_WORKSPACE_PARAMETER

Parameter Description
workspace_name Name of the workspace for which a parameter needs to be set
parameter_name Name of the parameter that needs to be set for the workspace
parameter_value The value of the parameter to be set

Note: Specifying an invalid workspace name, an invalid parameter name, or an invalid value raises an error.

See Also: Oracle AI Database Telemetry Streaming PDB Parameters for more information about valid parameter names and their valid values.

GET_WORKSPACE_PARAMETER Function

This function returns the value of a workspace parameter for an Oracle AI Database Telemetry Streaming workspace.

Syntax

get_workspace_parameter(
    workspace_name IN VARCHAR2,
    parameter_name IN VARCHAR2)
    return VARCHAR2;

Parameters

Table 5 GET_WORKSPACE_PARAMETER

Parameter Description
workspace_name Name of the workspace for which a parameter value needs to be returned
parameter_name Name of the parameter for which the value needs to be returned

Note: Specifying an invalid workspace name, an invalid parameter name, or an invalid value raises an error.

See Also: Oracle AI Database Telemetry Streaming PDB Parameters for more information about valid parameter names and their valid values.

ENABLE_WORKSPACE_ORDS Procedure

This procedure enables Oracle REST Data Services (ORDS) for the given Oracle AI Database Telemetry Streaming workspace and creates Oracle AI Database Telemetry Streaming REST endpoints.

A workspace administrator can use the ENABLE_WORKSPACE_ORDS procedure to enable ORDS for their workspace.

Syntax

enable_workspace_ords(
       workspace_name IN VARCHAR2);

Parameters

Table 6 ENABLE_WORKSPACE_ORDS

Parameter Description
workspace_name Name of the workspace for which ORDS needs to be enabled and to which Oracle AI Database Telemetry Streaming ORDS endpoints have to be created.

Note: The schema TM$ should be enabled for ORDS by the ORDS DBA before enabling Oracle AI Database Telemetry Streaming ORDS for the workspace.

GET_WORKSPACE_ORDS_ADMIN_AUTH Function

This function gets the Telemetry ORDS Admin user’s client-id and client-secret OAuth credentials.

This function returns the OAuth credentials of the ORDS admin user in a JSON format: {"client_id":<client-id> , "client_secret": <client-secret>}.

Syntax

get_workspace_ords_admin_auth(
    workspace_name IN VARCHAR2)
    return VARCHAR2;

Parameters

Table 7 GET_WORKSPACE_ORDS_ADMIN_AUTH

Parameter Description
workspace_name Name of the workspace for which the ORDS Admin OAuth credentials (client_secret and client_password) need to be returned