Chapter 41. DBMS_TPR

Table of Contents

41.1. Overview
41.2. Procedures
41.2.1. CREATE_SNAPSHOT
41.2.2. CREATE_SNAPSHOT_ALL
41.2.3. REPORT_TEXT
41.2.4. REPORT_TEXT_ID
41.2.5. REPORT_TEXT_GID
41.2.6. REPORT_TEXT_LAST
41.2.7. REPORT_TEXT_SPECIFIC_TIMES
41.2.8. REPORT_TEXT_MARKED
41.2.9. REPORT_HTML
41.2.10. REPORT_HTML_ID
41.2.11. REPORT_HTML_GID
41.2.12. REPORT_HTML_LAST
41.2.13. REPORT_HTML_SPECIFIC_TIMES
41.2.14. REPORT_HTML_MARKED
41.2.15. FLUSH_ASH
41.2.16. ASH_REPORT_TEXT
41.2.17. CREATE_BASELINE
41.2.18. CREATE_BASELINE_ID
41.2.19. DROP_BASELINE
41.2.20. DROP_BASELINE_ID
41.2.21. BASELINE_REPORT_TEXT
41.2.22. BASELINE_REPORT_TEXT_ID

This chapter briefly introduces the DBMS_TPR package, and describes how to use the procedures and functions of the package. For more information, refer to "Chapter 14. Tibero Performance Repository" in Tibero Administrator's Guide.

41.1. Overview

DBMS_TPR provides functions required for using Tibero Performance Repository (hereafter TPR).

41.2. Procedures

This section describes the procedures provided by the DBMS_TPR package, in alphabetical order.

41.2.1. CREATE_SNAPSHOT

Creates a snapshot for TPR.

Details about the CREATE_SNAPSHOT procedure are as follows:

  • Prototype

    PROCEDURE CREATE_SNAPSHOT();
  • Example

    exec DBMS_TPR.CREATE_SNAPSHOT();
    /

41.2.2. CREATE_SNAPSHOT_ALL

Creates a snapshot for TPR on all TAC instances.

Each created snapshot is assigned a snapshot ID as well as a common global snapshot ID used to identify the snapshot on all instances.

Details about the CREATE_SNAPSHOT_ALL procedure are as follows:

  • Prototype

    PROCEDURE CREATE_SNAPSHOT_ALL();
  • Example

    exec DBMS_TPR.CREATE_SNAPSHOT_ALL();
    /

41.2.3. REPORT_TEXT

Creates a performance analysis report (in text format) for the specified time period.

Details about the REPORT_TEXT procedure are as follows:

  • Prototype

    PROCEDURE REPORT_TEXT
    (
        begin_time       IN DATE
        end_time         IN DATE
        instance_no      IN VARCHAR
        file_name        IN VARCHAR
    );
  • Parameter

    ParameterDescription
    begin_timeStart time of the reporting period.
    end_timeEnd time of the reporting period.
    instance_noInstance number to create the report for. (Default value: ALL)
    file_name

    Name of the report to create.

    (Default value: tpr_report.{db_name}.{current_time}.txt)

  • Example

    The following creates a report for the time period marked by begin_time and end_time parameter values.

    exec DBMS_TPR.REPORT_TEXT('2011/07/01 12:00:00', '2011/07/02 11:59:59');
    /

    The following creates a report with the name specified in the file_name parameter.

    exec DBMS_TPR.REPORT_TEXT('2011/07/01 12:00:00', 
    '2011/07/02 11:59:59', file_name=>'tpr.txt');
    /

41.2.4. REPORT_TEXT_ID

Creates a performance analysis report (in text format) for the specified snapshot ID or snapshot ID range.

