Using Oracle Trace Analyzer (trcanlzr.sql)
Using Oracle Trace Analyzer (trcanlzr.sql)
Dave Moore: Author of Oracle Utilities
Oracle has provided another utility initially designed for performance tuning Oracle Applications. Trace Analyzer is provided in the form of a PL/SQL package (TRCA$ ). The Trace Analyzer utility is available via download on the Oracle Metalink web site.
How Oracle trace analyzer Works
Trace Analyzer requires that a one-time configuration be performed. During this configuration, many objects are installed in the database to serve as a tracing repository. Once downloaded from Metalink and installed, a SQL script can be executed passing in the name of the trace file.
Executing Oracle Trace Analyzer
First, tracing needs enabled at the appropriate level. For example, to provide maximum trace data, a Level 12 trace can be started for the current session:
SQL> ALTER SESSION SET EVENTS '10046 TRACE NAME CONTEXT FOREVER, LEVEL 12';
After the session executes for enough time to gain needed data, the trcanlzr SQL script can be executed. It requires the name of the directory object. This object points to the physical operating system directory for the user_dump_dest. The installation of the utility will automatically create the directory object required (named UDUMP).
SQL>@d:\trcanlzr.sql UDUMP asg920xr_ora_13033.trc
Once executed, the output will be displayed on the screen and a spool file is created.
Is Oracle trace Analyzer better than tkprof?
Traditionally, tkprof has been the best tracing diagnostics tool available. That is, until the introduction of Trace Analyzer which is everything tkprof is and more. However, as of version 10.2, the Trace Analyzer utility is still not shipped with the Oracle DBMS like tkprof.
Given access to both utilities, Trace Analyzer has the following advantages:
1. Trace Analyzer provides the actual values of the bind variables in SQL. N
相关文档:
oracle的同义词总结:
从字面上理解就是别名的意思,和试图的功能类似。就是一种映射关系。
1.创建同义词语句:
create public synonym table_name for user.table_name;
其中第一个user_table和第二个user_table可以不一样。
此外如果要创建一个远程的数据库上的某张表 ......
今天上午测试一个访问ORACLE的c++类,文档上说连接字符串的格式为"用户名/口令@连接名",我不是太明白连接名到底为何物,先用IP地址试了试
,总是报错,说无法解析的连接标识符,后来在网上查了半天,看到有个人说连接名就是$(ORACLE_HOME)/network/admin/tnsnames.ora里定义的数据库连接的名称,试了一下,果然如此。 ......
游标:
用来查询数据库,获取记录集合(结果集)的指针,可以让开发者一次访问一行结果集,在每条结果集上作操作。
分类:
静态游标:
分为显式游标和隐式游标。
REF游标:
是一种引用类型,类似于指针。
显式游标:
CURSOR 游标名 ( 参数 ) [返回值类型] IS
Select 语句
生命周期:
1.打开游标(OP ......
1、set linesize 100; 设置长度
2、set pagesize 30; 设置每页显示数目
3、em a.sql 打开记事本
4、@ a 执行文件a中的代码,可指定文件的路径 @d:a.txt ......