Oracle DBMS_OBSERVABILITY
Version 26ai

General Information
Library Note Morgan's Library Page Header
The best Oracle News for FY2026

Oracle Database 26ai will be available on generic Linux platforms in January and soon on AIX and Windows
Purpose Manages ADBS Native Observability (OpenTelemetry) and provides native, in-database OpenTelemetry tracing and logging.

Provides a set of functions to use KSTRC and setup service and backend parameters. Allows users to configure services and set shared limits on bucket size and minimum operations. Natively tracks SQL operations as a database span and emits unified OTEL (OpenTelemetry) signals to your OpenTelemetry compliant collector.
AUTHID CURRENT_USER
Constants
Name Data Type Value
 services
all_services services 0
 options
all_options svc_options 0
show_extra_metadata svc_options 1
export_when_empty svc_options 2
capture_traces svc_options 3
 info_levels
all_info info_levels 0
runtime_info info_levels 1
container_info info_levels 2
 token types
oci_datakey token_types 0
 credential attributes
username credential_attributes 'USERNAME'
password credential_attributes 'PASSWORD'
comments credential_attributes 'COMMENTS'
token credential_attributes 'TOKEN'
 endpoint types
otel_logs endpoint_types 0
otel_traces endpoint_types 1
Data Types -- kstrc support
SUBTYPE services IS BINARY_INTEGER RANGE 0..0 NOT NULL;
SUBTYPE svc_options IS BINARY_INTEGER RANGE 0..3 NOT NULL;
SUBTYPE info_levels IS BINARY_INTEGER RANGE 0..2 NOT NULL;
SUBTYPE token_types I SBINARY_INTEGER RANGE 0..0 NOT NULL;
SUBTYPE credential_attributes IS VARCHAR2(20) NOT NULL;
SUBTYPE endpoint_types IS BINARY_INTEGER RANGE 0..1 NOT NULL;
Dependencies
DBMS_ASSERT JSON_ELEMENT_T
DBMS_CREDENTIAL JSON_OBJECT_T
DBMS_OBSERVABILITY_LIB  
Documented Yes
Exceptions
Error Code Reason
ORA-06501 if KSTRC encounters an error
ORA-65040  if not called inside the CDB
First Available 26ai
Pragma PRAGMA SUPPLEMENTAL_LOG_DATA(default, AUTO_WITH_COMMIT);
Security Model Owned by SYS with EXECUTE granted to the DBA role.
Source {ORACLE_HOME}/rdbms/admin/dbmsobs.sql
{ORACLE_HOME}/rdbms/admin/prvtobs.plb
Subprograms
 
ADD_ENDPOINT (new 26ai)
Store endpoint information to export data dbms_observability.add_endpoint(
endpoint_type   IN endpoint_types,
endpoint        IN VARCHAR2,
credential_name IN VARCHAR2 DEFAULT NULL);
TBD
 
ATTACH_CREDENTIAL (new 26ai)
Associates a credential with an endpoint dbms_observability.attach_credential(
endpoint        IN VARCHAR2,
credential_name IN VARCHAR2);
TBD
 
CREATE_CREDENTIAL (new 26ai)
Create a credential endpoint

Overload 1
dbms_observability.create_credential(
credential_name IN VARCHAR2,
username        IN VARCHAR2,
password        IN VARCHAR2,
comments        IN VARCHAR2 DEFAULT NULL);
exec dbms_observability.create_credential('TESTCRED', USER, 'Insec', 'DBMS_OBS_TEST');

col username format a10
col password format a45
col domain format a7
col comments format a15
col flags format 99
col key format a70
col connect_identifier format a20

SELECT obj#, username, domain, comments, flags, connect_identifier
FROM scheduler$_credential;

 OBJ# USERNAME DOMAIN COMMENTS       FLAGS CONNECT_IDENTIFIER
----- -------- ------ -------------- ----- ------------------
74440 SYS             DBMS_OBS_TEST      4

SELECT obj#, password
FROM FROM scheduler$_credential;

 OBJ# PASSWORD
----- --------------------------------------------
74440 FeKm7ELg+nu1AOmCRmjsa02gH6dHa6eFadSHvox7RTO
Overload 2 dbms_observability.create_credential(
credential_name IN VARCHAR2,
token_type      IN token_types,
token           IN VARCHAR2,
comments        IN VARCHAR2 DEFAULT NULL);
TBD
 
DETACH_CREDENTIAL (new 26ai)
Remove the credential linked to the endpoint dbms_observability.detach_credential(endpoint IN VARCHAR2);
TBD
 
DISABLE_ENDPOINT (new 26ai)
Prevent endpoint use dbms_observability.disable_endpoint(endpoint IN VARCHAR2);
TBD
 
