[20170703]Oracle Call Interface Tracing

[20170703]Oracle Call Interface (OCI) Tracing.txt

--//不熟悉这些东西,仅仅做一个记录.

The Oracle Call Interface (OCI) is a set of APIs which provides interaction with an Oracle database. It supports all
phases of a SQL statement execution.

If you ever wondered how to trace OCI function calls you can do it by setting EVENT_10842 environment variable.

--//例子:
set ORA_CLIENTTRACE_DIR=d:\temp
set EVENT_10842=server=all;user=all;stmt=all;level=15

--//注意:必须设置DIAG_ADR_ENABLED=off 在 sqlnet.ora中.在client还是服务端呢?

For ORA_CLIENTTRACE_DIR to take effect Automatic Diagnostic Repository (ADR) has to be disabled. You can disable it by
setting DIAG_ADR_ENABLED=off in your sqlnet.ora.

A tracefile is generated for each connection in the format of ora_skgu_<pid>.trc1 where pid is the process id of the
connection on the (client) system.
 
The following levels are supported:
1 - Trace all server attach and server detach calls for servers listed in "server" attribute of the environment
     variable.
2 - Trace all session begin, logon, session end, logoff calls for the users listed in "user" attribute of the
     environment variable.
3 - Trace all prepare, execute, fetch calls for the specified statement types listed in "stmt" attribute of environment
     variable.
4 - Trace all Bind, Define, Describe calls.
5 - Trace all OCI LOB calls
7 - Get statistical info on all connection pooling /connection related calls
8 - Get statistical info on all session info
9 - Get statistical info on all handle info
10 - Get statistical info on time taken in execute and fetch calls
11 - Get statistical info on transaction related calls
15 - Trace all calls with statistical info.

--//根据上面的信息自己测试看看:
1.环境:
SCOTT@book> @ &r/ver1
PORT_STRING                    VERSION        BANNER
------------------------------ -------------- --------------------------------------------------------------------------------
x86_64/Linux 2.4.xx            11.2.0.4.0     Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

2.在client端执行:
R:\>set ORA_CLIENTTRACE_DIR=r:\
R:\>set EVENT_10842=server=all;user=all;stmt=all;level=15

--//登录后,执行sqlplus语句没有任何像ora_skgu_<pid>.trc1文件产生.
--//先尝试修改client的sqlnet.ora文件看看.
SCOTT@78> host ls -l r:\*.trc1
-rw-rw-rw-   1 user     group       22794 Jul  3 10:42 r:\ora_skgu_6708.trc1

--//OK,确实可以产生跟踪文件.里面一堆信息,看不懂..^_^.

时间: 2024-09-20 20:50:32

[20170703]Oracle Call Interface Tracing的相关文章

Oracle Net Services - Tracing and Logging at a Glance

    Oracle Net trace 用于跟踪或调试oracle连接故障,连接异常断开或者连接超时等情形,通过产生详细的跟踪信息来进行分析和诊断Oracle Net相关故障.关于这个网络调试主要是通过为相关的网络配置文件添加相关的参数来实现.MetaLink上ID 219968.1有详尽的描述.   一.Oracle trace的相关参数  TRACE_LEVEL_[CLIENT|SERVER|LISTENER]     = [0-16|USER|ADMIN|SUPPORT|OFF] TRA

【OH】Glossary Oracle词汇表(中)

Glossary [OH]Glossary Oracle词汇表(中) Oracle? Database Net Services Administrator's Guide 11g Release 2 (11.2) E41945-02 Glossary ● access control list (ACL) The group of access directives that you define. The directives grant levels of access to specif

【OH】Glossary Oracle词汇表(下)

[OH]Glossary Oracle词汇表(下) Oracle? Database Installation Guide 11g Release 2 (11.2) for Linux E47689-05 Glossary ● Oracle Automatic Storage Management disk group A set of disk devices that Oracle Automatic Storage Management (Oracle ASM) manages as a

【OH】Glossary Oracle词汇表(上)

Glossary [OH]Glossary Oracle词汇表(上) Oracle? Multimedia DICOM Developer's Guide 11g Release 2 (11.2) E10778-03 Glossary ● anonymity document An XML document that specifies the set of attributes to be made anonymous, and defines the actions required to

两种Oracle应用程序开发接口的对比分析

本文将介绍在Visual C++ 6.0中开发Oracle应用程序的最常用的两种方式:ADO(ActiveX Data Objects, ActiveX数据对象)与OCI(Oracle Call Interface,Oracle调用接口).通过设计实验,采用两种 方式分别完成数据初始化.数据读取.数据更新等工作,通过对比两种方式的代码量及运行速度来分析两 种方式的特点,并最终总结出两种方式各自的优缺点与适用范围. 引言 Oracle以其优越的稳定性和卓越的性能在众多领域里有着广泛的应用,其高性能

实例代码讲解Java连接Oracle数据库的各种方法

oracle|数据|数据库 java与oracle的接口: 在数据库中运行JAVA可以说是ORACLE8i的最令人激动的新特性.在你创建的使用ORACLE8i 数据库的应用程序中,你可以使用与JAVA有关的新特征,轻松的将程序发布到INTERNET或INTRANET上. Methods for Using Java in ORACLE 大家都知道JAVA在跨平台开发与INTERNET开发中已经比较流行,ORACLE8i及以后的版本中都包含了对在数据库中运行JAVA的扩展支持,这里有两种方法可以使

经典Oracle图书推荐-之三

oracle 经典的Oracle图书: Effective Oracle by design by Thomas Kyte   Tom的又一经典力作,在这本书里,Tom提出了一个DBA不应该是一个消防队员,而应该是能够从源头上预防问题的出现...How to Design Effective Oracle,Tom提出以下几个原则: Tuning before you start designingDesigning with specific performance goals in mind

[Oracle] 几本重要的电子图书下载

oracle|下载 [Oracle] 几本重要的电子图书下载 初始链接:http://www.dbanotes.net/Oracle/DB_Books_Download.htm供Oracle 技术爱好者参考.这些内容本着交流的目的,请不要用作商业利益.如果侵犯您的版权,请来信通知,我会立刻删除. Title:Scaling Oracle8i: Building Highly Scalable OLTP System Architectures Author: James Morle URL: h

把Oracle数据库移植到Microsoft SQL Server 7.0

oracle|server|数据|数据库  把Oracle数据库移植到Microsoft SQL Server 7.0 摘要:本文是为那些想把自己的Oracle应用程序转换为Microsoft SQL Server应用程序的开发人员编写的.本文描述了一个成功的转换所需要的工具.过程和技术.同时强调了建立高性能.高度并行的SQL Server应用程序的基本的设计要素. 本文的读者应该具有: Oracle关系型数据管理系统(RDBMS)的坚实基础. 普通数据库管理知识. 熟悉Oracle SQL和P