Enabling Tracing in Your Application

原创 2012年03月28日 10:46:44

If you own the source code to theapplication you wish to trace, it might be feasible for you to modify the codedirectly to enable SQL Trace. This can be advantageous because you can enableSQL Trace at precisely the point in your application where you have a doubt.This can greatly narrow the scope of your tracing exercise, allowing you tofocus efforts on the bottleneck itself.

Depending on the tools used to build yourapplication, you may be able to enable SQL Trace with the simple command:

ALTER SESSION SET SQL_TRACE = TRUE;
If you need to enable SQL Trace from withina PL/SQL block, you can call:
dbms_session.set_sql_trace (TRUE);

SQL Trace output is most valuable when timedstatistics are enabled. You can instantly enable timed statistics for allsessions by logging on to the database as a DBA and executing the command:

ALTER SYSTEM SET TIMED_STATISTICS = TRUE;

If you are concerned about the overhead thiscauses, you may instead modify the application code to enable timed statisticsfor the current session instead of the entire instance. You can do this withthe command:

ALTER SESSION SET TIMED_STATISTICS = TRUE;

To enable timed statistics from within aPL/SQL block, you must use the dbms_sql package to build and execute a dynamicSQL statement:

DECLARE
  c INTEGER; i INTEGER;
BEGIN
  c := dbms_sql.open_cursor;
  dbms_sql.parse (c, 'ALTER SESSION SET TIMED_STATISTICS = TRUE',
                  dbms_sql.native);
  i := dbms_sql.execute (c);
  dbms_sql.close_cursor (c);
END;


Enabling Tracing

trace type TYPE{,TYPE} |filename FILENAME | [not full];dsftpindexjpoldaplogwritermemorymqlOTHER_TYPE...
  • lishengc
  • lishengc
  • 2011年06月29日 13:45
  • 156

you need to have ldconfig in your PATH env when enabling luajit

在安装阿里的OpenResty®(通过 Lua 扩展 NGINX 实现的可伸缩的 Web 平台)时出现如下错误: you need to have ldconfig in your PATH env...
  • leehbing
  • leehbing
  • 2017年08月31日 18:26
  • 433

使用 uwsgi + web.py 遇到 “--no python application found, check your startup logs for errors--”

准备玩玩用python写后台(实际上是要写软工作业orz),设置好nginx和uwsgi后,又安装了web.py。按照官网写了测试脚本后,访问的时候总是提示Internal Server Error,...
  • imred
  • imred
  • 2015年10月25日 11:45
  • 6394

【经验】Android Gradle配置问题

翻墙后搞了一天Gradle,到处找资料,结果都不行,记录一点经验,以备之后再次出错 有时,配置Gradle出现如下错误Gradle DSL method not found:'android()' ...
  • chenjj2048
  • chenjj2048
  • 2016年04月03日 21:18
  • 332

Enabling DMA on your disk

PrerequisitesFirst, you need to be sure that DMA is disabled. You can check this with the following ...
  • xianfengdesign
  • xianfengdesign
  • 2007年05月22日 20:37
  • 391

Unity3D android项目启动:your hardware does not support this application

接入的是360游戏相关的sdk,在我手机和模拟器运行都没问题,但是在华为荣耀及360手机出现your hardware does not support this application,sorry的...
  • jia635
  • jia635
  • 2017年10月17日 19:57
  • 790

No suitable application records were found. Verify your bundle identifi

1:没有在AppStore构建相应的版本。 2:本地的application loader的登录账号,注意要与AppStore构建版本的登录账号是一致的。。。。...
  • cos_sin_tan
  • cos_sin_tan
  • 2016年09月10日 12:53
  • 1081

SQLiteDatabase和Contentprovider

SQLiteDatabase和Contentprovider这两个数据库,我一般是用前面一个,喜欢它的操作数据库的语句,简单明了,可惜有时遇到数据库同步的问题,有时我们需要在一个数据库下建立多个表,多...
  • u010436741
  • u010436741
  • 2013年08月30日 17:04
  • 2242

Xcode上传失败 No suitable application records were found

今天用applicationLoader上传一个app的时候,没有在iTunes上新建一个app,就开始使用applicationLoader上传,结果报错,提示找不到app的信息记录。这时候才恍然想...
  • Lu_Ca
  • Lu_Ca
  • 2016年06月21日 15:30
  • 1543

Unity3D的android项目启动报错:your hardware does not support this application

把Unity3D导出的android资源放到eclipse adt的android项目下后编译启动,能正常跑起来 但是放到android studio项目里就不能跑起来,弹出这个错:your har...
  • live4what
  • live4what
  • 2016年06月02日 17:11
  • 10765
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:Enabling Tracing in Your Application
举报原因:
原因补充:

(最多只允许输入30个字)