Oracle的学习心得和知识总结(十六)|Oracle数据库Real Application Testing之Database Reply的内部变化逻辑

news/2025/2/22 22:52:17

注:提前言明 本文借鉴了以下博主、书籍或网站的内容,其列表如下:

1、参考书籍:《Oracle Database SQL Language Reference》
2、参考书籍:《PostgreSQL中文手册》
3、EDB Postgres Advanced Server User Guides,点击前往
4、PostgreSQL数据库仓库链接,点击前往
5、PostgreSQL中文社区,点击前往
6、Oracle Real Application Testing 官网首页,点击前往
7、Oracle 21C RAT Testing Guide,点击前往
8、了解Database Replay Capture内部原理,点击前往
9、database replay基础学习,点击前往


1、本文内容全部来源于开源社区 GitHub和以上博主的贡献,本文也免费开源(可能会存在问题,评论区等待大佬们的指正)
2、本文目的:开源共享 抛砖引玉 一起学习
3、本文不提供任何资源 不存在任何交易 与任何组织和机构无关
4、大家可以根据需要自行 复制粘贴以及作为其他个人用途,但是不允许转载 不允许商用 (写作不易,还请见谅 💖)


Oracle数据库Real Application Testing之Database Reply的内部变化逻辑

  • 文章快速说明索引
  • 回放逻辑内部变化
    • 负载捕获
    • 负载处理
    • 负载重放
    • 分析报告



文章快速说明索引

学习目标:

目的:接下来这段时间我想做一些兼容Oracle数据库Real Application Testing (即:RAT)上的一些功能开发,本专栏这里主要是学习以及介绍Oracle数据库功能的使用场景、原理说明和注意事项等,基于PostgreSQL数据库的功能开发等之后 由新博客进行介绍和分享!


学习内容:(详见目录)

1、Oracle数据库Real Application Testing之Database Reply的内部变化逻辑


学习时间:

2023年03月23日 21:48:11


学习产出:

1、Oracle数据库Real Application Testing之Database Reply的内部变化逻辑
2、CSDN 技术博客 1篇


注:下面我们所有的学习环境是Centos7+PostgreSQL15.0+Oracle19c+MySQL5.7

postgres=# select version();
                                   version                                   
-----------------------------------------------------------------------------
 PostgreSQL 15.0 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 7.1.0, 64-bit
(1 row)

postgres=#

#-----------------------------------------------------------------------------#

SQL> select * from v$version; 

BANNER									    BANNER_FULL 								BANNER_LEGACY									CON_ID
--------------------------------------------------------------------------- --------------------------------------------------------------------------- --------------------------------------------------------------------------- ----------
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production	    Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production	Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production		     0
									    Version 19.3.0.0.0


SQL>
#-----------------------------------------------------------------------------#

mysql> select version();
+-----------+
| version() |
+-----------+
| 5.7.19    |
+-----------+
1 row in set (0.06 sec)

mysql>

回放逻辑内部变化

数据库回放基本流程如下:

在这里插入图片描述


数据库回放的实操内容请见本人之前的文档!


数据库回放需要注意的有2点:

  • 对于RAC集群存在workload capture file的目录必须位于共享文件系统上,否则start_capture时会报错
  • 对于每个session会多消耗64KB的内存,这是由于本质上写出负载信息到workload capture file的同样是Server Process服务进程本身

但是这种写出并非在parse解析或execution执行阶段,Server Process将其LOGON、LOGOFF、SQL执行等信息记录存放在PGA中,主要是WCR Capture PG、WCR Capture PGA中,当PGA中的工作负载历史记录达到一定数目时,Server Process本身负责写出这些数据到WCR文件中,在写出这些WCR文件时Server Process进入'WCR: capture file IO write'等待事件。与WCR相关的等待事件另有:

SQL> set line 400 
SQL> col BANNER format a75 
SQL> col BANNER_FULL format a75
SQL> col BANNER_LEGACY format a75
SQL> 
SQL> select * from v$version;

BANNER									    BANNER_FULL 								BANNER_LEGACY									CON_ID
--------------------------------------------------------------------------- --------------------------------------------------------------------------- --------------------------------------------------------------------------- ----------
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production	    Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production	Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production		     0
									    Version 19.3.0.0.0


SQL>
SQL> select name  from v$event_name where name like '%WCR%';

NAME
----------------------------------------------------------------
WCR: replay client notify
WCR: replay clock
WCR: replay lock order
WCR: replay paused
WCR: RAC message context busy
WCR: capture file IO write
WCR: Sync context busy
latch: WCR: sync
latch: WCR: processes HT

9 rows selected.

SQL>
SQL> select name,gets from v$latch where name like '%WCR%';

NAME								       GETS
---------------------------------------------------------------- ----------
WCR: kecu cas mem							  0
WCR: kecr File Count							  0
WCR: MMON Create dir							  0
WCR: ticker cache							  0
WCR: sync								  0
WCR: processes HT							  0
WCR: MTS VC queue							  0

7 rows selected.

SQL>
SQL> col name format a24;
SQL> col value format a20;
SQL> col describ format a80;
SQL> 
SQL> SELECT x.ksppinm NAME, y.ksppstvl VALUE, x.ksppdesc describ FROM SYS.x$ksppi x, SYS.x$ksppcv y WHERE x.inst_id = USERENV ('Instance') AND y.inst_id = USERENV ('Instance') AND x.indx = y.indx AND x.ksppinm in ('_capture_buffer_size','_wcr_control');

NAME			 VALUE		      DESCRIB
------------------------ -------------------- --------------------------------------------------------------------------------
_wcr_control		 0		      Oracle internal test WCR parameter used ONLY for testing!
_capture_buffer_size	 65536		      To set the size of the PGA I/O recording buffers

SQL>

下面借助于之前的实操步骤,再次复现一下 观察每一步的内部变化:

负载捕获

建立捕获目录,建立测试表以及插入数据,如下:

SQL> create or replace directory db_replay_capture_dir as '/home/oracle/db_replay_capture';

Directory created.

SQL> conn c##spa123/spa123
Connected.
SQL> create table test (id number, cust_name varchar2(20), dt date, amt number(8,2), store_id number(2));

Table created.

SQL> create sequence test_id_seq start with 1 maxvalue 99999999999999 minvalue 1 nocycle cache 20;

Sequence created.

SQL> 

注:我们这里测试环境只用一台机器来模拟数据库重放,所以需要先建立一个还原点。

SQL> conn /as sysdba
Connected.
SQL> archive log list;
Database log mode	       Archive Mode
Automatic archival	       Enabled
Archive destination	       USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     2
Next log sequence to archive   4
Current log sequence	       4
SQL> select flashback_on from v$database;

FLASHBACK_ON
------------------
YES

SQL> create restore point mypoint;

Restore point created.

SQL> 

此时尚未开始捕获,目录如下:

[oracle@dbserver ~]$ cd db_replay_capture/
[oracle@dbserver db_replay_capture]$ ls
[oracle@dbserver db_replay_capture]$

