【转】ST05

一、 SQL Trace

通过SQL跟踪,可以具体查询数据来源于哪些数据库表,

例如:可以查询某个交易(或几个交易)所涉及的数据库表。 为了减少在最终查询结果的工作量,要在屏幕显示你所要显示的数据的前一步,

先进入ST05,点击Activate Trace,然后执行显示数据前的操作,屏幕数据显示之后,回到ST05,点击Deactivate Trace,

最后点击Display Trace, 就可以具体查询数据来源于哪些数据库表了!


1、在外网110环境下,进入系统,输入st05,点击 activate trace 选项,开始进入跟踪。如下图所示:


2、输入交易fnvm,进入合同修改界面:


3、完成交易后,进入st05交易,点击deactivate trace,然后再点击display trace 如下图所示:

 


4、 查询结果说明: 对上图字段说明如下:

Duration :持续时间,单位:毫秒 微秒

Obj. name :表名

Op. :操作类型

Statement :所执行的SQL语句。


二、 Enqueue Trace

通过Enqueue Trace,系统可以记录所有关于一个用户或一组用户的锁与解锁声明。 跟踪记录可以包含如下信息:

  • 锁定对象所涉及的表明
  • 设锁的程序名
  • 锁的类型
  • 锁的所有者
  • 设锁以及解锁的时间

1、在外网110环境下,进入系统,输入st05,选择enqueue Trace
2、后面的操作和SQL Trace操作相同


3、查询结果说明:

对上图字段说明如下:

Duration :锁操作执行的时间

Obj. name :锁的名称

Op. :锁操作

Recs. :Number of granules in the lock object.

RC :返回的编码,0表示锁操作成功,1表示操作不成功(锁多项应经被锁或部分已被锁)。

Statement :This column lists the granules for the lock request
三、 RFC Trace

使用RFC跟踪,你可以跟踪应用程序所执行的远程调用或SAP系统在调用中所执行,你可以显示和分析跟踪文件中的跟踪记录日志。 跟踪的记录包含一下内容:

  • 哪一个Function Modules 在程序中被调用
  • RFC是否成功执行
  • 远程调用进程所花费的时间
  • RFC的传达标记,client or server。
  • 远程调用的实例。
  • 技术参数
  • 在RFC中发送和接收的位数。

1、在外网110环境下,进入系统,输入st05,选择RFC Trace
2、后面的操作和SQL Trace操作相同


3、查询结果说明:

对上图字段说明如下:

Duration :远程调用所运行的时间

Obj. name :被远程调用的功能函数实例简称。

Op. :Client 或 Server。

Recs. :RFC跟踪记录的类型,共有五个,分别为:1,2,3,4,5。

RC :返回的是远程调用的日志编码。如果为0,则说明远程调用成功;如果不等于0,则说明远程调用发生错误。

Statement :依次显示:本地实例的名字;远程实例的名字;被调用的Function Module 的名字;发送和接收的位数。


四、 Table Buffer Trace

通过表缓冲区跟踪,可以监控对表缓冲区的访问以及缓冲区的加载和卸载。表缓冲区跟踪可以得到如下信息:

  • Which buffer accesses your statement executes
  • Which buffer operations are used
  • How the buffer is managed

1、在外网110环境下,进入系统,输入st05,选择BUFFER Trace
2、后面的操作和SQL Trace操作相同


3、查询结果说明:

对上图字段说明如下:

Duration :持续时间

Obj. name :表名

Op. :显示执行缓冲区中特定表操作的功能。

Recs.:读取的记录数。

RC :0 表示功能执行正确;64表示没有发现记录,即记录数为零;256表示表缓冲区可访问(缓冲区类型为R、P), 缓冲区类型 S, C, O, 和 M表示一个对象已被插入;1024表示记录不在缓冲区,要加载缓冲区。 Statement :依次显示为:缓冲区类型;KEY长度;KEY的值。
Database Operations Measured by SQL Trace
The SQL Trace analysis helps in measuring the execution time of the following data base operations that are performed when executing an SQL statement.

    • DECLARE: This operation declares a new cursor and assigns the SQL statement to that cursor created.
    • PREPARE: This operation converts the SQL statement into native SQL and frames out an execution plan for that statement.        
    • OPEN: This operation opens the declared cursor and passes the parameters for database access.
    • FETCH: This operation passes one or more data records fetched to the database interface of the R/3 system.
    • REOPEN: Once a new select statement is brought in then this operation opens the cursor previously declared for previous select statement and perForms new parameter passing to the database.
    • EXEC: Passes the parameters for the database statement, and executes the statements that change data in the database (such as UPDATE, DELETE, or INSERT).

 

posted @ 2016-05-24 17:30  明大叔  阅读(911)  评论(0编辑  收藏  举报