Details about the REPORT_TEXT_ID procedure for a single or multiple snapshot IDs are as follows:

  • For specific ID

    • Prototype

      PROCEDURE REPORT_TEXT_ID
      (
          one_snap_id       IN NUMBER
          file_name         IN VARCHAR
      );
    • Parameters

      ParameterDescription
      one_snap_idID of the snapshot to create the report for.
      file_name

      Name of the report to create.

      (Default value: tpr_report.{db_name}.{current_time}.txt)

    • Example

      exec DBMS_TPR.REPORT_TEXT_ID(5);
      /
  • For specific range of IDs

    • Prototype

      PROCEDURE REPORT_TEXT_ID
      (
          begin_snap_id       IN NUMBER
          end_snap_id         IN NUMBER
          instance_no         IN VARCHAR
          file_name           IN VARCHAR
      );
    • Parameters

      ParameterDescription
      begin_snap_idID of the start snapshot.
      end_snap_idID of the end snapshot.
      instance_noInstance number to create the report for. (Default value: ALL)
      file_name

      Name of the report to create.

      (Default value: tpr_report.{db_name}.{current_time}.txt)

    • Example

      The following creates a report for all instances by default because the instance_no is not specified.

      exec DBMS_TPR.REPORT_TEXT_ID(5, 10);
      /

      The following creates a report for the instance specified by the instance_no parameter.

      exec DBMS_TPR.REPORT_TEXT_ID(5, 10, instance=>'2');
      /

41.2.5. REPORT_TEXT_GID

Creates a performance analysis report (in text format) for the specified snapshot GID or snapshot GID range.

Details about the REPORT_TEXT_GID procedure for a single snapshot GID or multiple snapshot GIDs are as follows:

  • For specific GID

    • Prototype

      PROCEDURE REPORT_TEXT_GID
      (
          one_snap_gid       IN NUMBER
          file_name          IN VARCHAR
      );
    • Parameters

      ParameterDescription
      one_snap_gidGID of the snapshot to create the report for.
      file_name

      Name of the report to create.

      (Default value: tpr_report.{db_name}.{current_time}.txt)

    • Example

      exec DBMS_TPR.REPORT_TEXT_GID(3);
      /
  • For specific range of GIDs

    • Prototype

      PROCEDURE REPORT_TEXT_ID
      (
          begin_snap_gid       IN NUMBER
          end_snap_gid         IN NUMBER
          file_name            IN VARCHAR
      );
    • Parameters

      ParameterDescription
      begin_snap_gidGID of the start snapshot.
      end_snap_gidGID of an end snapshot.
      file_name

      Name of the report to create.

      (Default value: tpr_report.{db_name}.{current_time}.txt)

    • Example

      exec DBMS_TPR.REPORT_TEXT_GID(3, 4);
      /

41.2.6. REPORT_TEXT_LAST

Creates a performance analysis report (in text format) for the most recent snapshot.

Details about the REPORT_TEXT_LAST procedure are as follows:

  • Prototype

    PROCEDURE REPORT_TEXT_LAST(
        file_name         IN VARCHAR
    ); 
  • Parameter

    ParameterDescription
    file_name

    Name of the report to create.

    (Default value: tpr_report.{db_name}.{current_time}.txt)

  • Example

    exec DBMS_TPR.REPORT_TEXT_LAST();
    /

41.2.7. REPORT_TEXT_SPECIFIC_TIMES

Creates a performance analysis report (in text format) for snapshots from a specific day of the week and time period.

Details about the REPORT_TEXT_SPECIFIC_TIMES are as follows:

  • Prototype

    PROCEDURE REPORT_TEXT_SPECIFIC_TIMES(
       begin_time        IN DATE
       end_time          IN DATE
       begin_hour        IN VARCHAR2
       end_hour          IN VARCHAR2
       days              IN VARCHAR2
       instance_no       IN VARCHAR2
       file_name         IN VARCHAR
    );
  • Parameters

    ParameterDescription
    begin_timeStart time and date of the reporting period. Use DATE type of the format currently in use.
    end_timeEnd time and date of the reporting period. Use DATE type of the format currently in use.
    begin_hourStart time of the snapshot period. Use VARCHAR2 type of the form 'HH24:MM'. (Example: 09:00)
    end_hourEnd time of the snapshot period. Use VARCHAR2 type of the form 'HH24:MM'. (Example: 18:00)
    days

    Day of the week of the snapshot to print.

    (Default value: MON,TUE,WED,THU,FRI,SAT,SUN)

    instance_noInstance number to create the report for. (Default value: ALL)
    file_name

    Name of the report to create.

    (Default value: tpr_report.{db_name}.{current_time}.txt)

  • Example

    The following is an example of creating a report for the snapshot created on Mon, Wed, and Fri between 9 AM and 6 PM during the period from 2015/01/01 00:00:00 to 2015/02/01 23:59:59.

    exec DBMS_TPR.REPORT_TEXT_SPECIFIC_TIMES('2015/01/01 00:00:00', 
                                             '2015/02/01 23:59:59', 
                                             '09:00', '18:00', 'MON,WED,FRI');
    /

    Use the nstance_no parameter to create a report for the specific instance. Otherwise, a report is generated for all instances.

    exec DBMS_TPR.REPORT_TEXT_SPECIFIC_TIMES( '2015/01/01 00:00:00', 
                                              '2015/02/01 23:59:59', 
                                              '09:00', '18:00', 
                                              'MON,WED,FRI', instance_no=>'1');
    /

    Use the file_name parameter to create a report for the specific file name.

    exec DBMS_TPR.REPORT_TEXT_SPECIFIC_TIMES('2015/01/01 00:00:00', 
                                             '2015/02/01 23:59:59', 
                                             '09:00', '18:00', 'MON,WED,FRI', 
                                             instance_no=>'1', 'workinghours.txt');
    /