DISABLE_SERVICE (new 26ai)
Disables the selected observability service for the current container dbms_observability.disable_service(svc_id IN services DEFAULT all_services);
TBD
 
DISABLE_SERVICE_OPTION (new 26ai)
Disables the selected observability service for the current container dbms_observability.disable_service_option(option_id IN svc_options DEFAULT all_options);
TBD
 
DROP_CREDENTIAL (new 26ai)
Delete named credential dbms_observability.drop_credential(credential_name IN VARCHAR2);
TBD
 
ENABLE_ENDPOINT (new 26ai)
Allow endpoint use dbms_observability.enable_endpoint(endpoint IN VARCHAR2);
TBD
 
ENABLE_SERVICE (new 26ai)
Enables the selected observability service for the current container dbms_observability.enable_service(svc_id IN services DEFAULT all_services);
TBD
 
ENABLE_SERVICE_OPTION (new 26ai)
Enables select observability parameter for current container dbms_observability.enable_service_option(option_id IN svc_options DEFAULT all_options);
TBD
 
SET_BUCKET_MAX_SIZE (new 26ai)
Set bucket maximum size limit

FYI: As of this writing the scale of bucket sizes for this proc is not known
dbms_observability.set_bucket_max_size(bucket_size IN BINARY_INTEGER);
exec dbms_observability.set_bucket_max_size(1024);

PL/SQL procedure successfully completed.
 
SET_GUARANTEED_MIN_OPERATIONS (new 26ai)
Set the bucket minimum operations limit

FYI: As of this writing the basis for setting minimum operations is not known
dbms_observability.set_guaranteed_min_operations(operations IN BINARY_INTEGER);
exec dbms_observability.set_guaranteed_min_operations(1024);

PL/SQL procedure successfully completed.
 
SHOW_ENDPOINTS (new 26ai)
List available endpoints dbms_observability.show_endpoints RETURN CLOB;
SELECT dbms_observability.show_endpoints;

SHOW_ENDPOINTS
--------------------------------------------------------------------------------
[{"Type":"Disk","Endpoint":"localhost","Status":"Enabled","Credential":"None"}]
 
SHOW_SERVICE_STATUS (new 26ai)
Returns the current container's configuration

Formatted at right to enhance readability
dbms_observability.show_service_status(info_level IN info_levels DEFAULT all_info)
RETURN VARCHAR2;
SELECT dbms_observability.show_service_status(0);

DBMS_OBSERVABILITY.SHOW_SERVICE_STATUS(0)
--------------------------------------------------
[{"Runtime":[
 {"Service":"Traces","Enabled":1},
 {"Service":"Logs","Enabled":1},
 {"Option":"Extra metadata","Enabled":0},
 {"Option":"Export when empty","Enabled":0},
 {"Option":"Capture traces","Enabled":1}]},
 {"Container":[
 {"Service":"Traces","Enabled":1},
 {"Service":"Logs","Enabled":1},
 {"Option":"Extra metadata","Enabled":0},
 {"Option":"Export when empty","Enabled":0},
 {"Option":"Capture traces","Enabled":1}]}]

SELECT dbms_observability.show_service_status(1);

DBMS_OBSERVABILITY.SHOW_SERVICE_STATUS(1)
--------------------------------------------------
[{"Runtime":[
 {"Service":"Traces","Enabled":1},
 {"Service":"Logs","Enabled":1},
 {"Option":"Extra metadata","Enabled":0},
 {"Option":"Export when empty","Enabled":0},
 {"Option":"Capture traces","Enabled":1}]}]

SELECT dbms_observability.show_service_status(2);

DBMS_OBSERVABILITY.SHOW_SERVICE_STATUS(2)
--------------------------------------------------
[{"Container":[
 {"Service":"Traces","Enabled":1},
 {"Service":"Logs","Enabled":1},
 {"Option":"Extra metadata","Enabled":0},
 {"Option":"Export when empty","Enabled":0},
 {"Option":"Capture traces","Enabled":1}]}]
 
UPDATE_CREDENTIAL (new 26ai)
Update credential secrets dbms_observability.update_credential(
credential_name IN VARCHAR2,
attribute       IN VARCHAR2,
value           IN VARCHAR2);
TBD

Related Topics
Built-in Functions
Built-in Packages
Database Security
DBMS_CREDENTIAL
DBMS_SCHEDULER
What's New In 21c
What's New In 26ai

Morgan's Library Page Footer
This site is maintained by Daniel Morgan. Last Updated: This site is protected by copyright and trademark laws under U.S. and International law. © 1998-2026 Daniel A. Morgan All Rights Reserved