接下来,就可以开启捕获了,如下:

-- sysdba

SQL> BEGIN
	DBMS_WORKLOAD_CAPTURE.start_capture (name=>'test_capture_1', dir=>'DB_REPLAY_CAPTURE_DIR', duration=> NULL);
END;
/  2    3    4  

PL/SQL procedure successfully completed.

SQL> select max(id) from dba_workload_captures;

   MAX(ID)
----------
	12

SQL> select id,name,status,start_time,end_time,connects,user_calls,dir_path from dba_workload_captures where id = 12;

	ID NAME 															    STATUS
---------- -------------------------------------------------------------------------------------------------------------------------------- ----------------------------------------
START_TIM END_TIME    CONNECTS USER_CALLS
--------- --------- ---------- ----------
DIR_PATH
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
	12 test_capture_1														    IN PROGRESS
30-MAR-23		     1		0
/home/oracle/db_replay_capture


SQL>

此时,捕获目录 如下:

[oracle@dbserver db_replay_capture]$ tree
.
├── cap
│   └── wcr_scapture.wmd
├── capfiles
│   └── inst1
│       ├── aa
│       ├── ab
│       ├── ac
│       ├── ad
│       ├── ae
│       ├── af
│       ├── ag
│       ├── ah
│       ├── ai
│       └── aj
└── wcr_cap_000000000000c.start

13 directories, 2 files
[oracle@dbserver db_replay_capture]$

此时我们LOGON一个新的Server Process,如下:

-- 第二个进程

[oracle@dbserver ~]$ sqlplus /nolog

SQL*Plus: Release 19.0.0.0.0 - Production on Thu Mar 30 17:12:22 2023
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle.  All rights reserved.

SQL> conn c##spa123/spa123
Connected.
SQL> select * from test;

no rows selected

SQL> 

此时的捕获目录,如下:

[oracle@dbserver db_replay_capture]$ tree
.
├── cap
│   └── wcr_scapture.wmd
├── capfiles
│   └── inst1
│       ├── aa
│       ├── ab
│       ├── ac
│       ├── ad
│       ├── ae
│       ├── af
│       ├── ag
│       ├── ah
│       ├── ai
│       └── aj
└── wcr_cap_000000000000c.start

13 directories, 2 files
[oracle@dbserver db_replay_capture]$
-- 第二个进程,开始模拟负载

SQL> @/home/oracle/insert_test.sql

PL/SQL procedure successfully completed.

SQL> select count(*) from test;

  COUNT(*)
----------
      1000

SQL> select spid from v$process where addr = ( select paddr from v$session where sid=(select distinct sid from v$mystat));

SPID
------------------------
9873

SQL>
-- 原来第一个进程

SQL> select spid from v$process where addr = ( select paddr from v$session where sid=(select distinct sid from v$mystat));

SPID
------------------------
9664

SQL>

看一下现在这两个连接对应进程的打开文件描述符,如下:

[oracle@dbserver ~]$ ls -l /proc/9664/fd
总用量 0
lr-x------ 1 oracle oracle 64 3月  30 17:18 0 -> /dev/null
l-wx------ 1 oracle oracle 64 3月  30 17:18 1 -> /dev/null
l-wx------ 1 oracle oracle 64 3月  30 17:18 12 -> pipe:[103958]
l-wx------ 1 oracle oracle 64 3月  30 17:18 2 -> /dev/null
lrwx------ 1 oracle oracle 64 3月  30 17:18 256 -> /home/oracle/oracle19c/oradata/ORCL/control01.ctl
lrwx------ 1 oracle oracle 64 3月  30 17:18 257 -> /home/oracle/oracle19c/oradata/ORCL/control02.ctl
lrwx------ 1 oracle oracle 64 3月  30 17:18 258 -> /home/oracle/oracle19c/oradata/ORCL/undotbs01.dbf
lrwx------ 1 oracle oracle 64 3月  30 17:18 259 -> /home/oracle/oracle19c/oradata/ORCL/sysaux01.dbf
lrwx------ 1 oracle oracle 64 3月  30 17:18 260 -> /home/oracle/oracle19c/oradata/ORCL/system01.dbf
lrwx------ 1 oracle oracle 64 3月  30 17:18 261 -> /home/oracle/oracle19c/oradata/ORCL/pdbseed/system01.dbf
lrwx------ 1 oracle oracle 64 3月  30 17:18 262 -> /home/oracle/oracle19c/oradata/ORCL/pdbseed/sysaux01.dbf
lrwx------ 1 oracle oracle 64 3月  30 17:18 263 -> /home/oracle/oracle19c/oradata/ORCL/users01.dbf
lrwx------ 1 oracle oracle 64 3月  30 17:18 264 -> /home/oracle/oracle19c/oradata/ORCL/pdbseed/undotbs01.dbf
lrwx------ 1 oracle oracle 64 3月  30 17:18 265 -> /home/oracle/oracle19c/oradata/ORCL/orclpdb/system01.dbf
lrwx------ 1 oracle oracle 64 3月  30 17:18 266 -> /home/oracle/oracle19c/oradata/ORCL/orclpdb/sysaux01.dbf
lrwx------ 1 oracle oracle 64 3月  30 17:18 267 -> /home/oracle/oracle19c/oradata/ORCL/orclpdb/undotbs01.dbf
lrwx------ 1 oracle oracle 64 3月  30 17:18 268 -> /home/oracle/oracle19c/oradata/ORCL/orclpdb/users01.dbf
lrwx------ 1 oracle oracle 64 3月  30 17:18 269 -> /home/oracle/oracle19c/oradata/ORCL/temp01.dbf
lr-x------ 1 oracle oracle 64 3月  30 17:18 3 -> /dev/null
lr-x------ 1 oracle oracle 64 3月  30 17:18 4 -> /home/oracle/oracle19c/product/19c/dbhome_1/rdbms/mesg/oraus.msb
lr-x------ 1 oracle oracle 64 3月  30 17:18 5 -> /proc/9664/fd
lrwx------ 1 oracle oracle 64 3月  30 17:18 6 -> anon_inode:[eventpoll]
lrwx------ 1 oracle oracle 64 3月  30 17:18 7 -> /home/oracle/oracle19c/admin/orcl/adump/orcl_ora_9664_20230330170934416714863480.aud
lrwx------ 1 oracle oracle 64 3月  30 17:18 8 -> /home/oracle/db_replay_capture/capfiles/inst1/aa/wcr_2anhmh0000000.rec
lr-x------ 1 oracle oracle 64 3月  30 17:18 9 -> pipe:[103957]
[oracle@dbserver ~]$ 
[oracle@dbserver ~]$ ls -l /proc/9873/fd
总用量 0
lr-x------ 1 oracle oracle 64 3月  30 17:18 0 -> /dev/null
l-wx------ 1 oracle oracle 64 3月  30 17:18 1 -> /dev/null
l-wx------ 1 oracle oracle 64 3月  30 17:18 12 -> pipe:[109685]
l-wx------ 1 oracle oracle 64 3月  30 17:18 2 -> /dev/null
lrwx------ 1 oracle oracle 64 3月  30 17:18 256 -> /home/oracle/oracle19c/oradata/ORCL/undotbs01.dbf
lrwx------ 1 oracle oracle 64 3月  30 17:18 257 -> /home/oracle/oracle19c/oradata/ORCL/users01.dbf
lrwx------ 1 oracle oracle 64 3月  30 17:18 258 -> /home/oracle/oracle19c/oradata/ORCL/sysaux01.dbf
lr-x------ 1 oracle oracle 64 3月  30 17:18 3 -> /dev/null
lr-x------ 1 oracle oracle 64 3月  30 17:18 4 -> /home/oracle/oracle19c/product/19c/dbhome_1/rdbms/mesg/oraus.msb
lr-x------ 1 oracle oracle 64 3月  30 17:18 5 -> /proc/9873/fd
lrwx------ 1 oracle oracle 64 3月  30 17:18 6 -> anon_inode:[eventpoll]
lrwx------ 1 oracle oracle 64 3月  30 17:18 7 -> /home/oracle/db_replay_capture/capfiles/inst1/aa/wcr_2ann0h0000001.rec
lr-x------ 1 oracle oracle 64 3月  30 17:18 9 -> pipe:[109684]
[oracle@dbserver ~]$

