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可以不一样。
此外如果要创建一个远程的数据库上的某张表 ......
1个实例
create table tjob2(tt date);
创建一个存储过程
create or replace procedure t26 is
begin
insert into tjob2 values(sysdate);
commit;
end t26;
创建job,每分钟执行一次
SQL> declare
2 tjob number;
3 begin
4 sys.dbms_jo ......
1、set linesize 100; 设置长度
2、set pagesize 30; 设置每页显示数目
3、em a.sql 打开记事本
4、@ a 执行文件a中的代码,可指定文件的路径 @d:a.txt ......
今天有个学生问我调用包里面具有游标类型的输出参数,可是在用PL/SQL程序调用的时候居然报出参数个数或类型错误的异常信息,于是自己也试了一下,果然是出错了。然后就自己琢磨了一下、查查资料和问问同事,原来问题是很简单的,先看一下程序的结构代码:
CREATE OR REPLACE PACKAGE Pkg_S ......