19 December 2010

Install OEM on RAC database

1. Start the Runinstaller and choose : Install OEM using existing database
2. Enter node name, database name, port, sys password
3. On the same screen, choose prefill tablespace button—This will prompt you that the current database is RAC and it uses ASM as the storage, click OK and then give the datafile location by running this query:

SQL> select file_name, tablespace_name from dba_data_files;

FILE_NAME
--------------------------------------------------------------------------------TABLESPACE_NAME
------------------------------
+DATA/rac/datafile/users.259.708187607
USERS

+DATA/rac/datafile/sysaux.257.708187605
SYSAUX

+DATA/rac/datafile/undotbs1.258.708187607
UNDOTBS1


FILE_NAME
--------------------------------------------------------------------------------TABLESPACE_NAME
------------------------------
+DATA/rac/datafile/system.256.708187601
SYSTEM

+DATA/rac/datafile/example.264.708187819
EXAMPLE

+DATA/rac/datafile/undotbs2.265.708188081
UNDOTBS2


Choose this:

+DATA/rac/datafile/mgmt.dbf

+DATA/rac/datafile/mgmt_ecm_depot1.dbf

4. Click next button, you will get another warning stating that the EMCA was setup using DBCA and you need to deconfigure it from this location $ORACLE_HOME/bin/

Run the command below to deconfigure on all the nodes.

[oracle@node1 bin]$ ./emca -deconfig dbcontrol db -repos drop -cluster

STARTED EMCA at Jan 29, 2010 7:39:38 PM
EM Configuration Assistant, Version 10.2.0.1.0 Production
Copyright (c) 2003, 2005, Oracle. All rights reserved.

Enter the following information:
Database unique name: rac
Listener port number: 1521
Password for SYS user:
Password for SYSMAN user:
Password for SYSMAN user:
Do you wish to continue? [yes(Y)/no(N)]: y
Jan 29, 2010 7:40:11 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/emca/rac/emca_2010-01-29_07-39-38-PM.log.
Jan 29, 2010 7:40:20 PM oracle.sysman.emcp.util.DBControlUtil stopOMS
INFO: Stopping Database Control (this may take a while) ...
Jan 29, 2010 7:41:17 PM oracle.sysman.emcp.EMReposConfig dropRepository
INFO: Dropping the EM repository (this may take a while) ...
Jan 29, 2010 7:52:21 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully dropped
Enterprise Manager configuration completed successfully
FINISHED EMCA at Jan 29, 2010 7:52:31 PM
[oracle@node1 bin]$




LOG FILE looks like this:

[oracle@node1 ~]$ tail -f /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/emca/rac/emca_2010-01-29_07-39-38-PM.log
Jan 29, 2010 7:40:20 PM oracle.sysman.emcp.util.ClusterUtil getHostName
CONFIG: Specified node: node3
Jan 29, 2010 7:40:20 PM oracle.sysman.emcp.util.DBControlUtil isDBConsoleConfigured
CONFIG: Sid: rac3 Host: node3 Node: node3 OH: /u01/app/oracle/product/10.2.0/db_1 isDBC: true
Jan 29, 2010 7:40:20 PM oracle.sysman.emcp.util.DBControlUtil stopOMS
INFO: Stopping Database Control (this may take a while) ...
Jan 29, 2010 7:40:20 PM oracle.sysman.emcp.util.PlatformInterface executeEMCTL
CONFIG: Executing 'emctl stop dbconsole ' on node node1 with sid rac1
Jan 29, 2010 7:40:34 PM oracle.sysman.emcp.util.PlatformInterface executeEMCTL
CONFIG: Executing 'emctl stop dbconsole ' on node node2 with sid rac2
Jan 29, 2010 7:40:54 PM oracle.sysman.emcp.util.PlatformInterface executeEMCTL
CONFIG: Executing 'emctl stop dbconsole ' on node node3 with sid rac3
Jan 29, 2010 7:41:03 PM oracle.sysman.emcp.util.ClusterUtil getHostName
CONFIG: Specified node: node1
Jan 29, 2010 7:41:05 PM oracle.sysman.emcp.util.ClusterUtil getHostName
CONFIG: Specified node: node2
Jan 29, 2010 7:41:06 PM oracle.sysman.emcp.util.ClusterUtil isShared
CONFIG: Path: /u01/app/oracle/product/10.2.0/db_1/node2_rac2/sysman/emd/targets.xml found in oracleHomeCache. Shared: false
Jan 29, 2010 7:41:06 PM oracle.sysman.emcp.util.ClusterUtil copyFileFromNode
CONFIG: Copying file from /u01/app/oracle/product/10.2.0/db_1/node2_rac2/sysman/emd/targets.xml on node node2 to /u01/app/oracle/product/10.2.0/db_1/node2_rac2/sysman/emd/targets.xml on localnode
Jan 29, 2010 7:41:07 PM oracle.sysman.emcp.util.ClusterUtil getHostName
CONFIG: Specified node: node3
Jan 29, 2010 7:41:09 PM oracle.sysman.emcp.util.ClusterUtil isShared
CONFIG: Path: /u01/app/oracle/product/10.2.0/db_1/node3_rac3/sysman/emd/targets.xml found in oracleHomeCache. Shared: false
Jan 29, 2010 7:41:09 PM oracle.sysman.emcp.util.ClusterUtil copyFileFromNode
CONFIG: Copying file from /u01/app/oracle/product/10.2.0/db_1/node3_rac3/sysman/emd/targets.xml on node node3 to /u01/app/oracle/product/10.2.0/db_1/node3_rac3/sysman/emd/targets.xml on localnode
Jan 29, 2010 7:41:09 PM oracle.sysman.emcp.util.DBControlUtil stopNmccollector
CONFIG: New nodeList: [node1, node2, node3] sidList: [rac1, rac2, rac3]
Jan 29, 2010 7:41:09 PM oracle.sysman.emcp.util.PlatformInterface isInView
CONFIG: IN_VIEW marker not instantiated in /u01/app/oracle/product/10.2.0/db_1/sysman/config/emca.properties
Jan 29, 2010 7:41:09 PM oracle.sysman.emcp.util.PlatformInterface getSortedEnvArray
CONFIG: New Env List: [EMDROOT=/u01/app/oracle/product/10.2.0/db_1, LD_LIBRARY_PATH=/u01/app/oracle/product/10.2.0/db_1/lib32:/u01/app/oracle/product/10.2.0/db_1/lib:/u01/app/oracle/product/10.2.0/db_1/perl/lib:null, PATH=/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/oracle/bin:/u01/app/oracle/product/10.2.0/db_1/bin, PERL5LIB=/u01/app/oracle/product/10.2.0/db_1/perl/lib:/u01/app/oracle/product/10.2.0/db_1/perl/lib/site_perl:/u01/app/oracle/product/10.2.0/db_1/sysman/admin/scripts:/u01/app/oracle/product/10.2.0/db_1/bin:]
Jan 29, 2010 7:41:09 PM oracle.sysman.emcp.util.ClusterUtil getHostName
CONFIG: Specified node: node1
Jan 29, 2010 7:41:10 PM oracle.sysman.emcp.util.PlatformInterface executeSgastopCONFIG: Executing: /u01/app/oracle/product/10.2.0/db_1/perl/bin/perl args: [/u01/app/oracle/product/10.2.0/db_1/sysman/admin/scripts/db/sgastop.pl, stop, rac1, node1-vip, 1521, /u01/app/oracle/product/10.2.0/db_1]
Jan 29, 2010 7:41:11 PM oracle.sysman.emcp.util.PlatformInterface executeSgastopCONFIG: Command executed successfully
Jan 29, 2010 7:41:11 PM oracle.sysman.emcp.util.ClusterUtil getHostName
CONFIG: Specified node: node2
Jan 29, 2010 7:41:12 PM oracle.sysman.emcp.util.PlatformInterface executeSgastopCONFIG: Executing: /u01/app/oracle/product/10.2.0/db_1/perl/bin/perl args: [/u01/app/oracle/product/10.2.0/db_1/sysman/admin/scripts/db/sgastop.pl, stop, rac2, node2-vip, 1521, /u01/app/oracle/product/10.2.0/db_1]
Jan 29, 2010 7:41:13 PM oracle.sysman.emcp.util.PlatformInterface executeSgastopCONFIG: Command executed successfully
Jan 29, 2010 7:41:13 PM oracle.sysman.emcp.util.ClusterUtil getHostName
CONFIG: Specified node: node3