此时再看一下,在 执行模拟负载 之后的捕获目录,如下:

[oracle@dbserver db_replay_capture]$ tree
.
├── cap
│   └── wcr_scapture.wmd
├── capfiles
│   └── inst1
│       ├── aa
│       ├── ab
│       ├── ac
│       ├── ad
│       ├── ae
│       ├── af
│       ├── ag
│       ├── ah
│       ├── ai
│       └── aj
└── wcr_cap_000000000000c.start

13 directories, 2 files
[oracle@dbserver db_replay_capture]$ tree
.
├── cap
│   └── wcr_scapture.wmd
├── capfiles
│   └── inst1
│       ├── aa
│       │   ├── wcr_2anhmh0000000.rec
│       │   └── wcr_2ann0h0000001.rec
│       ├── ab
│       ├── ac
│       ├── ad
│       ├── ae
│       ├── af
│       ├── ag
│       ├── ah
│       ├── ai
│       └── aj
└── wcr_cap_000000000000c.start

13 directories, 4 files
[oracle@dbserver db_replay_capture]$

注:这里说一下:本人使用的Oracle是19C 所测试的现象如下:

  • 在新连接建立之后(甚至执行了少量语句),并没有立刻产生wcr文件(这点和参考的老哥 11g 所说的不太一样)
  • wcr文件是在 大量负载 之后,出现在捕获目录(wcr_2ann0h0000001.rec)
  • 而第一个进程所对应的wcr文件(wcr_2anhmh0000000.rec) 随后产生
[oracle@dbserver ~]$ lsof | grep wcr_2ann0h0000001.rec
oracle_98  9873              oracle    7u      REG              252,0     655360   4988178 /home/oracle/db_replay_capture/capfiles/inst1/aa/wcr_2ann0h0000001.rec
[oracle@dbserver ~]$ 
[oracle@dbserver ~]$ lsof | grep wcr_2anhmh0000000.rec
oracle_96  9664              oracle    8u      REG              252,0       2357   4988188 /home/oracle/db_replay_capture/capfiles/inst1/aa/wcr_2anhmh0000000.rec
[oracle@dbserver ~]$

此时断开第二个连接,并看一下 此刻的捕获目录,没有发生变化 如下:

[oracle@dbserver db_replay_capture]$ tree
.
├── cap
│   └── wcr_scapture.wmd
├── capfiles
│   └── inst1
│       ├── aa
│       │   ├── wcr_2anhmh0000000.rec
│       │   └── wcr_2ann0h0000001.rec
│       ├── ab
│       ├── ac
│       ├── ad
│       ├── ae
│       ├── af
│       ├── ag
│       ├── ah
│       ├── ai
│       └── aj
└── wcr_cap_000000000000c.start

13 directories, 4 files
[oracle@dbserver db_replay_capture]$

此时再次建立连接,执行少量SQL(其中包括错误的语句) 并断开连接,如下:

在这里插入图片描述

[oracle@dbserver db_replay_capture]$ tree
.
├── cap
│   └── wcr_scapture.wmd
├── capfiles
│   └── inst1
│       ├── aa
│       │   ├── wcr_2anhmh0000000.rec
│       │   └── wcr_2ann0h0000001.rec
│       ├── ab
│       ├── ac
│       ├── ad
│       ├── ae
│       ├── af
│       ├── ag
│       ├── ah
│       ├── ai
│       └── aj
└── wcr_cap_000000000000c.start

13 directories, 4 files
[oracle@dbserver db_replay_capture]$ 

-- 断开第三个连接,如下:
[oracle@dbserver db_replay_capture]$ tree
.
├── cap
│   └── wcr_scapture.wmd
├── capfiles
│   └── inst1
│       ├── aa
│       │   ├── wcr_2anhmh0000000.rec
│       │   ├── wcr_2ann0h0000001.rec
│       │   └── wcr_2apdgh0000002.rec
│       ├── ab
│       ├── ac
│       ├── ad
│       ├── ae
│       ├── af
│       ├── ag
│       ├── ah
│       ├── ai
│       └── aj
└── wcr_cap_000000000000c.start

13 directories, 5 files
[oracle@dbserver db_replay_capture]$

此时就看一下 这第三个的.rec文件,如下:

[oracle@dbserver db_replay_capture]$ od -c capfiles/inst1/aa/wcr_2apdgh0000002.rec
...

注:内容很多,后面我会把这个文件 原名上传,大家自行分析!


现在就剩第一个连接还在,此时看一下第一个进程信息,如下:

-- sysdba

SQL> select spid from v$process where addr = ( select paddr from v$session where sid=(select distinct sid from v$mystat));

SPID
------------------------
9664

SQL> oradebug setmypid
Statement processed.
SQL> 
SQL> oradebug dump processstate 10;
Statement processed.
SQL> 
SQL> oradebug tracefile_name
/home/oracle/oracle19c/diag/rdbms/orcl/orcl/trace/orcl_ora_9664.trc
SQL> 
SQL>

从 processstate 文件中可以发现历史等待信息包括 WCR: capture file IO write,这是Server process在写WCR 文件,如下:

