Friday, December 12, 2014

ORA-04031: unable to allocate X bytes of shared memory in ASM issue(11g Rel 2)


Recently i saw this issue in our ASM during rebalance operation. Our db size is more than 7 TB and when we add 200 GB to existing disk group with rebalance power 10. Rebalance was hung and our one of the db instance in RAC continuously throwing unable to extend shared pool error. During that time we are not able to connect to ASM instance but application working fine without any issues. 

Solution to fix this issue. 

1. Shutdown the effected database instance

it will continuously throw shared pool error. No issues just use shutdown abort command. 

2. Then i am able to connect to the ASM instance 

  sqlplus / as sysasm

3.alter system set memory_max_target=X;

(X value will be calculated based on the formula. formula will be explained in detail later)  
  
 alter system set memory_target=X 

4. Restart the CRS using below command

   $ORACLE_GRID_HOME/bin/crsctl stop has (as a root user)
   $ORACLE_GRID_HOME/bin/crsctl start has (as a root user)

5. start the database instance. 


Determining the Value X: 
-----------------------

The setting for the SHARED_POOL_SIZE parameter determines the amount of memory required to manage the instance. The setting for this parameter is also used to determine the amount of space that is allocated for extent storage. The default value for this parameter is suitable for most ASM environments.

Oracle strongly recommends AMM parameters. 
The default value used for MEMORY_TARGET (272 MB) is acceptable for most environments

If you are not using Automatic Memory Management, then the default value for this parameter is suitable for most environments.

For 32-bit environments 32 MB is the default and minimum requirement for an ASM instance, but 128 MB is recommended.

On 64-bit platforms 88 MB are required for an ASM instance, recommended values is 150 MB. 






Tuesday, March 17, 2009

how to configure omni backup for oracle databases

Hi ,

Please find the steps to configure the omni backup for oracle servers

1. Please install the omni client in database machine.

That will be done by Unix administrators.

2. Create symbolic link between omni and $ORACLE_HOME

Go to $ORACLE_HOME/lib then run the below command.

ln -s /opt/omni/lib/libob2oracle8_64bit.so libobk.so

3. Create the catalog schema in the respective catalog databases.

A. % sqlplus '/ as sysdba'
SQL> CREATE USER rman IDENTIFIED BY rman DEFAULT TABLESPACE tools TEMPORARY TABLESPACE temp QUOTA UNLIMITED ON tools;
SQL> GRANT CONNECT, RECOVERY_CATALOG_OWNER TO rman;


B. % rman catalog rman/rman @ catadb

RMAN> CREATE CATALOG;

Note: Please check the database version of catalog database and target database must be same otherwise upgrade the catalog schema.

Upgrade catalog steps:
---------------------------------------------------------------------------
% rman target / catalog rman/rman @ catdb

RMAN> UPGRADE CATALOG;RMAN-06435: recovery catalog owner is rman RMAN-06442: enter UPGRADE CATALOG command again to confirm catalog upgrade RMAN> UPGRADE CATALOG;
-------------------------------------------------------------------------------------------------

C: Registering the target database

% rman TARGET / CATALOG rman/rman @ catdb RMAN> REGISTER DATABASE;

4. Configure the backup in target machine using below command

Go to /opt/omni/lbin directory

util_oracle8.exe -CONFIG $ORACLE_SID $ORACLE_HOME backup/backup@dwhprd rman_dwhprdnew/rman@irman10

5. Then we can configure the backup in GUI mode.