SQL> showparameter sqlNAME TYPE VALUE----------------------------------------------- ------------------------------plsql_ccflags stringplsql_code_type string INTERPRETEDplsql_compiler_flags string INTERPRETED, NON_DEBUGplsql_debug boolean FALSEplsql_native_library_dir stringplsql_native_library_subdir_count integer 0plsql_optimize_level integer 2plsql_v2_compatibility boolean FALSEplsql_warnings string DISABLE:ALLsql92_security boolean FALSEsql_trace boolean FALSEsql_version string NATIVEsqltune_category string DEFAULT SQL>alter session set sql_trace=true ; 对于跟踪的sql语句,生成的trace 文件放在udump 下 通过以下语句可以查到生成的trc文件 SQL> selectusername,addr,spid from v$process 2 where addr=( select paddr from v$session 3 where sid=( selectdistinct sid from v$mystat)); USERNAME ADDR SPID----------------------- ------------Oracle 2AE1D48C 13954 SQL> showparameter dump NAME TYPE VALUE----------------------------------------------- ------------------------------background_core_dump string partialbackground_dump_dest string /u01/app/oracle/admin/ora1/bdump core_dump_dest string /u01/app/oracle/admin/ora1/cdumpmax_dump_file_size string UNLIMITEDshadow_core_dump string partialuser_dump_dest string /u01/app/oracle/admin/ora1/udump [oracle@rac1 ~]$ ls-lth /u01/app/oracle/admin/ora1/udump/total 156K-rw-r----- 1 oracleoinstall 87K May 26 17:29 ora1_ora_13954.trc 用tkprof分析,跟踪文件[oracle@rac1 ~]$tkprofUsage: tkproftracefile outputfile [explain= ] [table= ] [print= ] [insert= ] [sys= ][sort= ] table=schema.tablename Use "schema.tablename" with "explain="option. explain=user/password Connect to ORACLE and issue EXPLAIN PLAN. print=integer List only the first "integer" SQLstatements. aggregate=yes|no insert=filename List SQL statements and data inside INSERTstatements. sys=no TKPROF does not list SQL statementsrun as user SYS. record=filename Record non-recursive statements found in thetrace file. waits=yes|no Record summary for any wait events foundin the trace file. sort=option Set of zero or more of the following sortoptions: prscnt number of times parse was called prscpu cpu time parsing prsela elapsed time parsing prsdsk number of disk reads during parse prsqry number of buffers for consistent read during parse prscu number of buffers for current read during parse prsmis number of misses in library cache during parse execnt number of execute was called execpu cpu time spent executing exeela elapsed time executing exedsk number of disk reads during execute exeqry number of buffers for consistent read during execute execu number of buffers for current read during execute exerow number of rows processed during execute exemis number of library cache misses during execute fchcnt number of times fetch was called fchcpu cpu time spent fetching fchela elapsed time fetching fchdsk number of disk reads during fetch fchqry number of buffers for consistent read during fetch fchcu number of buffers for current read during fetch fchrow number of rows fetched userid userid of user that parsed the cursor
更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12PHP中对MySQL的操作Oracle 查询数据相关资讯 oracle数据库教程
- Oracle raw数据类型介绍 (01/29/2013 10:05:53)
- 监听器注册与ORA-12514 错误分析 (11/13/2012 14:30:08)
- Oracle SQL的cursor理解 (11/13/2012 14:16:17)
| - Oracle 如何强制刷新Buffer Cache (01/29/2013 10:02:46)
- dblink致Oracle库的SCN变成两库的 (11/13/2012 14:24:41)
- Linux操作系统下完全删除Oracle数 (11/13/2012 08:25:52)
|
本文评论 查看全部评论 (0)