Skip Headers
Oracle® Database Express Edition 2 Day DBA
10g Release 2 (10.2)

Part Number B25107-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

8 Monitoring the Database

As an administrator, you can monitor the activities of the database and its users. You can use this information for tuning, troubleshooting, and more.

This section contains the following topics:

Monitoring Sessions

You can use the Oracle Database XE graphical user interface to monitor the current database sessions. This enables you to determine the users who are currently logged in to the database and what applications they are running.

You can also use the Oracle Database XE graphical user interface to kill a session—to cause it to be disconnected and its resources to be relinquished.

This section contains the following topics:

Viewing Sessions

When you view sessions, you can view:

  • All sessions

  • Active sessions only

  • Sessions that match a search string

The default session view shows active sessions only.

To view sessions:

  1. Access the Database Home Page and log in as user SYSTEM.

    See "Accessing the Database Home Page" for instructions.

  2. On the Database Home Page, click Administration, and then click Monitor.

  3. On the Database Monitor page, click Sessions.

    The Sessions page appears and displays the current active sessions.

    Description of sessions_active.gif follows
    Description of the illustration sessions_active.gif

    Note that the session marked with the Current Session icon under the Status column is your session.

  4. (Optional) In the Status list, select All, and then click Go.

    The page displays all sessions, including idle sessions. (An example of an idle session is a SQL Command Line session that is not currently running a command.)

    Description of sessions_all.gif follows
    Description of the illustration sessions_all.gif

  5. (Optional) Narrow down the sessions list by entering search text into the Search field and clicking Go.

    A session is shown if any of the following fields contain the search text: SID, Database User, Machine, OS User, Client Information, Client Identifier, and Module. The search is case-insensitive.

  6. (Optional) Click any of the hyperlinks above the Search field to view the following information for all sessions: Locks, Waits, Input/Output (I/O), running SQL statements, and open cursors.

    See the section entitled "Monitoring the Operation of your Database" in Oracle Database Administrator's Guide for discussions of this information.

  7. (Optional) Under the SID column, click a session ID to view the Session Details page for that session. The Session Details page enables you to kill (terminate) the session.

Killing (Terminating) a Session

You can use the Oracle Database XE graphical user interface to kill (terminate) a database session. This logs off and disconnects the user running the session. If the user is processing a transaction when you kill the session, the transaction is rolled back.

Reasons to kill a session include the following:

  • The session is not responding.

  • You want to perform an administrative function that requires all users to log off first, but the user is not available to end his session.

To kill a session:

  1. View all sessions.

    See "Viewing Sessions" for instructions.

  2. Under the SID column, click the session that you want to kill.

    The Session Details page appears.

  3. Click Kill Session.

    A page appears, prompting you to verify the action.

  4. Click Kill Session again.

Monitoring System Statistics

With the System Statistics page of the Oracle Database XE graphical user interface, you can monitor the following types of database statistics:

This section contains the following topics:

See Also:

Oracle Database Performance Tuning Guide for definitions and discussions of the various system statistics.

Viewing System Statistics

To view system statistics:

  1. Access the Database Home Page and log in as user SYSTEM.

    See "Accessing the Database Home Page" for instructions.

  2. On the Database Home Page, click Administration, and then click Monitor.

  3. On the Database Monitor page, click System Statistics.

    The System Statistics page appears.

Viewing the Delta in System Statistics

You can view the delta (relative change) in values between a saved set of statistics and the current set of statistics.

To view the delta in system statistics:

  1. View the System Statistics page.

    See "Viewing System Statistics" for instructions.

  2. (Optional) Click Refresh Report until you see the set of statistics that you want to use a your "base" set for comparison.

  3. Click Save Statistics.

    The Show delta between current and saved values check box is automatically selected.

  4. Do one of the following:

    • Wait for some period of time, and then click Refresh Report.

    • Navigate elsewhere in the Oracle Database XE graphical user interface, and then return to the System Statistics page.

    For each individual statistic, the delta between the saved statistic and the current statistic is displayed.

Monitoring the Top SQL Statements

The "top" SQL statements represent the SQL statements that are executed most often, that use more system resources than other SQL statements, or that use system resources more frequently than other SQL statements. Viewing the top SQL statements report that is available in the Oracle Database XE graphical user interface enables you to focus your SQL tuning efforts on the statements that can have the most impact on database performance.

See Oracle Database Performance Tuning Guide for a discussion of tuning SQL statements.

Note:

Some of the statements that appear in the top SQL statements report may be from automatically scheduled internal database jobs (such as statistics gathering jobs) or from the Oracle Database XE graphical user interface itself.

To monitor the top SQL statements:

  1. Access the Database Home Page and log in as user SYSTEM.

    See "Accessing the Database Home Page" for instructions.

  2. On the Database Home Page, click Administration, and then click Monitor.

  3. On the Database Monitor page, click Top SQL.

    The Top SQL page appears.

  4. (Optional) Select from the Top By list and click Go to change the statistic used to determine the statements that are the top SQL statements.

  5. (Optional) Select from the Display Top list and click Go to change the number of SQL statements displayed in the report.

  6. (Optional) Do one or more of the following to narrow down the contents of the report:

    • Enter search text into the SQL Text field, and then click Go.

      Only statements that contain the search text anywhere within them are displayed. The search is case-insensitive.

    • Enter a number into the Minimum Executions field, and then click Go.

      Only statements with executions greater than or equal to the Minimum Executions value are displayed.

    • Enter a module name into the Module field by clicking the up-arrow icon to the right of the field, clicking a module name in the pop-up Search window, and then clicking Go.

      Only statements run by the designated module are displayed.

  7. (Optional) Click the magnifying glass icon to the left of the SQL statement to view the following information:

    • The complete statement text

    • The statement query plan

    • Descriptions of the tables involved in the statement

Monitoring Long Operations

The Long Operations page of the Oracle Database XE graphical user interface displays statistics on various operations that run for longer than 6 seconds (in absolute time). These operations currently include many backup and recovery functions, statistics gathering operations, and query execution.

To monitor long operations:

  1. Access the Database Home Page and log in as user SYSTEM.

    See "Accessing the Database Home Page" for instructions.

  2. On the Database Home Page, click Administration, and then click Monitor.

  3. On the Database Monitor page, click Long Operations.

    The Long Operations page appears.

  4. (Optional) Under the SID column, click a session ID to view the Session Details page for that session. The Session Details page enables you to kill the session.