|
Oracle Home |
|
Home > Oracle Database Administration (DBA) > Database Tuning > TKPROF Utility |
|
Oracle Database 10g Administration (DBA): Database Tuning |
|---|
TKPROF Utility |
|
TKPROF Utility is not a tuning utility is just an utility to read the trace file. So, one time we have the trace file of one session we can use the TKPROF to read the trace file and to see what happen in that session. Here are the steps in using TKPROF utility:
1. Enable Oracle database to gather statistics (on session or system level)
ALTER SYSTEM SET
timed_statistics = true;
2. Find the SID, SERIAL# for a specific session you want to monitor
SELECT username, sid, serial#, program FROM v$session WHERE username = <User_Name>;
3. Enable the tracing for this session ( must be logged as SYSDBA )
EXECUTE dbms_system.set_sql_trace_in_session (<sid>, <serial#>, true);
4. Identify the directory where the trace file is generated
SELECT value FROM v$parameter WHERE name='user_dump_dest';
5. Identify the name of the trace file which is generated
SELECT
s.username, s.SID, s.serial#, s.PROGRAM, p.spid
v$process p
The name of the trace file is <oracle_sid>_ora_<p.spid>.trc
6. Disable the tracing for this session ( must be logged as SYSDBA )
EXECUTE dbms_system.set_sql_trace_in_session (<sid>, <serial#>, false);
More information about this subject ( TKPROF Utility ) you can get from www.in-oracle.com
TKPROF is available on the database server in the
$ORACLE_HOME\rdbms\admin directory. To examine TKPROF utility syntax
type TKPROF or TKPROF HELP=Y at the command line and hit the return key,
as with many other Oracle Database utilities. TKPROF accepts an input
trace file and outputs a formatted file.
More information you can get from here.
|
|
Home > Oracle Database Administration (DBA) > Database Tuning > TKPROF Utility |
|
Different Romanian Links/ Linkuri romanesti diferite |
Disclaimer: The views expressed on this web site are my own and do not reflect the views of Oracle Corporation. You may use the information from this site only at your risk. Copyright (c) 2009-2011 Paul Catalin Tomoiu. All rights reserved.