You were brought to this page based on an internet search
and as a free service to Oracle DBAs.
The text below is an except from the book,
Oracle Performance Firefighting, written by
Craig Shallahamer of
OraPub, Inc.
Figures and tables are not included on this page, only their reference.
To order the book in either print or PDF form, click
here.
©2009, 2010 by Craig Shallahamer. This is copyrighted material.
PleaseOut of respect for those involved in the creation of the book and also for
their familes, we ask you to respect the copyright both in intent and deed. Thank you.
-------------------------------
But all is not lost. Based on specified criteria, DBMS_MONITOR is able to gather performance information for groups or classes of activity. For example, when speaking with a user on the phone, suppose he says that querying basic customer information is painfully slow. Perhaps, for any number of reasons, you cannot easily identify his client or server process. However, when you look at v$session, you discover the application developers instrumented the application using DBMS_APPLICATION, setting both the module and action. You also discover that the application module apcustquery is being run when a customer's basic information is being queried. Here's the key: If the problem is related to what the user (or another user doing a similar task) is doing, not about the specific end user, then DBMS_MONITOR can capture both SQL and performance statistics when a customer's basic information is queried. Said another way, if it's beneficial to capture apcustquery performance information regardless of which users run the module, DBMS_MONITOR can help. But as you'll see, DBMS_MONITOR may be able to identify just the end user's activity. Classifying the activity of interest can be done in a surprisingly large number of ways-not just by an application's module and action.
So while DBMS_MONITOR still attaches to a server process, it will only collect performance data based on the defined criteria. If you can make the mental shift from end user to end user classification, combined with a little creativity in identification criteria, then DBMS_MONITOR will serve you well! The next section focuses on strategies to identify a session or a group of sessions.
This is probably the most unique aspect of using DBMS_MONITOR. Because you have many session identification options, you're likely to find a way to identify session(s) of interest. Sessions can be identified by their Oracle instance, session identifier (v$session.sid), client identifier (v$session.client_identifier), service name (v$session.service_name), module (v$session.module), program (v$session.program), and various combinations.
©2009, 2010 by Craig Shallahamer. This is copyrighted material.
PleaseOut of respect for those involved in the creation of the book and also for
their familes, we ask you to respect the copyright both in intent and deed. Thank you.
|