4 Installing and Enabling Telemetry Streaming in Oracle AI Database
This chapter describes the installation process and shows you how to enable Telemetry Streaming in Oracle AI Database.
Topics:
- Installation Overview
Learn about the types of Telemetry Streaming installation and the installation roadmap. - System Requirements
This section lists the software and database features required for installing Telemetry Streaming. - Enabling Telemetry Streaming in Oracle AI Database
Learn how you can enable Telemetry Streaming in Oracle AI Database. - Installing Oracle REST Data Services
Learn about how to install Oracle REST Data Services.
4.1 Installation Overview
Learn about the types of Telemetry Streaming installation and the installation roadmap.
Note:
Telemetry Streaming is available starting Oracle AI Database 26ai, Version 23.26.0, but it does not come bundled with Oracle AI Database. You must install Telemetry Streaming separately.
Basic Telemetry Streaming
As a minimal setup, if you want to run Telemetry Streaming using a SQL Plus client or any Oracle Call Interface (OCI) client, you can enable Oracle AI Database with Telemetry Streaming by running the SQL installation script from the admin directory, which installs the necessary PL/SQL packages for basic Telemetry Streaming setup. Once the script has run successfully, your database is Telemetry Streaming-enabled. You can then use the Telemetry Streaming PL/SQL packages for user administration, and ingest and query time series data.
See Also:
Enabling Telemetry Streaming in Oracle AI Database for more information about the SQL installation script.
End-to-End Telemetry Streaming
An end-to-end Telemetry Streaming installation enables you to:
-
Ingest metrics using REST or PL/SQL.
-
Query metrics using SQL and PromQL through PL/SQL packages.
Table 4-1 Installation Roadmap
Installation Step | Required/Optional | Purpose |
---|---|---|
Step 1: Run the SQL Script for installing the Telemetry Streaming packages. |
Required |
For enabling Telemetry Streaming on Oracle AI Database for basic use on SQL or OCI clients |
Step 2: Install ORDS |
Optional |
For ingesting or querying metrics from external REST clients using REST APIs |
4.2 System Requirements
This section lists the software and database features required for installing Telemetry Streaming.
The following table lists the software and their versions required for an end-to-end implementation of Telemetry Streaming.
Table 4-2 Software Requirements for Telemetry Streaming
Software | Purpose | Version |
---|---|---|
Oracle AI Database |
For storing and retrieving metrics |
Oracle AI Database 26ai, 23.26.0, or greater |
ORDS |
For REST API |
ORDS version 23, or greater |
Database Features
Telemetry Streaming is built on existing Oracle features and hence depends on these features in Oracle AI Database.
Table 4-3 Dependencies and Prerequisites
Feature | Purpose |
---|---|
Interval Partition |
For data organization that helps in data management and query performance |
Compression |
For compression data beyond a threshold to reduce storage footprint |
Scheduler Jobs |
For data lifecycle management |
4.3 Enabling Telemetry Streaming in Oracle AI Database
Learn how you can enable Telemetry Streaming in Oracle AI Database.
To enable Telemetry Streaming in Oracle AI Database, you must run the script from the
following files, which are located in the $ORACLE_HOME/rdbms/admin
directory.
Note:
If you intend on using ORDS for REST API, ensure that ORDS is installed before running the ORDS-related script.
Table 4-4 Telemetry Streaming Installation Script Files
File | Functionality |
---|---|
|
This script creates the TELEMETRY_DBA user and loads all Telemetry Streaming PL/SQL packages under it. It also creates the required synonyms and metadata tables in both SYS and TELEMETRY_DBA schemas. |
telemetry_install_ords.sql |
This script loads all ORDS-related Telemetry Streaming
PL/SQL packages ( |
Installation for Using Telemetry Streaming with PL/SQL
Complete the following steps to install Telemetry Streaming with a simple workspace setup having ingest, query and workspace admin users.
-
Run as SYS
@$ORACLE_HOME/rdbms/admin/telemetry_install_plsql.sql
(This creates TELEMETRY_DBA and installs Telemetry Streaming). -
Create a tablespace that you want to use for Telemetry Streaming (say,
TMTBS
). -
Create ingest, query, and admin users that you want to use for the workspace (say,
wrkspace_ingest_user
,wrkspace_query_user
, andwrkspace_admin_user
) and make the tablespace (TMTBS
) you created in the previous step as their default tablespace for the workspace. -
Create a workspace
WKSP1
on theTMTBS
tablespace connecting as any database user with DBA privileges. Run the following statement.exec TELEMETRY_DBA.dbms_telemetry_workspace.create_workspace('WKSP1','TMTBS');
-
Connect as any database user with DBA privileges and make
wrkspace_admin_user
the admin ofWKSP1
. Run the following statement.exec TELEMETRY_DBA.dbms_telemetry_workspace.enable_workspace_admin('WKSP1','wrkspace_admin_user');
-
Connect as the Admin user
wrkspace_admin_user
and enable ingest and query users on workspace. Run the following statements.exec dbms_telemetry_admin.enable_workspace_user('WKSP1','wrkspace_ingest_user','ingest')
exec dbms_telemetry_admin.enable_workspace_user('WKSP1','wrkspace_query_user','query')
The preceding steps (Installation for Using Telemetry Streaming with PL/SQL) conclude the Telemetry Streaming installation without ORDS. For installing Telemetry Streaming with ORDS, see Installing Oracle REST Data Services.
- Telemetry Streaming PDB Parameters
Configure Telemetry Streaming PDB parameters to manage performance and efficiency of Telemetry Streaming.
See Also:
DBMS_TELEMETRY_WORKSPACE and DBMS_TELEMETRY_ADMIN in Oracle AI Database PL/SQL Packages and Types Reference for more information about the workspace administration PL/SQL packages
4.3.1 Telemetry Streaming PDB Parameters
Configure Telemetry Streaming PDB parameters to manage performance and efficiency of Telemetry Streaming.
During the time of installation or after the installation, you can configure a few PDB parameters that best fit your use case. All parameters have their respective default values.
Table 4-5 Telemetry Streaming PDB Parameters
Parameter | Purpose | Default | Valid Values |
---|---|---|---|
|
Delete data older than these many hours |
240 |
1 to 87600 |
|
Compress data older than these many hours |
24 |
1 to 87600 |
|
Down sample data older than these many hours |
168 |
1 to 87600 |
|
Down sample the data in chunks of this interval in seconds |
60 |
1 to 2600000 |
|
Aggregate method to be used to down sample the data in the interval |
avg |
avg, min, max, sum |
Parent topic: Enabling Telemetry Streaming in Oracle AI Database
4.4 Installing Oracle REST Data Services
Learn about how to install Oracle REST Data Services.
Note:
Oracle REST Data Services (ORDS) must be installed separately. It is not included with Telemetry Streaming installation.
ORDS enables external clients to use REST APIs to ingest data into and query data from Telemetry Streaming.
To install ORDS, follow the installation instructions from the following link:
Installing and Configuring Oracle REST Data Services
Enabling Telemetry Streaming with ORDS
After the ORDS installation, run the SQL script to install the REST API handlers and enable the PL/SQL packages to be used with ORDS. The REST API infrastructure gets installed in Telemetry Streaming and you can start using the Administration REST APIs, Ingest REST APIs, and Query REST APIs in Telemetry Streaming.
See Also:
Enabling Telemetry Streaming in Oracle AI Database for more information about the ORDS install script and PL/SQL packages
Complete the following steps to install Telemetry Streaming with a simple workspace on a ORDS setup having ingest, query and workspace admin users.
To enable ORDS on a workspace, you must first get an ORDS
instance up and running having an ORDS DBA (say
ORDS_DBA
). Post that, complete the
following steps.
-
Run as SYS
@$ORACLE_HOME/rdbms/admin/telemetry_install_ords.sql
(This creates ORDS-related packages in Telemetry Streaming). -
Connect as
ORDS_DBA
and enable the ORDS schema for the TELEMETRY_DBA (Telemetry Administrator) and workspace (WKSP1
). Run the following code blocks.-
exec ORDS.enable_schema( p_enabled => TRUE, p_schema => 'TELEMETRY_DBA', p_url_mapping_type => 'BASE_PATH', p_url_mapping_pattern => 'TELEMETRY_DBA', p_auto_rest_auth => FALSE );
-
exec ORDS.enable_schema( p_enabled => TRUE, p_schema => 'TM$WKSP1', p_url_mapping_type => 'BASE_PATH', p_url_mapping_pattern => 'wksp1', p_auto_rest_auth => FALSE );
-
-
To set up the ORDS handlers for a workspace, connect to workspace admin (
UC1A
) and enable the Telemetry Streaming ORDS handlers. Run the following statement.exec dbms_telemetry_admin.enable_workspace_ords('WKSP1');
-
While connected as the workspace Admin, get the workspace ORDS Admin credentials. Run the following statement.
select dbms_telemetry_admin.get_workspace_ords_admin_auth('WKSP1');
See Also:
Managing ORDS Workspace Users and Using REST API for Workspace Administration for more information about managing ORDS workspace users and using REST API for workspace administration