41.2.8. REPORT_TEXT_MARKED

Creates a performance analysis report (in text format) for user specified snapshots.

Details about the REPORT_TEXT_MARKED are as follows:

  • Prototype

    PROCEDURE REPORT_TEXT_MARKED
    (
       file_name         IN VARCHAR
    );
  • Parameter

    ParameterDescription
    file_name

    Name of the report to create.

    (Default value: tpr_report.{db_name}.{current_time}.txt)

  • Example

    User must first specify the target snapshots for the report. To view snapshot related information and whether it is marked for reporting, query the V$TPR_SNAPSHOT view.

    select * from V$TPR_SNAPSHOT;
    /
       SNAP_ID    THREAD# INSTANCE_NUMBER BEGIN_INTERVAL_TIME             
       ---------- ---------- --------------- --------------------------------
       END_INTERVAL_TIME                  SNAP_GID MARKED_FOR_REPORT
       -------------------------------- ---------- -----------------
                1          0               0 2015/11/26
                2015/11/26                                  N
    
                2          0               0 2015/11/27
                2015/11/27                                  N
    /

    Execute the following query to print report for SNAP_ID 2.

    update V$TPR_SNAPSHOT set MARKED_FOR_REPORT='Y' where SNAP_ID=2;
    commit;
    /

    Query V$TPR_SNAPSHOT again to see that Snapshot 2 has been marked for reporting.

       SNAP_ID    THREAD# INSTANCE_NUMBER BEGIN_INTERVAL_TIME             
       ---------- ---------- --------------- --------------------------------
       END_INTERVAL_TIME                  SNAP_GID MARKED_FOR_REPORT
       -------------------------------- ---------- -----------------
                1          0               0 2015/11/26
                2015/11/26                                  N
    
                2          0               0 2015/11/27
                2015/11/27                                  Y
    /

    After marking all desired snapshots, print the report.

    exec DBMS_TPR.REPORT_TEXT_MARKED();
    /

    Specify the file_name parameter to create the report using the specified file name.

    exec DBMS_TPR.REPORT_TEXT_MARKED('marked.txt');
    /

41.2.9. REPORT_HTML

Creates a performance analysis report (in html format) for the specified time period.

Details about the REPORT_HTML procedure are as follows:

  • Prototype

    PROCEDURE REPORT_HTML
    (
        begin_time       IN DATE
        end_time         IN DATE
        instance_no      IN VARCHAR
        file_name        IN VARCHAR
    );
  • Parameter

    ParameterDescription
    begin_timeStart time of the reporting period.
    end_timeEnd time of the reporting period.
    instance_noInstance number to create the report for. (Default value: ALL)
    file_name

    Name of the report to create.

    (Default value: tpr_report.{db_name}.{current_time}.html)

  • Example

    The following creates a report for the time period marked by begin_time and end_time parameter values.

    exec DBMS_TPR.REPORT_HTML('2011/07/01 12:00:00', '2011/07/02 11:59:59');
    /

    The following creates a report with the name specified in the file_name parameter.

    exec DBMS_TPR.REPORT_HTML('2011/07/01 12:00:00', '2011/07/02 11:59:59', file_name=>'tpr.html');
    /

41.2.10. REPORT_HTML_ID

Creates a performance analysis report (in html format) for the specified snapshot ID or snapshot ID range.

