Tuesday, June 24, 2008

OLAP Added to 10gR2 but XOQ component INVALID

Did not post new blogs for last couple of months, busy working on database upgrade, its a 10.2.0.3, size 5TB and 3 node RAC.

Recently I visited my favorite BLOG like every day/week, and at the same time we got a request to apply OLAP Patch 5746153 - which I applied successfully and done post-patch steps.
Component XOQ was INVALID, no matter what I do, its still Invalid. Did the usual steps - googled, searched metalink and then created tar. Finally I was able to get hold of good analyst who reffered me to note Note:466363.1, after following the steps I got below error.

SQL> select status from dba_registry where comp_id = 'XOQ';
STATUS
------------------------
INVALID

SQL> set serveroutput on size 10000
SQL> exec xoq_validate
compat -> 10.2.0
BEFORE BOOTSTRAPORA-37111: Unable to load the OLAP API sharable library: (Cannot map text forlibrary: mmap(0x0,0x13e6914, 0x5, 0x41, 58, 0x0) returns Permission denied.)
AFTER BOOTSTRAP: REGISTRY.INVALID
comp_name: Oracle OLAP API
version: 10.2.0.3.0
status: INVALID
PL/SQL procedure successfully completed.

$ls -l /home/oracle/10.2/lib//libolapapi10.sl
-rw-r--r-- 1 oracle dba 36056968 Apr 23 2007 /home/oracle/10.2/lib//libolapapi10.sl

Did the usual searching and finally did a CHMOD and ran xoa_validate to my surprise it got validated.

chmod 744 /home/oracle/10.2/lib//libolapapi10.sl

SQL> select status from dba_registry where comp_id = 'XOQ';
STATUS
------------------------
VALID

Then later I found its a know bug 6979371 and oracle ended-up publishing note 603179.1 for the same

Reference Metalink Notes
Note#: <466363.1>Titled: Oracle Olap API Invalid After Adding OLAP
Note#: <603179.1>Titled: Oracle Olap Api Invalid After Upgrade To 10.2.0.3



Good Luck

Monday, March 24, 2008

DST Change - OEM start agent failed, agentTZRegion settings

Because of DST change, I saw the agents which were shutdown are not starting, tried manually but no luck.

$ emctl start agent
Oracle Enterprise Manager 10g Release 10.2.0.2.0.
Copyright (c) 1996, 2006 Oracle Corporation. All rights reserved.
Starting agent ...... failed.
The agentTZRegion value in /home/oracle/product/10.2.0/em10g/agent10g/sysman/config/emd.properties is not in agreement with what agent thinks it should be.Please verify your environment to make sure that TZ setting has not changed since the last start of the agent.
If you modified the timezone setting in the environment, please stop the agent and exectute 'emctl resetTZ agent' and also execute the script mgmt_target.set_agent_tzrgn(
, ) to get the value propagated to repository.
Consult the log files in: /home/oracle/product/10.2.0/em10g/agent10g/sysman/log


Resolution
In emd.properties you need to correctly set the agentTZRegion value
agentTZRegion=-04:00

And login to OEM repository and run the following SQL to get the present values, so you can reset the value in repdb - login as SYS

select TARGET_NAME, timezone_region FROM mgmt_targets WHERE target_type = 'oracle_emd' AND target_name like '%hostname%';

TARGET_NAME TIMEZONE_REGION
-------------------------- --------------------------
hostname.domainname:2872 -05:00


Now reset the value to correct TZ settings

SQL> exec mgmt_target.set_agent_tzrgn('hostname.domainname:2872','-04:00');
SQL> commit;

Restart the agent, its successful

$emctl start agent
Oracle Enterprise Manager 10g Release 10.2.0.2.0.
Copyright (c) 1996, 2006 Oracle Corporation. All rights reserved.
Starting agent .............................. started.



Good Luck, Cheers