vim /home/oracle/oracle19c/diag/rdbms/orcl/orcl/trace/orcl_ora_9664.trc
...
    service name: SYS$USERS
    client details:
      O/S info: user: oracle, term: pts/0, ospid: 9572
      machine: dbserver program: sqlplus@dbserver (TNS V1-V3)
      application name: sqlplus@dbserver (TNS V1-V3), hash value=3561831262
    Current Wait Stack:
      Not in wait; last wait ended 0.000714 sec ago 
    Wait State:
      fixed_waits=0 flags=0x21 boundary=(nil)/-1
    Session Wait History:
        elapsed time of 0.000738 sec since last wait
     0: waited for 'Disk file operations I/O'
        ...
     1: waited for 'SQL*Net message from client'
        ...
     2: waited for 'SQL*Net message to client'
        ...
     3: waited for 'Disk file operations I/O'
        ...
     4: waited for 'SQL*Net message from client'
        ...
     5: waited for 'SQL*Net message to client'
        ...
     6: waited for 'SQL*Net message from client'
        ...
     7: waited for 'SQL*Net message to client'
        ...
     8: waited for 'Disk file operations I/O'
        ...
     9: waited for 'WCR: capture file IO write'
        ...
    Sampled Session History of session 743 serial 20019
    ---------------------------------------------------
    The sampled session history is constructed by sampling
    the target session every 1 second. The sampling process
    captures at each sample if the session is in a non-idle wait,
    an idle wait, or not in a wait. If the session is in a
    non-idle wait then one interval is shown for all the samples
    the session was in the same non-idle wait. If the
    session is in an idle wait or not in a wait for
    consecutive samples then one interval is shown for all
    the consecutive samples. Though we display these consecutive
    samples  in a single interval the session may NOT be continuously
    idle or not in a wait (the sampling process does not know).
 
    The history is displayed in reverse chronological order.
 
    sample interval: 1 sec, max history 120 sec
    ---------------------------------------------------
      [121 samples,                                        17:38:00 - 17:40:00]
        idle wait at each sample
    ----------------------------------------
...

继续,看一下其相关的内存信息,如下:

SQL> oradebug dump heapdump 536870917;
Statement processed.
SQL> 


[oracle@dbserver ~]$ grep WCR /home/oracle/oracle19c/diag/rdbms/orcl/orcl/trace/orcl_ora_9664.trc
     9: waited for 'WCR: capture file IO write'
  Chunk     7f87f79a6020 sz=     1824    freeable  "WCR Capture PG "  ds=0x7f87f79a7130
  Chunk     7f87f79a7118 sz=      184    freeable  "WCR Capture PGA"
  Chunk     7f87f7a46020 sz=     1584    freeable  "WCR Capture PG "  ds=0x7f87f79a7130
  Chunk     7f87f7a55fc0 sz=    65600    freeable  "WCR Capture PG "  ds=0x7f87f79a7130
  Chunk     7f87f7d5af80 sz=     1232    freeable  "WCR Capture PG "  ds=0x7f87f79a7130
  Chunk     7f87f7d5be28 sz=     4032    freeable  "WCR Capture PG "  ds=0x7f87f79a7130
  Chunk     7f87f7d5cde8 sz=     4224    freeable  "WCR Capture PG "  ds=0x7f87f79a7130
  Chunk     7f87fd2d3c90 sz=     1232    freeable  "WCR Capture PG "  ds=0x7f87f79a7130
  Chunk     7f87fd290b88 sz=     1872    recreate  "WCR Capture PG "   
  Chunk     7f87fd2912d8 sz=     6384    freeable  "WCR Capture PGA"
  Chunk     7f87f87a1458 sz=     4184    freeable  "WCR Capture PG "  ds=0x7f87f79a7130
  Chunk     7f87f87a2e88 sz=     4184    freeable  "WCR Capture PG "  ds=0x7f87f79a7130
  Subheap ds=0x7f87f79a7130  heap name=  WCR Capture PG  size=           89968
HEAP DUMP heap name="WCR Capture PG"  desc=0x7f87f79a7130
2 LARGEST SUB HEAPS for heap name="WCR Capture PG"   desc=0x7f87f79a7130
[oracle@dbserver ~]$

接下来,断开第一个连接,捕获目录没有发生变化,如下:

[oracle@dbserver db_replay_capture]$ tree
.
├── cap
│   └── wcr_scapture.wmd
├── capfiles
│   └── inst1
│       ├── aa
│       │   ├── wcr_2anhmh0000000.rec
│       │   ├── wcr_2ann0h0000001.rec
│       │   └── wcr_2apdgh0000002.rec
│       ├── ab
│       ├── ac
│       ├── ad
│       ├── ae
│       ├── af
│       ├── ag
│       ├── ah
│       ├── ai
│       └── aj
└── wcr_cap_000000000000c.start

13 directories, 5 files
[oracle@dbserver db_replay_capture]$

接下来,建立第四个连接 去关闭捕获 并断开连接,如下:

[oracle@dbserver ~]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Thu Mar 30 17:47:01 2023
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle.  All rights reserved.


Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0

SQL> BEGIN
	DBMS_WORKLOAD_CAPTURE.finish_capture;
END;
/  2    3    4  

PL/SQL procedure successfully completed.

SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
[oracle@dbserver ~]$
[oracle@dbserver db_replay_capture]$ tree
.
├── cap
│   └── wcr_scapture.wmd
├── capfiles
│   └── inst1
│       ├── aa
│       │   ├── wcr_2anhmh0000000.rec
│       │   ├── wcr_2ann0h0000001.rec
│       │   └── wcr_2apdgh0000002.rec
│       ├── ab
│       ├── ac
│       ├── ad
│       ├── ae
│       ├── af
│       ├── ag
│       ├── ah
│       ├── ai
│       └── aj
└── wcr_cap_000000000000c.start

13 directories, 5 files
[oracle@dbserver db_replay_capture]$ tree
.
├── cap
│   └── wcr_scapture.wmd
├── capfiles
│   └── inst1
│       ├── aa
│       │   ├── wcr_2anhmh0000000.rec
│       │   ├── wcr_2ann0h0000001.rec
│       │   ├── wcr_2apdgh0000002.rec
│       │   └── wcr_2aqp3h0000003.rec
│       ├── ab
│       ├── ac
│       ├── ad
│       ├── ae
│       ├── af
│       ├── ag
│       ├── ah
│       ├── ai
│       └── aj
└── wcr_cap_000000000000c.start

13 directories, 6 files
[oracle@dbserver db_replay_capture]$ tree
.
├── cap
│   ├── wcr_cr.html
│   ├── wcr_cr.text
│   ├── wcr_cr.xml
│   ├── wcr_fcapture.wmd
│   └── wcr_scapture.wmd
└── capfiles
    └── inst1
        ├── aa
        │   ├── wcr_2anhmh0000000.rec
        │   ├── wcr_2ann0h0000001.rec
        │   ├── wcr_2apdgh0000002.rec
        │   └── wcr_2aqp3h0000003.rec
        ├── ab
        ├── ac
        ├── ad
        ├── ae
        ├── af
        ├── ag
        ├── ah
        ├── ai
        └── aj

13 directories, 9 files
[oracle@dbserver db_replay_capture]$