Details about the REPORT_HTML_ID procedure for a single or multiple snapshot IDs are as follows:

  • For specific ID

    • Prototype

      PROCEDURE REPORT_HTML_ID
      (
          one_snap_id       IN NUMBER
          file_name         IN VARCHAR
      );
    • Parameters

      ParameterDescription
      one_snap_idID of the snapshot to create the report for.
      file_name

      Name of the report to create.

      (Default value: tpr_report.{db_name}.{current_time}.html)

    • Example

      exec DBMS_TPR.REPORT_HTML_ID(5);
      /
  • For specific range of IDs

    • Prototype

      PROCEDURE REPORT_HTML_ID
      (
          begin_snap_id       IN NUMBER
          end_snap_id         IN NUMBER
          instance_no         IN VARCHAR
          file_name           IN VARCHAR
      );
    • Parameters

      ParameterDescription
      begin_snap_idID of the start snapshot.
      end_snap_idID of the end snapshot.
      instance_noInstance number to create the report for. (Default value: ALL)
      file_name

      Name of the report to create.

      (Default value: tpr_report.{db_name}.{current_time}.html)

    • Example

      The following creates a report for all instances by default because the instance_no is not specified.

      exec DBMS_TPR.REPORT_HTML_ID(5, 10);
      /

      The following creates a report for the instance specified by the instance_no parameter.

      exec DBMS_TPR.REPORT_HTML_ID(5, 10, instance_no=>'2');
      /

41.2.11. REPORT_HTML_GID

Creates a performance analysis report (in html format) for the specified snapshot GID or a snapshot GID range.

Details about the REPORT_HTML_GID procedure for a single or multiple snapshot GIDs are as follows:

  • For specific GID

    • Prototype

      PROCEDURE REPORT_HTML_GID
      (
          one_snap_gid       IN NUMBER
      );
    • Parameters

      ParameterDescription
      one_snap_gidGID of the snapshot to create the report for.
      file_name

      Name of the report to create.

      (Default value: tpr_report.{db_name}.{current_time}.html)

    • Example

      exec DBMS_TPR.REPORT_HTML_GID(3);
      /
  • For specific range of GIDs

    • Prototype

      PROCEDURE REPORT_HTML_ID
      (
          begin_snap_gid       IN NUMBER
          end_snap_gid         IN NUMBER
          file_name            IN VARCHAR
      );
    • Parameters

      ParameterDescription
      begin_snap_gidGID of the start snapshot.
      end_snap_gidGID of an end snapshot.
      file_name

      Name of the report to create.

      (Default value: tpr_report.{db_name}.{current_time}.html)

    • Example

      exec DBMS_TPR.REPORT_HTML_GID(3, 4);
      /

41.2.12. REPORT_HTML_LAST

Creates a performance analysis report (in html format) for the most recent snapshot.

Details about the REPORT_HTML_LAST procedure are as follows:

  • Prototype

    PROCEDURE REPORT_HTML_LAST
    (
        file_name         IN VARCHAR
    );
  • Parameter

    ParameterDescription
    file_name

    Name of the report to create.

    (Default value: tpr_report.{db_name}.{current_time}.html)

  • Example

    exec DBMS_TPR.REPORT_HTML_LAST();
    /

41.2.13. REPORT_HTML_SPECIFIC_TIMES

Creates a performance analysis report (in html format) for snapshots from a specific day of the week and time period.