5. After you retry you will get this issue:



Soln:


You cannot change this parameter whilst system online, hence create pfile from spfile, change parameter and then restart with pfile and re-create spfile and then restart


Make sure you choose session_cached_cursors more than 200:






SQL> alter SYSTEM set_cached_cursors=210;

Session altered.

Cannot be done at SYS level

session_cached_cursors: Specifies no of session cursors to be cached Repeated parse calls of the same SQL statement cause the session cursor for that statement to be moved into the session cursor cache. Subsequent parse calls will find the cursor in the cache and do not need to reopen the cursor. Oracle uses a least recently used algorithm to remove entries in the session cursor cache to make room for new entries when needed.

5. Issue: DBMS_SHARED_POOL package not executed:

DBMS_SHARED_POOL enables you to display the sizes of objects in the shared pool, and mark them for keeping or unkeeping in order to reduce memory fragmentation.

DO this on all Nodes:


[oracle@node1 ~]$ cd /u01/app/oracle/product/10.2.0/db_1/rdbms/admin/
[oracle@node1 admin]$ sqlplus '/ as sysdba'

SQL*Plus: Release 10.2.0.1.0 - Production on Fri Jan 29 21:24:19 2010

Copyright (c) 1982, 2005, Oracle. All rights reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options

SQL> @dbmspool.sql

Package created.


Grant succeeded.


View created.


Package body created.

SQL>



6. Specify notification if needed

7. give em passwd and sysman passwd: radar and radar1

8. [root@node1 oms10g]# ./allroot.sh

run ./allroot.sh

Starting to execute allroot.sh .........

Starting to execute /u01/app/oracle/product/10.2.0/oem/oms10g/root.sh ......
Running Oracle10 root.sh script...
\nThe following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/10.2.0/oem/oms10g

Enter the full pathname of the local bin directory: [/usr/local/bin]:
The file "dbhome" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]: y
Copying dbhome to /usr/local/bin ...
The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]: y
Copying oraenv to /usr/local/bin ...
The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]: y
Copying coraenv to /usr/local/bin ...

Adding entry to /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created


Starting to execute /u01/app/oracle/product/10.2.0/oem/agent10g/root.sh ......
Running Oracle10 root.sh script...

The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/10.2.0/oem/agent10g


Enter the full pathname of the local bin directory: [/usr/local/bin]:
The file "dbhome" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]: y
Copying dbhome to /usr/local/bin ...
The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]: y
Copying oraenv to /usr/local/bin ...
The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]: y
Copying coraenv to /usr/local/bin ...

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
Finished product-specific root actions.
Finished execution of /u01/app/oracle/product/10.2.0/oem/agent10g/root.sh ......
[root@node1 oms10g]#

No comments:

Post a Comment