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中Kill session的研究
作者:eygle |English Version 【转载时请以超链接形式标明文章出处和作者信息及本声明】
链接:http://www.eygle.com/archives/2004/06/kill_session.html
我们知道,在Oracle数据库中,可以通过kill session的方式来终止一个进程,其基本语法结构为:
alter system kill session 'sid,serial# ......
比较专业,专门计算机技术电子书下载的:
www.itpub.net
www.itepub.net
www.netyi.net/in.asp?id=daotong
www.chmpdf.com
相对不太专业的,内容也非常丰富
www.infoxa.com
www.xpbook.com
这些网站几乎可以找到你想要的全部书籍。 ......
最近在使用Oracle做文件上传,要求将文件数据保存到数据库中。Oracle提供了Blob用来存储二进制大对象数据,可是它和Java.sql里面的Blob不兼容,经常导致Blob字段无法锁定或者操作失败。由于以前没有做过这样的例子,所以花了不少时间才解决。
我使用的是struts2.1.8+spring2.5+hibernate3.2,下面是相关代码:
spring配置 ......
如何远程判断Oracle数据库的安装平台
select * from v$version;
查看表空间的使用情况
select sum(bytes)/(1024*1024) as free_space,tablespace_name
from dba_free_space
group by tablespace_name;
SELECT A.TABLESPACE_NAME,A.BYTES TOTAL,B.BYTES ......
第一种用法:
SELECT (CASE type WHEN 'u' THEN '用户表' WHEN 's' THEN '系统表' ELSE '其他' END) AS TABLEKIND,* from SYSOBJECTS
第二中用法:
SELECT (CASE WHEN crdate<'2006-01-01' THEN 'early' WHEN crdate<'2009-01-01' THEN 'nearly' ELSE 'now' END) AS PERIOD,* from SYSOBJECTS ......