Details about the REPORT_HTML_SPECIFIC_TIMES are as follows:

  • Prototype

    PROCEDURE REPORT_HTML_SPECIFIC_TIMES
    (
       begin_time        IN DATE
       end_time          IN DATE
       begin_hour        IN VARCHAR2
       end_hour          IN VARCHAR2
       days              IN VARCHAR2
       instance_no       IN VARCHAR2
       file_name         IN VARCHAR
    );
  • Parameters

    ParameterDescription
    begin_timeStart time and date of the reporting period. Use DATE type of the format currently in use.
    end_timeEnd time and date of the reporting period. Use DATE type of the format currently in use.
    begin_hourStart time of the snapshot period. Use VARCHAR2 type of the form 'HH24:MM'. (Example: 09:00)
    end_hourEnd time of the snapshot period. Use VARCHAR2 type of the form 'HH24:MM'. (Example: 18:00)
    days

    Day of the week of the snapshot to print.

    (Default value: MON,TUE,WED,THU,FRI,SAT,SUN)

    instance_noInstance number to create the report for. (Default value: ALL)
    file_name

    Name of the report to create.

    (Default value: tpr_report.{db_name}.{current_time}.html)

  • Example

    The following is an example of creating a report for the snapshot created on Mon, Wed, and Fri between 9 AM and 6 PM during the period from 2015/01/01 00:00:00 to 2015/02/01 23:59:59.

    exec DBMS_TPR.REPORT_HTML_SPECIFIC_TIMES( '2015/01/01 00:00:00', 
                                              '2015/02/01 23:59:59', 
                                              '09:00', '18:00', 'MON,WED,FRI');
    /

    Use the nstance_no parameter to create a report for the specific instance. Otherwise, a report is generated for all instances.

    exec DBMS_TPR.REPORT_HTML_SPECIFIC_TIMES( '2015/01/01 00:00:00',
                                              '2015/02/01 23:59:59', 
                                              '09:00', '18:00', 'MON,WED,FRI', 
                                              instance_no=>'1');
    /

    Use the file_name parameter to create a report for the specific file name.

    exec DBMS_TPR.REPORT_HTML_SPECIFIC_TIMES( '2015/01/01 00:00:00', 
                                              '2015/02/01 23:59:59', 
                                              '09:00', '18:00', 'MON,WED,FRI', 
                                              instance_no=>'1', 'workinghours.txt');
    /

41.2.14. REPORT_HTML_MARKED

Creates a performance analysis report (in html format) for user specified snapshots.

Details about the REPORT_HTML_MARKED are as follows:

  • Prototype

    PROCEDURE REPORT_HTML_MARKED
    (
       file_name         IN VARCHAR
    );
  • Parameter

    ParameterDescription
    file_name

    Name of the report to create.

    (Default value: tpr_report.{db_name}.{current_time}.html)

  • Example

    User must first specify the target snapshots for the report. To view snapshot related information and whether it is marked for reporting, query the V$TPR_SNAPSHOT view.

    select * from V$TPR_SNAPSHOT;
    /
       SNAP_ID    THREAD# INSTANCE_NUMBER BEGIN_INTERVAL_TIME             
       ---------- ---------- --------------- --------------------------------
       END_INTERVAL_TIME                  SNAP_GID MARKED_FOR_REPORT
       -------------------------------- ---------- -----------------
                1          0               0 2015/11/26
                2015/11/26                                  N
    
                2          0               0 2015/11/27
                2015/11/27                                  N
    /

    Execute the following query to print report for SNAP_ID 2.

    update V$TPR_SNAPSHOT set MARKED_FOR_REPORT='Y' where SNAP_ID=2;
    commit;
    /

    Query V$TPR_SNAPSHOT again to see that Snapshot 2 has been marked for reporting.

       SNAP_ID    THREAD# INSTANCE_NUMBER BEGIN_INTERVAL_TIME             
       ---------- ---------- --------------- --------------------------------
       END_INTERVAL_TIME                  SNAP_GID MARKED_FOR_REPORT
       -------------------------------- ---------- -----------------
                1          0               0 2015/11/26
                2015/11/26                                  N
    
                2          0               0 2015/11/27
                2015/11/27                                  Y
    /

    After marking all desired snapshots, print the report.

    exec DBMS_TPR.REPORT_HTML_MARKED();
    /

    Specify the file_name parameter to create the report using the specified file name.

    exec DBMS_TPR.REPORT_HTML_MARKED('marked.txt');
    /

41.2.15. FLUSH_ASH

Saves ASH samples in memory to the _TPR_ACTIVE_SESSION_HISTORY table.

Details about the FLUSH_ASH procedure are as follows:

  • Prototype

    PROCEDURE FLUSH_ASH ();
  • Example

    The following saves ASH samples in memory to the _TPR_ACTIVE_SESSION_HISTORY table.

    exec DBMS_TPR.FLUSH_ASH();
    /

41.2.16. ASH_REPORT_TEXT

Creates an ASH performance analysis report (in text format) for the specified time period by collecting ASH sample data which are logged only when IPARAM(ACTIVE_SESSION_HISTORY) is set to Y.

