2008/11/10

High CPU Utilization after start OMS

Grid Control 10.2.0.2
Repository Database 10.1.0.4
Windows 2003 R2 SP2

After new installation of 10g Grid Control on this server, CPU keeps running 100%. Every time I stop OMS using "opmnctl stopall", CPU utilization falls back to normal.
Every time "opmnctl startall" is issued, CPU utilization go up to 100% again and never fall down.

After checking Task Manager, I found out oracle.exe occupies near 99% of CPU utilization.
On windows platform, there is only one oracle master process, and it is divided into several oracle threads.
In order to check CPU utilization for each thread, "Performance Monitor" is the best solutoin. "Diagnosing High CPU Utilization on NT" (metalink note: 116236.1) gives a detailed explanation.

After some check on dynamic performance views, using

SELECT ss.sid,se.command,ss.value CPU ,se.username,se.program
FROM v$sesstat ss, v$session se
WHERE ss.statistic# IN
(SELECT statistic#
FROM v$statname
WHERE name = 'CPU used by this session')
AND se.sid=ss.sid
ORDER BY ss.sid;

I'm still unable to identify the problem, even though I can find the suspicious sid.

I run into a discussion on a forum, and found a solution as follows:

Shutdown OEM, login as SYSMAN user and restart the provisioning daemon by executing the two packaged procedures

SYSMAN> execute MGMT_PAF_UTL.STOP_DAEMON
PL/SQL procedure successfully completed.

SYSMAN> execute MGMT_PAF_UTL.START_DAEMON
PL/SQL procedure successfully completed.

Start OEM again and the problem is gone.

And it worked.
It seems like a bug inside oracle.

Relocate tempfile in 10g

database 10.1.0.4

You cannot use "ALTER DATABASE RENAME FILE ... TO ..." to relocate a tempfile in 10g.

If the temporary tablespace to which tempfile belongs is the default tablespace, then
1) Copy the tempfile to the new location using OS command.
2) Create new temporary tablespace
CREATEA TEMPORARY TABLESPACE new_name TEMPFILE 'new_tempfile_name' REUSE;
3) Make it the default temp tablespace for the database
ALTER DATABASE DEFAULT TEMPORARY TABLESPACE 'new_name';
4) Drop the old tablespace
DROP TABLESPACE 'old_name' including contents and datafiles;

If you want to keep the same temporary tablespace name, then rename the old name first using:

SQL> ALTER TABLESPACE 'old_name' RENAME TO 'new_name';

2008/10/26

ORA-12500 on windows platform

Oracle 9.2.5.0, Windows 2000

This is a recent issure I found concerning oracle net service.

If I start OracleServiceSID under a domain user, and start OracleOracleHomeTNSListener under LocalSystem, I cannot connect to oracle through local naming on the same machine, I get ORA-12500. But I can connect to oracle using OS authentication on the same machine, and I can also connect to oracle through local naming from a client machine. But this wired thing will never happen if I start both of them under the same domain user, or start OracleServiceSID under LocalSystem.

Big difference between Linux/Unix and Windows platform regarding Oracle is that windows have domain user, and service for oracle, and dierent services can be started under different users. DBAs should always pay attention to under which user the service is started. Different privs can lead to oracle errors.

Discovering node incorrectly due to listener configuration

Oracle 9.2.0.5, Windows 2000

Normally, oracle will dynamically register service with the name defined in the parameter service_names. So if you add the same entry inside the listener.ora, it will list the same service twice when you execute "lsnrctl status" command. Sometimes, it's not necessary to add this entry into listener.ora. But recently, when I was trying to discover node from OEM, I could not discover the database
on that node or the discovering process generated some error. The OMS, agent, listener are all running. OHS and Listener can be discovered. I finally found that I didn't list any service in my listener.ora file. After I added that service, the discovering process is fine. I'm not sure if this is the reason or some kind of oracle bug for 9i. Worth a shot!

Note:
When the same thing happened, you may want to check out the dbsnmp.log, nmiconf.log, and Oracle%Oracle_Home%Agent.nohup file inside the directory %Oracle_Home%\network\log.
Always try restarting Agent.

Startup OracleServiceSID using spfile

Oracle 9.2.5.0, Windows Server 2000

If ORA_SID_AUTOSTART is set to TRUE in Registry, oracle instance will be started automatically when OracleServiceSID is started.
If ORA_SID_PFILE is set the full path of the initializaiton parameter file, oracle instance will be started using the specified pfile when OracleServiceSID is started. If this entry is not present, then oradim will try to start the database with an SPFILE or PFILE from %ORACLE_HOME%\database.

Could not start Oracle 9i database http service

This error looks like one that frequently appeared when starting the OHS on a DB9iR2 on Windows Platform. If you try to start the OHS by the windows services console and by the command line, a conflict with the lock file (pid file located in %Oracle_Home%\Apache\Apache\logs\) will prevent the OHS from starting, you must delete the file prior to attempt starting the OHS. You cannot start OHS with both, the console
and the command line, you should choose just one of them.

Web Based EM DB Control for Oracle 9i

There is no actually web version EM database control for oracle 9i. But DBAs can launch EM from web browser through JInitiator.
Oracle JInitiator is implemented as a plug-in (Netscape Navigator) or ActiveX Object (IE).
Oracle JInitiator allows you to specify the use of the Oracle certified JVM (Java Virtual Machine) on web clients instead of relying on the default JVM provided by the browser.
There are many docs on OTN website.

Some versions of JInitiator (ex. 1.1.8.19) must be plugged in manually to Firefox. These are the steps:
1) Install JInitiator.
2) C:\Program Files\Oracle\JInitiator 1.1.8.19\bin\NP JinitXXXX.dll XXXX = version
3) Paste it under this directory of Firefox (C:\Program Files\Mozilla Firefox\plugins)
4) Restart Firefox.