Grid control 10.2.0.5 New features – Part III

Real-time Sql monitoring is a really exciting new feature that was introduced in oracle database 11gR1. This feature allows you to monitor the performance of sql statements as they are executing. Sql monitoring is automatically started if a sql statement is executing in parallel, or if the sql statement has spend more than 5 seconds of CPU or I/O time during a single execution. Details for this feature can be found in the 11g Performance Tuning guide.

You can run the report from sqlplus (And spool the html output to an o/s file) as follows

sqlplus / as sysdba

set long 1000000000
set pages 0

spool sqlmon.html

select
DBMS_SQLTUNE.REPORT_SQL_MONITOR(
sql_id=>’255xfn4xrq51a’,session_id=>170,session_serial=>7,
type=>’HTML’) as report
from dual;

spool off
exit;

A sample output can be seen here.

Grid control 10.2.0.5,exposes this functionality from the management console (Until now you could access this from 11g database control or using the API DBMS_SQLTUNE.REPORT_SQL_MONITOR). You can access this by navigating to Targets -> Databases -> Choose your 11g database -> Performance. You can then click on “SQL monitoring” to monitor your sql statements that are currently executing.

This screen gets refreshed every 10 seconds, and it shows the SQL Id, The total execution time up till now, Degree of parallelism in use, The database time, Total I/O count, Start Time (If the sql has completed, the End Time) and the actual sql statement.

You can click on Status to further drill down into the sql statement.

The overview section shows the Duration, Database Time, IO count and buffer gets done by the sql (And the screen refreshes every 10 seconds, showing you the progress.)

The details section has 3 different views . Plan statistics that shows you the execution plan , and time spend, in different steps in the execution plan.

The parallel view, gives you further drill down into each parallel server and shows the Db time, Wait Activity%, IO count and Buffer gets by each parallel server.

The activity view , gives you the color coded activity breakdown within the session CPU, and other wait events.

You can also get to the real-time sql monitoring screen by identifying a sqlid and drilling down into the sql id. Then there is a tab named “sql monitoring” , which gives you this same information.

Really neat, dont you think ?

Grid control 10.2.0.5 new features – Part II

Two more new features from 10.2.0.5 enterprise manager, grid control.

Fine-grained, target privileges

When you create an administrator in Grid control, to whom you are granting operator privileges, you can now further control what activities they are able to perform.

You can choose from granting them

Blackout target

Manage target metrics

Configure target

Manage target alerts

Clone database from existing backup

Prior to grid control 10.2.0.5, your only two options, to clone a database using the provisioning pack, were to 1) do a hotclone from an existing database 2) use an existing backup from a previous clone.

Now in 10.2.0.5 grid control, to clone a database, you can  choose to use an existing database backup. You can choose to clone from a existing database, and in the Source Type screen, you can choose “An Existing database backup”.

Grid control 10.2.0.5 new features – Part I

There are numerous new features in grid control 10.2.0.5. In this post I will be exploring  2 of them.

Improvements in Monitoring Templates.

In 10.2.0.5 when you create and apply templates, you can control how the metrics on the target are being modified. You have two options

1) Template will completely replace all metric settings in the target

2) Template will only override metrics that are common to both the template and the target.

If you choose option 1, all the metrics on the target other than the one’s specified in the template will be removed, and the ones specified in the template will be updated, with the thresholds set in the template.

If you choose option 2, it will only modify the metrics that are specified in the template.

Improvements in Alert Handling

In 10.2.0.5,  when you are checking the details regarding an alert you get  1 new option. You get a button that lets you re-evaluate the metric. So if the condition that triggered the alert has cleared, then the alert can be cleared.

Also another improvement is that the “acknowledge” function is now present as a button (Previously it was a URL at the bottom of the page).

Upgrading Enterprise Manager to 10.2.0.5

Finally today, i upgraded my grid control installation to 10.2.0.5 (From 10.2.0.4). Instructions for installing 10.2.0.4 can be found in my previous blog post, Installing Grid Control 10.2.0.4

Amazing but true, the process was fairly straight forward. I mostly followed the instructions in the Readme and its close, more detailed cousin, Metalink Note 464674.1. So without further ado, below are the steps that i followed.

Download the grid control patch  10.2.0.5

Unzip gc_10205_part2of2.zip (Because the file  p3731593_10205_LINUX.zip you need is in that)

Take a good backup of  the oms, agent and oracle database.

All of the following actions were performed on the management server.

Analyze the SYSMAN schema

Login to the SYSMAN schema in the management repository

SQL> exec emd_maintenance.analyze_emd_schema(‘SYSMAN’)

Check for Invalid Objects

Login to the SYSMAN schema in the management repository

SQL> select object_name, object_type from all_objects where owner=’SYSMAN’ and status <> ‘VALID’;

Login to the SYS schema in the management repository

SQL> select object_name, object_type from all_objects where status<>’VALID’ and object_name like ‘DBMS%’;

Stop jobs running in Enterprise Manager

Login to the SYSMAN schema in the management repository

SQL> execute emd_maintenance.remove_em_dbms_jobs;

Setup Database Initialization Parameters

Login to the SYS schema in the management repository

alter system set sga_max_size=1024M scope=spfile
alter system set sga_target=1024M scope=spfile;
alter system set job_queue_processes=0 scope=spfile;
alter system set shared_pool_size=512M scope=spfile;

Shutdown and restart the database.

Ensure that the database listener is up and running.

I had left the iasconsole (emctl start iasconsole) and oracle management server running (opmnctl startall)

Make sure that the following files under the Oracle home of OMS have write permissions before staring the Upgrade process.
<ORACLE_HOME>/j2ee/OC4J_EM/applications/em/em/online_help/paf_cs/paf_cs_he lp.jar
<ORACLE_HOME>/j2ee/OC4J_EM/applications/em/em/online_help/paf/paf_help.jar

If you do not remember the password for your iasconsole (It is supposed to be the same as the password you specified for SYSMAN during the original install), this will be a good time to follow metalink note 396344.1 and change this password (Because the patch installer will prompt you for this password, and will not proceed unless you provide the correct password).

Apply patch 10.2.0.5 to the OMS

cd to your software staging directory

cd /u01/oem
unzip gc_10205_part2of2.zip
unzip p3731593_10205_LINUX.zip
cd 3731593
./runInstaller

When it prompts you,  run root.sh from the oms home.

Apply patch 10.2.0.5 to the Agent

cd /u01/oem/3731593
./runInstaller

Completing the Upgrade

Login as the schema SYS to the management repository

alter system set sga_max_size=500M scope=spfile;
alter system set sga_target=500M scope=spfile;
alter system set job_queue_processes=10 scope=spfile;
alter system set shared_pool_size=0 scope=spfile;

Restart the jobs scheduled in Enterprise Manager

Login as the schema SYSMAN to the management repository

SQL> EXEC emd_maintenance.submit_em_dbms_jobs;

Stop and restart the agent, management server and management repository database.

Login to enterprise manager and enjoy using 10.2.0.5