142.4.13 SHOW_SERVICE_STATUS Function

The SHOW_SERVICE_STATUS function returns the configuration of all services either on the current container, the CDB, or both.

Syntax

DBMS_OBSERVABILITY.SHOW_SERVICE_STATUS( info_level IN BINARY_INTEGER DEFAULT all_info );

Parameters

Table 142-18 SHOW_SERVICE_STATUS Function Parameters

Parameter Description

info_level

Specifies the level of information to return. The default is all information.

Usage Notes

The SHOW_SERVICE_STATUS function returns a CLOB containing a list of JSONs as follows:
[{"Component":[{"Service/Option":"Name","Enabled":0 or 1}]}]

Examples

The following example illustrates how to show the runtime information:
set serveroutput on;
DECLARE
  v_config  VARCHAR2;
BEGIN
  -- See global configuration
  SELECT dbms_observability.show_service_status( info_level => dbms_observability.runtime_info )
  INTO   v_config;

  dbms_output.put_line( v_config );
END;
/
The following example illustrates how to show the container configuration:
set serveroutput on;
DECLARE
  v_config  VARCHAR2;
BEGIN
  -- See container's configuration
  SELECT dbms_observability.show_service_status( info_level => dbms_observability.container_info )
  INTO   v_config;

  dbms_output.put_line( v_config );
END;
/
The following example illustrates two methods of showing all information:
set serveroutput on;
DECLARE
  v_config  VARCHAR2;
BEGIN
  -- See all with default value
  SELECT dbms_observability.show_service_status
  INTO   v_config;
  -- or see all information using the all_info constant
  SELECT dbms_observability.show_service_status( info_level => dbms_observability.all_info )
  INTO   v_config;

  dbms_output.put_line( v_config );
END;
/