2009/09/23

Warning: no filemap entries available

The following warning occurs while doing opatch lsinventory:
"Warning: no filemap entries available"

Cause:
$ORACLE_HOME/inventory/oneoffs//etc/config/actios or $ORACLE_HOME/inventory/oneoffs//etc/config/inventory does not exist.

Solution:
1. Download the failed patch.
2. Unzip the downloaded patch.
3. cd /etc/config
4. cp inventory $ORACLE_HOME/inventory/oneoffs/<patch number>/etc/config
5. cp actions $ORACLE_HOME/inventory/oneoffs/<patch number>/etc/config
6. Run 'opatch lsinventory' again to verify the result.

Please note this is to fix an issue where "opatch lsinventory" lists an already installed patch this way

2009/09/16

Loader Throughput Too High for Grid Control

Grid Control 10.2.0.4

Metric 'Loader Throughput(rows per second)' is alerted to exceed the critical threshold (3000) on Grid Control homepage. To solve this problem, shutdown grid control and set em.loader.threadPoolSize parameter in file 'emoms.properties' to a higher value (1 to 10). The file is located in $OMS_HOME/sysman/config/ directory. Then, restart Grid Control.

2009/09/11

Recycle the listener.log File

The parameter 'LOGGING_LISTENER' in listener.ora file controls whether listener will be logged, and it defaults to LOGGING_LISTENER=ON. To turn off the log, you have to add LOGGING_LISTENER=OFF into listener.ora file.

If you try to rename or remove the listener.log file without shutting down listener on Windows platform, you will notice that Windows holds a lock on this file and returns an error. Even under Unix, the Oracle listener process holds an open handle to the file. You can remove the file, but Oracle will not re-create the file when it attempts to write it again.

Here is a solution for renaming or removing the listener.log file without having to stop and restart the listener:

lsnrctl set log_status off
mv listener.log listener.log.old
touch listener.log
lsnrctl set log_status on

2009/08/19

Estimate size for undo tablespace

Sizing an UNDO tablespace requires three pieces of information:

UR: UNDO_RETENTION in seconds
UPS: Number of undo data blocks generated per second
DBS: Overhead varies based on extent and file size (db_block_size)

UndoSpace = (UR * (UPS * DBS) + DBS)
or, when the guesstime equates to zero, then add a multiplier (24) to the overhead (DBS) to derive more appropriate results:
UndoSpace = (UR * (UPS * DBS)) + (DBS * 24)

UNDO_RETENTION and DB_BLOCK_SIZE can be obtained from the initialization file. UPS can be acquired from the following query:

SELECT (sum(undoblks))/sum((end_time-begin_time)*86400)
FROM v$undostat;

2009/08/17

How to Shutdown and Start Grid Control and All Its Components

Grid Control: 10.2.0.4

Shutdown Grid Control

1. $OMS_HOME/bin/emctl stop oms
2. $OMS_HOME/bin/emctl stop iasconsole
3. $OMS_HOME/opmn/bin/opmnctl stopall
4. $AGENT_HOME/bin/emctl stop agent
5. shutdown repository database
6. shutdown listener

Start Grid Control

1. start listener
2. start repository database
3. $OMS_HOME/bin/emctl start oms
4. $OMS_HOME/opmn/bin/opmnctl startproc ias-component=WebCache
5. $AGENT_HOME/bin/emctl start agent
6. $OMS_HOME/bin/emctl start iasconsole

2009/08/11

Oracle Components Enabled

Oracle 10.2.0.2

You can check what components, like JVM or XML DB, are loaded into your Oracle Server by query view DBA_REGISTRY:

SQL> SELECT comp_name, status FROM dba_registry;

2009/08/04

Enable archivelog mode in RAC

In 10g Release 1, the database must be mounted (not open) by an exclusive instance. In other words, set the CLUSTER_DATABASE parameter to FALSE. After executing the ALTER DATABASE SQL statement to change the archive log mode, shutdown the instance and restart it with the CLUSTER_DATABASE parameter set to TRUE before you restart the other instances.

1. Login to one of the nodes, disable the cluster instance parameter and set log archive destination:

$ sqlplus / as sysdba
SQL> alter system set cluster_database=false scope=spfile sid='';
SQL> alter system set log_archive_dest_1='' scope=spfile sid='*';
2. Shutdown all instances:

$ srvctl stop database -d 
3. Using the local instance, mount the database:

$ sqlplus / as sysdba
SQL> startup mount;
4. Enable archivelog mode

SQL> alter database archivelog;
5. Re-enable support for clustering from the current instance:

SQL> alter system set cluster_database=true scope=spfile sid='';
6. Shutdown the local instance:

SQL> shutdown immediate;
7. Bring all instances back up:

$ srvctl start database -d 
From 10g Release 2, you don't need to modify CLUSTER_DATABASE parameter to enable archivelog mode.

1. Login to one of the nodes, set log archive destination:

$ sqlplus / as sysdba
SQL> alter system set log_archive_dest_1='' scope=spfile sid='*';
2. Shutdown all instances:

$ srvctl stop database -d 
3. Using the local instance, mount the database:

$ sqlplus / as sysdba
SQL> startup mount;
4. Enable archivelog mode

SQL> alter database archivelog;
5. Shutdown the local instance:

SQL> shutdown immediate;
6. Bring all instances back up:

$ srvctl start database -d