如上:

  • 第四个连接建立,并执行关闭捕获 产生wcr_2aqp3h0000003.rec
  • 关闭捕获:产生4个文件(注意时间)
[oracle@dbserver db_replay_capture]$ ll cap
总用量 496
-rw-rw-r-- 1 oracle oracle  50038 330 17:47 wcr_cr.html
-rw-rw-r-- 1 oracle oracle  20406 330 17:47 wcr_cr.text
-rw-rw-r-- 1 oracle oracle 423930 330 17:47 wcr_cr.xml
-rw-rw-r-- 1 oracle oracle    248 330 17:47 wcr_fcapture.wmd
-rw-rw-r-- 1 oracle oracle    137 330 17:10 wcr_scapture.wmd
[oracle@dbserver db_replay_capture]$
  • 同时 删掉wcr_cap_000000000000c.start

至此,捕获过程完成,结论(来自于博客:了解Database Replay Capture内部原理)

  1. 负责写WCR WORKLOAD CAPTURE文件的不是什么后台进程,而是Server Process服务进程(前台进程)
  2. 每一个server process对应一个WCR文件
  3. Server Proess会写出LOGON、LOGOFF、SQL执行以及错误信息到WCR文件中
  4. Server Process的写不是立即模式Immediate mode,而是将数据存放在PGA的(WCR Capture) subheap中,当数据达到一定大小或一定时间(timeout才写出一次)
  5. 再次强调, Server Process的写不是立即模式Immediate mode,即capture不发生在parse或者execution阶段(很多人认为capture发生在parse时这种说法可以证明为不正确,parse并不受到capture的影响),而仅仅是将LOGON、SQL历史(不包括执行计划)放在PGA的WCR Capture内存子堆中,条件触发才写出,所以其性能损耗小,按照tpcc的测试结论为4.5%
  6. 隐藏参数_capture_buffer_size 控制PGA中WCR BUFFER的SIZE,默认为64k
  7. WCR Capture文件虽然是binrary 2进制文件,但并未加密,所以第三方软件理论上也可以读取该WCR capture file
  8. WCR: capture file IO write等待事件是Server Process在写WCR文件
  9. 执行dbms_workload_capture.finish_capture;会让现有Server Process FLUSH WCR buffer,但是就ALERT.LOG的自解释信息看"Stopped database capture (not all sessions could flush their capture buffers)",这种flush不是必然能回收内存的

此时获取caputre_id,如下:

-- 通过内部函数读取:

SQL> select DBMS_WORKLOAD_CAPTURE.get_capture_info('DB_REPLAY_CAPTURE_DIR') FROM dual;

DBMS_WORKLOAD_CAPTURE.GET_CAPTURE_INFO('DB_REPLAY_CAPTURE_DIR')
---------------------------------------------------------------
							      12

SQL>

-- 也可以读取dba_workload_captures视图读取:

负载处理

注:由于是测试环境、捕获和重放是同一台机器(正式环境下需要将捕获的文件复制到目标机器上),现在将数据库恢复到开始捕获前的状态,相关步骤省略 结果如下:

-- 闪回已完成

SQL> conn c##spa123/spa123
Connected.
SQL> select * from test;

no rows selected

SQL>

下面开始预处理,如下:

SQL> conn /as sysdba
Connected.
SQL> 
SQL> BEGIN
DBMS_WORKLOAD_REPLAY.process_capture('DB_REPLAY_CAPTURE_DIR');
END;
/  2    3    4  

PL/SQL procedure successfully completed.

SQL>

完成之后,目录如下:

[oracle@dbserver db_replay_capture]$ tree
.
├── cap
│   ├── wcr_cr.html
│   ├── wcr_cr.text
│   ├── wcr_cr.xml
│   ├── wcr_fcapture.wmd
│   └── wcr_scapture.wmd
└── capfiles
    └── inst1
        ├── aa
        │   ├── wcr_2anhmh0000000.rec
        │   ├── wcr_2ann0h0000001.rec
        │   ├── wcr_2apdgh0000002.rec
        │   └── wcr_2aqp3h0000003.rec
        ├── ab
        ├── ac
        ├── ad
        ├── ae
        ├── af
        ├── ag
        ├── ah
        ├── ai
        └── aj

13 directories, 9 files
[oracle@dbserver db_replay_capture]$ tree
.
├── cap
│   ├── wcr_cr.html
│   ├── wcr_cr.text
│   ├── wcr_cr.xml
│   ├── wcr_fcapture.wmd
│   └── wcr_scapture.wmd
├── capfiles
│   └── inst1
│       ├── aa
│       │   ├── wcr_2anhmh0000000.rec
│       │   ├── wcr_2ann0h0000001.rec
│       │   ├── wcr_2apdgh0000002.rec
│       │   └── wcr_2aqp3h0000003.rec
│       ├── ab
│       ├── ac
│       ├── ad
│       ├── ae
│       ├── af
│       ├── ag
│       ├── ah
│       ├── ai
│       └── aj
└── pp19.3.0.0.0
    ├── capfiles
    │   └── inst1
    │       └── aa
    │           └── wcr_2apdgh0000002.cscn
    ├── wcr_calibrate.xml
    ├── wcr_commits.extb
    ├── wcr_conn_data.extb
    ├── wcr_data.extb
    ├── wcr_dep_graph.extb
    ├── wcr_login.extb
    ├── wcr_login.pp
    ├── wcr_process.wmd
    ├── wcr_references.extb
    ├── wcr_schema_info.extb
    ├── wcr_scn_order.extb
    ├── wcr_seq_data.extb
    ├── wcr_sqltext.extb
    └── wcr_xa.extb

17 directories, 24 files
[oracle@dbserver db_replay_capture]$ 

如上,预处理之后,目录方的中生成了重演的数据,pp19.3.0.0.0的目录!


负载重放

这里使用wrc工具进行校验,效验结果会显示完成replay需要replay clients和hosts的数量,如下:

[oracle@dbserver db_replay_capture]$ wrc mode=calibrate replaydir=/home/oracle/db_replay_capture

Workload Replay Client: Release 19.3.0.0.0 - Production on Thu Mar 30 18:11:32 2023

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.


Report for Workload in: /home/oracle/db_replay_capture
-----------------------

Recommendation:
Consider using at least 1 clients divided among 1 CPU(s)
You will need at least 7 MB of memory per client process.
If your machine(s) cannot match that number, consider using more clients.

Workload Characteristics:
- max concurrency: 2 sessions
- total number of sessions: 4

Assumptions:
- 1 client process per 100 concurrent sessions
- 4 client processes per CPU
- 256 KB of memory cache per concurrent session
- think time scale = 100
- connect time scale = 100
- synchronization = TRUE

[oracle@dbserver db_replay_capture]$ 

接下来,开始replay。在上面的效验结果,显示一个CPU上建议一个client,所以我们这里开始一个replay client。

-- 使用 initialize_replay 装载metadata到tables里

