Create / Edit Service Test - Oracle SQL Timing Page

Use this page to define a an Oracle SQL Timing service test. Use this test to determine the availability and performance of a connection to an Oracle database.

Parameter

Description

Host, Port and SID

Enter the name or IP address of the host, the Port number and System Identifier (SID).

Use Connection Pool

Specify whether the connection pool should be used. The connection pool is a set of open connections maintained by the agent. It is a resource shared across all functions of the agent.

Username / Password / Role Enter the username, password and role of the user.
Statement and Type Specify whether a SQL or PL/SQL statement is to be used. Depending on your choice, enter a SQL or PL/SQL string here.
PL/SQL Parameter Position

If you select PL/SQL, specify the index of the bind variable.

Example:

Create a SQL test by entering the following as the Statement test parameter:

SELECT TABLE_NAME
FROM USER_TABLES

The Statement Type should be SQL, and the PL/SQL Out Parameters should be left blank, since this is not a PL/SQL statement.  When the Agent executes the metric, the SQL statement will be run and timed by the agent.

To write a PL/SQL test that returns a cursor, enter the following as the Statement test parameter:

BEGIN
  OPEN :1 FOR SELECT TABLE_NAME FROM USER_TABLES;
END;

Select PL/SQL for the Statement Type.  The Parameter Position should be 1, referring to the first bind variable.  The Parameter Type should be SQL_CURSOR, indicating that the rows of the cursor should be fetched.

PL/SQL Parameter Type If you select PL/SQL, specify the type of bind variable to be used. The parameter type may be simple, e.g. “Number,” or it may be a collection, e.g. “VARRAY.” If the Parameter Type is a collection, then each element in the collection will be considered a “row” in the resulting metrics. If your query returns a cursor, then specify “SQL_CURSOR.”

Metrics Collected

Metric

Description

Status Indicates whether the SQL or PL/SQL statement could be successfully executed.
Total Time

The total time taken to connect to the database and run the query. It is the sum of Connect Time, Prepare Time, Execute Time, Fetch Time and Close Time.

User Action
Use the Total Time metric to identify database connectivity problems. Examine the other metrics to isolate and repair the problem. If you have an Enterprise Manager target instance for the database, you should consult the homepage for the database.

Connect Time

Total time taken to connect to the database.

User Action
Connect Time might be slow if the network is congested, if the database is having trouble authenticating the user, or if the database is having trouble allocating connections. If you have an Enterprise Manager target instance for the database, you should consult the homepage for the database.

Prepare Time

Time taken to prepare the SQL statement. This usually includes fetching metadata for the object types in the query.

User Action
Prepare Time might be slow if the network performance is slow or if database performance is slow. If you have an Enterprise Manager target instance for the database, you should consult the homepage for the database.
Execute Time

Time taken to execute the SQL statement.

User Action
Execute Time will be slow if the database performance is slow. If you have an Enterprise Manager target instance for the database, you should consult the homepage for the database.
Fetch Time

Time taken to retrieve data from the server.

User Action
Fetch Time might be slow if the network bandwidth is low or if database performance is slow. If you have an Enterprise Manager target instance for the database, you should consult the homepage for the database.

Close Time

Time taken to close the connection.

User Action
Close Time might be slow if the network performance is slow. Examine your network configuration.

Number of Rows Fetched

The total number of rows fetched during a query.

User Action
If the Number of Rows Fetched is not what you expected, then examine the contents of your database. Unexpected rows in the result could affect Fetch Time and Total Time.

Total Time per Row

Time taken to perform the entire test divided by the number of rows fetched (Total Time / Number of Rows Fetched). Total Time per Row is a good metric to use for setting thresholds and for comparing the performance of different Oracle SQL Timing tests.

User Action
Use the Total Time per Row metric to identify database connectivity problems. As with the Total Time metric, you should examine the other metrics to isolate and repair the problem. If you have an Enterprise Manager target instance for the database, you should consult the homepage for the database.
Fetch Time per Row

Time taken to fetch each row (Fetch Time / Number of Rows Fetched). Fetch Time per Row is a good metric to use for setting thresholds and for comparing the performance of different Oracle SQL Timing tests.

User Action
Use the Fetch Time per Row metric to identify data transfer problems. If the value of this metric is high, then the data-transfer bandwidth between the client and the database is poor. If you have an Enterprise Manager target instance for the database, you should consult the homepage for the database.

Related Topics

About Services

Types of Service Tests

Creating a Service

Enterprise Manager Information Roadmap