资源预览内容
第1页 / 共3页
第2页 / 共3页
第3页 / 共3页
亲,该文档总共3页全部预览完了,如果喜欢就下载吧!
资源描述
trcsess utilityWhen solving tuning problems, session traces are very useful and offer vital information. Traces are simple and straightforward for dedicated server sessions, but for shared server sessions, many processes are involved. The trace pertaining to the user session is scattered across different trace files belonging to different processes. This makes it difficult to get a complete picture of the life cycle of a session.Now there is a new tool or command line utility to help read the trace files. The trcsess command-line utility consolidates trace information from selected trace files, based on specified criteria. The criteria include session id, client id, service name, action name and module name.Also note that beginning with Oracle10g, Oracle Trace functionality is no longer available. For tracing database activity, use SQLTrace or TKPROF instead.The syntax for the trcsess utility is:trcsess output=output_file_namesession=session_Idclientid=client_Idservice=service_nameaction=action_namemodule=module_nametrace_fileswhere: output specifies the file where the output is generated. When this option is not specified, the standard output is used for the output. session consolidates the trace information for the session specified. The session Id is a combination of session index and session serial number. clientid consolidates the trace information given client Id. service consolidates the trace information for the given service name. action consolidates the trace information for the given action name. module consolidates the trace information for the given module name. trace_files is a list of all trace file names, separated by spaces, in which trcsess will look for trace information. The wild card character * can be used to specify the trace file names. If trace files are not specified, all the files in the current directory are checked by trcsess.End-to-End TracingEnd-to-End Tracing is a new feature in Oracle Database 10g that facilitates the following tasks: Helps the debugging of performance problems in multi-tier environments. In multi-tier environments, a request from an end client is routed to different database sessions by the middle tier. Proper accounting of workload for applications using services. Service Name, Module, and Action name provide a means to set apart important transactions in an application.End-to-End tracing becomes possible with the attribute client_identifier in v$session, which uniquely identifies a given end client and is carried through all tiers to the database server. Enabling tracing based on the client_identifier solves the problem of debugging performance problems in multi-tier environments.You can use the newly introduced dbms_monitor package to control additional tracing and statistics gathering. This package contains the following procedures used to enable and disable additional statistics aggregation: client_id_stat_enable: Used to enable statistics accumulation for a given client identifier client_id_stat_disable: Used to disable statistics accumulation for a given client identifier serv_mod_act_stat_enable: Used to enable statistics accumulation for a given hierarchy of service name, module name, and action name serv_mod_act_stat_disable: Used to disable statistics accumulation for a given hierarchy of service name, module name, and action nameHere is an example to enable and disable the tracing based on a client_id:EXECUTE DBMS_MONITOR.CLIENT_ID_TRACE_ENABLE (client id);EXECUTE DBMS_MONITOR.CLIENT_ID_TRACE_DISABLE (client id);The above is an excerpt from the bestselling Oracle10g book Oracle Database 10g New Features by Mike Ault, Madhu Tumma and Daniel Liu, published by Rampant TechPress.Mike Ault, one of the worlds top Oracle experts, has finally consented to release his complete collection of more than 450 Oracle scripts, covering every possible area of Oracle administration and management.This is the definitive collection of Oracle monitoring and tuning scripts, and it would take thousands of hours to re-create this vast arsenal of scripts from scratch.Mike has priced his collection of 465 scripts at $39.95, less than a dime per script. You can download them immediately at this link:http:/www.rampant-books.com/download_adv_mon_tuning.htm
收藏 下载该资源
网站客服QQ:2055934822
金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号