SQL> EXEC DBMS_WORKLOAD_REPLAY.initialize_replay (replay_name=>'test_capture_1', replay_dir=>'DB_REPLAY_CAPTURE_DIR');

PL/SQL procedure successfully completed.

SQL>
SQL> select name, status from dba_workload_replays;

NAME			 STATUS
------------------------ ----------------------------------------
test_capture_1		 INITIALIZED

SQL>
-- 将数据改成PREPARE REPLAY 模式:

SQL> exec DBMS_WORKLOAD_REPLAY.prepare_replay(synchronization=>TRUE);

PL/SQL procedure successfully completed.

SQL> 
-- 检查replay的状态:

SQL> select name, status from dba_workload_replays;

NAME																 STATUS
-------------------------------------------------------------------------------------------------------------------------------- ----------------------------------------
test_capture_1															 PREPARE

SQL>
[oracle@dbserver ~]$ wrc system/123456 mode=replay replaydir=/home/oracle/db_replay_capture


-- 执行之后,replay client 被暂停,并等待start replay 。 另开一个sqlplus 窗口执行如下命令:
[oracle@dbserver ~]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Thu Mar 23 23:16:36 2023
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle.  All rights reserved.


Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0

SQL> exec DBMS_WORKLOAD_REPLAY.START_REPLAY ();

PL/SQL procedure successfully completed.

SQL> select name,status from  dba_workload_replays;

NAME										 STATUS
-------------------------------------------------------------------------------------------------------------------------------- ----------------------------------------
test_capture_1									 IN PROGRESS

SQL>

在这里插入图片描述

等dba_workload_replays中的状态变成compelte就完成replay。此时replayclient会显示操作开始和结束的时间,如下:

SQL> select name,status from  dba_workload_replays;

NAME																 STATUS
-------------------------------------------------------------------------------------------------------------------------------- ----------------------------------------
test_capture_1															 COMPLETED

SQL> 
[oracle@dbserver db_replay_capture]$ wrc system/123456 mode=replay replaydir=/home/oracle/db_replay_capture

Workload Replay Client: Release 19.3.0.0.0 - Production on Thu Mar 30 18:17:05 2023

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.


Wait for the replay to start (18:17:05)
Replay client 1 started (18:17:54)


Replay client 1 finished (18:55:53)
[oracle@dbserver db_replay_capture]$

这时就可以验证replay结果,如下:

SQL> conn c##spa123/spa123
Connected.
SQL> select count(*) from test;

  COUNT(*)
----------
      1000

SQL>

此时再看一下捕获目录,如下:

[oracle@dbserver db_replay_capture]$ tree
.
├── cap
│   ├── wcr_cr.html
│   ├── wcr_cr.text
│   ├── wcr_cr.xml
│   ├── wcr_fcapture.wmd
│   └── wcr_scapture.wmd
├── capfiles
│   └── inst1
│       ├── aa
│       │   ├── wcr_2anhmh0000000.rec
│       │   ├── wcr_2ann0h0000001.rec
│       │   ├── wcr_2apdgh0000002.rec
│       │   └── wcr_2aqp3h0000003.rec
│       ├── ab
│       ├── ac
│       ├── ad
│       ├── ae
│       ├── af
│       ├── ag
│       ├── ah
│       ├── ai
│       └── aj
├── pp19.3.0.0.0
│   ├── capfiles
│   │   └── inst1
│   │       └── aa
│   │           └── wcr_2apdgh0000002.cscn
│   ├── wcr_calibrate.xml
│   ├── wcr_commits.extb
│   ├── wcr_conn_data.extb
│   ├── wcr_data.extb
│   ├── wcr_dep_graph.extb
│   ├── wcr_login.extb
│   ├── wcr_login.pp
│   ├── wcr_process.wmd
│   ├── wcr_references.extb
│   ├── wcr_schema_info.extb
│   ├── wcr_scn_order.extb
│   ├── wcr_seq_data.extb
│   ├── wcr_sqltext.extb
│   └── wcr_xa.extb
└── rep192804303
    ├── wcr_ra_192804303.dmp
    ├── wcr_ra_192804303.log
    ├── wcr_replay_div_summary.extb
    ├── wcr_replay_thread.extb
    ├── wcr_replay.wmd
    ├── wcr_rep_uc_graph_192804303.extb
    ├── wcr_rr_192804303.cc.xml
    ├── wcr_rr_192804303.html
    ├── wcr_rr_192804303.txt
    ├── wcr_rr_192804303.xml
    └── wcr_tracked_commits.extb

18 directories, 35 files
[oracle@dbserver db_replay_capture]$

如上,新增的rep192804303目录就是回放动作产生的!目录下面多了rep开头的子目录,其中的html文件就是生成的报告。


分析报告

生成文本报告,如下:

SQL> conn /as sysdba
Connected.
SQL> set long 100000;
SQL> set pagesize 40000;
SQL>
SQL> select dbms_workload_replay.report(11,'TEXT') from dual;

DBMS_WORKLOAD_REPLAY.REPORT(11,'TEXT')
--------------------------------------------------------------------------------
DB Replay Report for test_capture_1
--------------------------------------------------------------------------------
-------------------

----------------------------------------------------------------------------
| DB Name | DB Id      | Release    | RAC | Replay Name    | Replay Status |
----------------------------------------------------------------------------
| ORCL	  | 1591249645 | 19.3.0.0.0 | NO  | test_capture_1 | COMPLETED	   |
----------------------------------------------------------------------------

Replay Information
--------------------------------------------------------------------------------
-------------
|	Information	  | Replay			   | Capture
	    |
--------------------------------------------------------------------------------
-------------
| Name			  | test_capture_1		   | test_capture_1
	    |
--------------------------------------------------------------------------------
-------------
| Status		  | COMPLETED			   | COMPLETED
	    |
--------------------------------------------------------------------------------
-------------
| Database Name 	  | ORCL			   | ORCL
	    |
--------------------------------------------------------------------------------
-------------
| Database Version	  | 19.3.0.0.0			   | 19.3.0.0.0
	    |
--------------------------------------------------------------------------------
-------------
| Start Time		  | 30-03-23 10:17:54		   | 30-03-23 09:10:41
	    |
--------------------------------------------------------------------------------
-------------
| End Time		  | 30-03-23 10:54:49		   | 30-03-23 09:47:22
	    |
--------------------------------------------------------------------------------
-------------
| Duration		  | 36 minutes 55 seconds	   | 36 minutes 41 secon
ds	    |
--------------------------------------------------------------------------------
-------------
| Directory Object	  | DB_REPLAY_CAPTURE_DIR	   | DB_REPLAY_CAPTURE_D
IR	    |
--------------------------------------------------------------------------------
-------------
| Directory Path	  | /home/oracle/db_replay_capture | /home/oracle/db_rep
lay_capture |
--------------------------------------------------------------------------------
-------------
| AWR DB Id		  | 1591249645			   |
	    |