Details about the ASH_REPORT_TEXT procedure are as follows:

  • Prototype

    PROCEDURE ASH_REPORT_TEXT
    (
        begin_time       IN DATE
        end_time         IN DATE
        instance_no      IN VARCHAR
        file_name        IN VARCHAR
    );
  • Parameter

    ParameterDescription
    begin_timeStart time of the reporting period.
    end_timeEnd time of the reporting period.
    instance_noInstance number to create the report for. (Default value: ALL)
    file_name

    Name of the report to create.

    (Default value: ash_report.{db_name}.{current_time}.txt)

  • Example

    The following creates a report for the time period marked by begin_time and end_time parameter values.

    exec DBMS_TPR.ASH_REPORT_TEXT('2015/01/29 21:00:00', 
    '2015/01/29 22:59:59');
    /

    The following creates a report with the name specified in the file_name parameter.

    exec DBMS_TPR.ASH_REPORT_TEXT( '2015/01/29 21:00:00', 
                                   '2015/01/29 22:59:59', 
                                   file_name=>'ash.txt');
    /

    The following creates a report for the instance specified by the instance_no parameter. By default, a report is created for all instances if an instance is not specified.

    exec DBMS_TPR.ASH_REPORT_TEXT( '2015/01/29 21:00:00',
                                   '2015/01/29 22:59:59', 
                                  instance_no=>'1');
    /

41.2.17. CREATE_BASELINE

Creates a baseline and registers TPR snapshots from the specified time period in the baseline. Registered snapshots are retained even after their retention period expires. Details about a registered baseline can be queried from the _TPR_BASELINE table.

Details about the CREATE_BASELINE procedure are as follows:

  • Prototype

    PROCEDURE CREATE_BASELINE
    (
        begin_time       IN DATE
        end_time         IN DATE
        instance_no      IN VARCHAR
        baseline_name    IN VARCHAR
        expiration       IN NUMBER
    );
  • Parameter

    ParameterDescription
    begin_timeStart time of the reporting period.
    end_timeEnd time of the reporting period.
    instance_noInstance number to create the baseline for. (Default value: ALL)
    baseline_nameName of the baseline to create. (Default value: BASELINE{BASELINE_ID})
    expirationBaseline expiration period. (Default value: NULL, unit: hour)
  • Example

    The following creates a baseline for the time period marked by begin_time and end_time parameter values.

    exec DBMS_TPR.CREATE_BASELINE( '2015/01/29 21:00:00', 
                                   '2015/01/29 22:59:59');
    /

    The following creates a baseline with the name specified in the baseline_name parameter.

    exec DBMS_TPR.CREATE_BASELINE( '2015/01/29 21:00:00', 
                                   '2015/01/29 22:59:59', 
                                    baseline_name=>'my_baseline');
    /

    The following creates the baseline for the instance specified by the instance_no parameter. By default, a baseline is created for all instances if an instance is not specified.

    exec DBMS_TPR.CREATE_BASELINE( '2015/01/29 21:00:00', 
                                   '2015/01/29 22:59:59',
                                   instance_no=>'1');
    /

    The following creates a baseline with the expiration period specified by the expiration parameter. The baseline is removed automatically after the expiration period. If an expiration period is not specified, the baseline is not removed until the user removes it manually.

    exec DBMS_TPR.CREATE_BASELINE( '2015/01/29 21:00:00', 
                                   '2015/01/29 22:59:59', 
                                    expiration=>168);
    /

41.2.18. CREATE_BASELINE_ID

Creates a baseline and registers the specified snapshot ID or snapshot ID range as the baseline.