--------------------------------------------------------------------------------
-------------
| AWR Begin Snap Id	  | 1132			   |
	    |
--------------------------------------------------------------------------------
-------------
| AWR End Snap Id	  | 1133			   |
	    |
--------------------------------------------------------------------------------
-------------
| PL/SQL Mode		  | TOP_LEVEL			   | TOP_LEVEL
	    |
--------------------------------------------------------------------------------
-------------
| Encryption Algorithm	  |				   |
	    |
--------------------------------------------------------------------------------
-------------
| Replay Directory Number | 192804303			   | N/A
	    |
--------------------------------------------------------------------------------
-------------

Replay Options
-----------------------------------------------------------
|	 Option Name	    | Value			  |
-----------------------------------------------------------
| Synchronization	    | SCN			  |
-----------------------------------------------------------
| Connect Time		    | 100%			  |
-----------------------------------------------------------
| Connect Time Auto Correct | YES			  |
-----------------------------------------------------------
| Think Time		    | 100%			  |
-----------------------------------------------------------
| Think Time Auto Correct   | TRUE			  |
-----------------------------------------------------------
| Query Only		    | N 			  |
-----------------------------------------------------------
| Number of WRC Clients     | 1 (1 Completed, 0 Running ) |
-----------------------------------------------------------

Replay Statistics
---------------------------------------------------------------------
|	 Statistic	   | Replay		     | Capture	    |
---------------------------------------------------------------------
| DB Time		   | 8 minutes 33.42 seconds | 1.51 seconds |
---------------------------------------------------------------------
| PL/SQL DB Time	   |		1.95 seconds | 1.19 seconds |
---------------------------------------------------------------------
| User calls		   |			  73 |		 73 |
---------------------------------------------------------------------
| PL/SQL user calls	   |			   3 |		  4 |
---------------------------------------------------------------------
| PL/SQL subcalls	   |			 N/A |		  0 |
---------------------------------------------------------------------
| Average Active Sessions  |			 .23 |		  0 |
---------------------------------------------------------------------
| Capture Files 	   |			   4 |		  4 |
---------------------------------------------------------------------
| Finished Replay Sessions |			   4 |		  4 |
---------------------------------------------------------------------

Replay Divergence Summary
-------------------------------------------------------------------
|		 Divergence Type		| Count | % Total |
-------------------------------------------------------------------
| Session Failures During Replay		|     0 |    0.00 |
-------------------------------------------------------------------
| Errors No Longer Seen During Replay		|     0 |    0.00 |
-------------------------------------------------------------------
| New Errors Seen During Replay 		|     0 |    0.00 |
-------------------------------------------------------------------
| Errors Mutated During Replay			|     0 |    0.00 |
-------------------------------------------------------------------
| DMLs with Different Number of Rows Modified	|     0 |    0.00 |
-------------------------------------------------------------------
| SELECTs with Different Number of Rows Fetched |     1 |    1.37 |
-------------------------------------------------------------------

--------------------------------------------------------------------------------
-------------------
Table of Contents
* Workload Profile
* Progress of Commits used for Synchronization
* Finished Replay Sessions
* Replay Divergence
* Synchronization
* Replay Clients Alerts
* Replay Filters

--------------------------------------------------------------------------------
-------------------
Workload Profile

Top Events
---------------------------------------------------------------
| Event 		      | Instance ID | Total Wait Time |
---------------------------------------------------------------
| CPU			      | 1	    | 290 seconds     |
---------------------------------------------------------------
| SQL*Net message from client | 1	    | 170 seconds     |
---------------------------------------------------------------
| control file parallel write | 1	    | 30 seconds      |
---------------------------------------------------------------
| latch free		      | 1	    | 10 seconds      |
---------------------------------------------------------------

Top SQL with Top Events
---------------------------------------------------------
| SQL ID	| Instance ID | Event | Total Wait Time |
---------------------------------------------------------
| 22356bkgsdcnh | 1	      | CPU   | 10 seconds	|
---------------------------------------------------------
| 88whbbrqbfp1r | 1	      | CPU   | 10 seconds	|
---------------------------------------------------------

Top Service/Module
---------------------------------------------------------------
| Service	 | Module     | Instance ID | Total Wait Time |
---------------------------------------------------------------
| SYS$BACKGROUND | NULL       | 1	    | 260 seconds     |
---------------------------------------------------------------
| SYS$USERS	 | SQL*Plus   | 1	    | 170 seconds     |
---------------------------------------------------------------
| SYS$BACKGROUND | KTSJ       | 1	    | 50 seconds      |
---------------------------------------------------------------
| SYS$BACKGROUND | MMON_SLAVE | 1	    | 10 seconds      |
---------------------------------------------------------------
| SYS$USERS	 | WRC$       | 1	    | 10 seconds      |
---------------------------------------------------------------

Top Sessions with Top Events
--------------------------------------------------------------------------------
--------------
| Session ID | Session Serial# | Instance ID | Event			   | Tot
al Wait Time |
--------------------------------------------------------------------------------
--------------
| 874	     | 34855	       | 1	     | SQL*Net message from client | 170
 seconds     |
--------------------------------------------------------------------------------
--------------
| 4	     | 9376	       | 1	     | CPU			   | 50
seconds      |
--------------------------------------------------------------------------------
--------------
| 125	     | 34792	       | 1	     | CPU			   | 50
seconds      |
--------------------------------------------------------------------------------
--------------
| 10	     | 39752	       | 1	     | CPU			   | 40
seconds      |
--------------------------------------------------------------------------------
--------------
| 740	     | 13328	       | 1	     | CPU			   | 40
seconds      |
--------------------------------------------------------------------------------
--------------
| 126	     | 57339	       | 1	     | CPU			   | 30
seconds      |
--------------------------------------------------------------------------------
--------------
| 618	     | 39252	       | 1	     | control file parallel write | 30
seconds      |
--------------------------------------------------------------------------------
--------------
| 618	     | 39252	       | 1	     | CPU			   | 30
seconds      |
--------------------------------------------------------------------------------
--------------
| 247	     | 2027	       | 1	     | CPU			   | 20
seconds      |
--------------------------------------------------------------------------------
--------------

--------------------------------------------------------------------------------
-------------------
Progress of Commits used for Synchronization

--------------------------------------------------------------------------------
-----
| Replay Elapsed | Instance ID | Commit SCN | Number of Commits | Delta
    |
--------------------------------------------------------------------------------
-----
| 00:04:46	 | 1	       | 8114651    | 1 		| -18 seconds ah
ead |
--------------------------------------------------------------------------------
-----

--------------------------------------------------------------------------------
-------------------
Finished Replay Sessions

Replay Session Top Events
---------------------------------------------------------------
| Event 		      | Instance ID | Total Wait Time |
---------------------------------------------------------------
| SQL*Net message from client | 1	    | 170 seconds     |
---------------------------------------------------------------

Top Slowest Replay Sessions
--------------------------------------------------------------------------------
--------------
| Delta   | Session | Session | Instance | Filename		 | User  | Captu
re | Replay  |
|	  | ID	    | Serial# | ID	 |			 | Calls | Elaps
ed | Elapsed |
--------------------------------------------------------------------------------
--------------
| 1	  | 752     | 10257   | 1	 | wcr_2aqp3h0000003.rec | 7	 | 2192
   | 2193    |
| seconds |	    |	      | 	 |			 |	 |
   |	     |
| behind  |	    |	      | 	 |			 |	 |
   |	     |
--------------------------------------------------------------------------------
--------------
| 1	  | 752     | 11059   | 1	 | wcr_2anhmh0000000.rec | 18	 | 1713
   | 1714    |
| seconds |	    |	      | 	 |			 |	 |
   |	     |
| behind  |	    |	      | 	 |			 |	 |
   |	     |
--------------------------------------------------------------------------------
--------------

Top Fastest Replay Sessions
--------------------------------------------------------------------------------
--------------
| Delta   | Session | Session | Instance | Filename		 | User  | Captu
re | Replay  |
|	  | ID	    | Serial# | ID	 |			 | Calls | Elaps
ed | Elapsed |
--------------------------------------------------------------------------------
--------------
| 20	  | 137     | 55622   | 1	 | wcr_2apdgh0000002.rec | 24	 | 1046
   | 1026    |
| seconds |	    |	      | 	 |			 |	 |
   |	     |
| ahead   |	    |	      | 	 |			 |	 |
   |	     |
--------------------------------------------------------------------------------
--------------
| 18	  | 874     | 34855   | 1	 | wcr_2ann0h0000001.rec | 24	 | 325
   | 307     |
| seconds |	    |	      | 	 |			 |	 |
   |	     |
| ahead   |	    |	      | 	 |			 |	 |
   |	     |
--------------------------------------------------------------------------------
--------------

--------------------------------------------------------------------------------
-------------------
Replay Divergence Session Failures By Application
--------------------------------------------------
| No data exists for this section of the report. |
--------------------------------------------------
By Error
--------------------------------------------------
| No data exists for this section of the report. |
--------------------------------------------------
Error Divergence By Application
--------------------------------------------------
| No data exists for this section of the report. |
--------------------------------------------------
By SQL
--------------------------------------------------
| No data exists for this section of the report. |
--------------------------------------------------
DML Data Divergence By Application
--------------------------------------------------
| No data exists for this section of the report. |
--------------------------------------------------
By SQL
--------------------------------------------------
| No data exists for this section of the report. |
--------------------------------------------------
SELECT Data Divergence By Application
-------------------------------------------------------
| Service Name | Module Name		      | Count |
-------------------------------------------------------
| SYS$USERS    | sqlplus@dbserver (TNS V1-V3) | 1     |
-------------------------------------------------------
--------------------------------------------------------------------------------
-------------------
Synchronization

Replay Critical Path Profile

For SCN-based synchronization replays, the capture-time commit order is preserve
d. Based on the
commit time, the replay sessions are broken down into multiple sections. The sec
tions that execute
the next commit form the "replay critical path". Execution of the user calls fro
m the replay
critical path determines the replay elapsed time.

Top Events
---------------------------------------------------------------
| Event 		      | Instance ID | Total Wait Time |
---------------------------------------------------------------
| SQL*Net message from client | 1	    | 170 seconds     |
---------------------------------------------------------------

Top SQL with Top Events
--------------------------------------------------
| No data exists for this section of the report. |
--------------------------------------------------

--------------------------------------------------------------------------------
-------------------
Replay Clients Alerts

--------------------------------------------------
| No data exists for this section of the report. |
--------------------------------------------------

--------------------------------------------------------------------------------
-------------------
Replay Filters

--------------------------------------------------
| No data exists for this section of the report. |
--------------------------------------------------

--------------------------------------------------------------------------------
-------------------

End of Report.


SQL>

http://www.niftyadmin.cn/n/181318.html

相关文章

MeshRenderer如何使用GPU Instancing的材质球正常合批

1)MeshRenderer如何使用GPU Instancing的材质球正常合批 ​2)关于AssetBundle加密,如何重新实现LoadFromFile接口 3)移动端开放世界类型游戏中选择动态阴影技术以及优化方案组合 4)Unity导出Gradle工程,如何…

【ChatGPTAIGC研讨社】“iPhone时刻”:未来已来

文章目录前言一、ChaGPT&AIGC研讨社简介二、ChatGPT&AIGC研讨社的优势1.丰富充实的资料库Github开源:[ChatGPT_Project](https://github.com/shawshany/ChatGPT_Project)飞书资料库2.重量级嘉宾3.工作机会4.投资资源总结前言 去年年末,ChatGPT以…

itop-3568 开发板文件系统构建学习笔记(8)Buildroot 添加 Qt

《【北京迅为】itop-3568 开发板文件系统构建手册v1.0.pdf》学习笔记 文章目录Buildroot 添加 Qt5 和 Tslib编译 Buildroot烧录镜像到开发板配置 QT 环境变量测试 QT测试 TslibBuildroot 添加 Qt5 和 Tslib 打开终端,进入 Buildroot 根目录,输入 make m…

答疑砝码称重

题目 题目描述 有 n 位同学同时找老师答疑。每位同学都预先估计了自己答疑的时间。 老师可以安排答疑的顺序,同学们要依次进入老师办公室答疑。 一位同学答疑的过程如下: 首先进入办公室,编号为 i 的同学需要 si​ 毫秒的时间。然后同学问问题…

陪玩MM谁是你的NO.1?Python获取陪玩MM照片颜值检测打分

前言 嗨喽,大家好呀~这里是爱看美女的茜茜呐 我们采集东西,一般都是用的这几步: 1、数据来源分析 确定需求,采集那个网站上面什么数据。 抓包分析,通过开发者工具进行抓包分析。 2、实现步骤 发送请求&#xff0…

《程序员面试金典(第六版)》面试题 08.02. 迷路的机器人(动态规划,回溯法)

题目解析 设想有个机器人坐在一个网格的左上角,网格 r 行 c 列。机器人只能向下或向右移动,但不能走到一些被禁止的网格(有障碍物)。设计一种算法,寻找机器人从左上角移动到右下角的路径。 网格中的障碍物和空位置分别…

node.js版本过高,导致vue2 版本的项目无法正常启动

node.js版本过高,导致vue2 版本的项目无法正常启动 问题描述 node的版本是18 ,vue版本是2 ;npm install 失败 解决方式 1、未采取提示的方式,而是利用了npx命令; 使用npx指定npm的版本 npx -p npm6 npm i --legacy…

Linux下LED设备驱动开发(LED灯实现闪烁)

文章目录一、配置连接说明二、更新设备树(1)将led灯引脚添加到pinctrl子系统(2)设备树中添加LDE灯的设备树节点(3)编译更新设备树三、驱动开发与测试(1)编写设备驱动代码&#xff08…