Details about the CREATE_BASELINE_ID procedure for a single snapshot ID or a range of snapshot IDs are as follows:

  • For specific ID

    • Prototype

      PROCEDURE CREATE_BASELINE_ID
      (
          one_snap_id    IN NUMBER
          baseline_name    IN VARCHAR
          expiration       IN NUMBER
      );
    • Parameters

      ParameterDescription
      one_snap_idID of the TPR snapshot to include in the baseline.
      baseline_nameName of the baseline to create. (Default value: BASELINE{BASELINE_ID})
      expirationBaseline expiration period. (Default value: NULL, unit: hour)
    • Example

      exec DBMS_TPR.CREATE_BASELINE_ID(30);
      /

      The following creates a baseline with the name specified by the baseline_name parameter.

      exec DBMS_TPR.CREATE_BASELINE_ID(30, baseline_name=>'my_baseline');
      /

      The following creates a baseline with the expiration period specified by the expiration parameter. The baseline is removed automatically after the expiration period. If an expiration period is not specified, the baseline is not removed until the user removes it manually.

      exec DBMS_TPR.CREATE_BASELINE_ID(30, expiration=>168);
      /
  • For specific range of IDs

    • Prototype

      PROCEDURE CREATE_BASELINE_ID
      (
          begin_snap_id    IN NUMBER
          end_snap_id      IN NUMBER
          instance_no      IN VARCHAR
          baseline_name    IN VARCHAR
          expiration       IN NUMBER
      );
    • Parameters

      ParameterDescription
      begin_snap_idID of the start snapshot.
      end_snap_idID of the end snapshot.
      instance_noInstance number to create the baseline for. (Default value: ALL)
      baseline_nameName of the baseline to create. (Default value: BASELINE{BASELINE_ID})
      expirationBaseline expiration period. (Default value: NULL, unit: hour)
    • Example

      exec DBMS_TPR.CREATE_BASELINE_ID(30, 50);
      /

      The following creates a baseline with the name specified in the baseline_name parameter.

      exec DBMS_TPR.CREATE_BASELINE_ID(30, 50, baseline_name=>'my_baseline');
      /

      The following creates a baseline for the instance specified by the instance_no parameter. By default, a baseline is created for all instances if an instance is not specified.

      exec DBMS_TPR.CREATE_BASELINE_ID(30, 50, instance_no=>'1');
      /

      The following creates a baseline with the expiration period specified by the expiration parameter. The baseline is removed automatically after the expiration period. If an expiration period is not specified, the baseline is not removed until the user removes it manually.

      exec DBMS_TPR.CREATE_BASELINE_ID(30, 50, expiration=>168);
      /

41.2.19. DROP_BASELINE

Drops the baseline with the specified name.

Details about the DROP_BASELINE procedure are as follows:

  • Prototype

    PROCEDURE DROP_BASELINE
    (
        baseline_name_    IN VARCHAR
    );
  • Parameter

    ParameterDescription
    baseline_name_Name of the baseline to drop.
  • Example

    exec DBMS_TPR.DROP_BASELINE('my_baseline');
    /

41.2.20. DROP_BASELINE_ID

Drops the baseline with the specified ID.

Details about the DROP_BASELINE_ID procedure are as follows:

  • Prototype

    PROCEDURE DROP_BASELINE_ID
    (
        baseline_id_    IN NUMBER
    );
  • Parameter

    ParameterDescription
    baseline_id_Name of the baseline to drop.
  • Example

    exec DBMS_TPR.DROP_BASELINE_ID(5);
    /

41.2.21. BASELINE_REPORT_TEXT

Creates a report (in text format) for TPR snapshots in the baseline with the specified name. This report produces the same result as when using the REPORT_TEXT procedure.

Details about the BASELINE_REPORT_TEXT procedure are as follows:

  • Prototype

    PROCEDURE BASELINE_REPORT_TEXT
    (
        baseline_name_    IN VARCHAR
        file_name         IN VARCHAR
    );
  • Parameter

    ParameterDescription
    baseline_name_Name of the baseline to create the report for.
    file_name

    Name of the report to create.

    (Default value: baseline_report.{db_name}.{current_time}.txt)

  • Example

    exec DBMS_TPR.BASELINE_REPORT_TEXT('my_baseline');
    /

    The following creates a report with the name specified by the file_name parameter.

    exec DBMS_TPR.BASELINE_REPORT_TEXT('my_baseline', file_name=>'baseline.txt');
    /

41.2.22. BASELINE_REPORT_TEXT_ID

Creates a report (in text format) for TPR snapshots in the baseline with the specified ID. This report produces the same result as when using the REPORT_TEXT procedure.

Details about the BASELINE_REPORT_TEXT_ID procedure are as follows:

  • Prototype

    PROCEDURE BASELINE_REPORT_TEXT_ID
    (
        baseline_id_      IN NUMBER
        file_name         IN VARCHAR
    );
  • Parameter

    ParameterDescription
    baseline_id_Baseline ID to create the report for.
    file_name

    Name of the report to create.

    (Default value: baseline_report.{db_name}.{current_time}.txt)

  • Example

    exec DBMS_TPR.BASELINE_REPORT_TEXT_ID(5);
    /

    The following creates a report with the name specified by the file_name parameter.

    exec DBMS_TPR.BASELINE_REPORT_TEXT_ID(5, file_name=>'baseline.txt');
    /