The RAC database has been created manually without using dbca,
therefore emca has not been run and there is no DB Control repository
created in the RAC database.The RAC database is not the hosting database for a Grid Control repositoryThis can be checked running the following SQL statement connected as a DBA user to the database:
SQL> select username from DBA_USERS where username = 'SYSMAN';
If the SQL Statement returns 'SYSMAN', it means that there is
already a DB Control repository or a Grid Control repository present in
the database.If you want to drop existing repository please read end of this article.
Create EM repository:
Run emca in interactive mode
On Node 1(db1):
$ emca -config dbcontrol db -repos create -cluster
Enter the following information:
1)Cluster Name
Enter the following information:
1)Cluster Name
To find out the value of your CLUSTER_NAME from CRS (OCR), do the following from the CRS_HOME:
$ cd $CRS_HOME/bin
$ ./cemutlo -n
$ cd $CRS_HOME/bin
$ ./cemutlo -n
Cluster Name:db-scan
2) Database unique name:TEST
If you're not sure of the values for Database unique name and service name, execute the following statement connected as a DBA user to any instance of the RAC database:
SQL> show parameter db_unique_name
TEST
3) Listener port:1521
4) SYS password:*******
5) DBSNMP password:******
6) SYSMAN password:*****
7) ASM ORACLE_HOME:/u01/app/oracle/db-home1
8) ASM SID:+ASM1
9) ASM ROLE:sysdba
10) ASM USERNAME:sys
11) ASM PORT:1521
On Node 2:
Configure EMC on Node 2(db2):
$emca -reconfig dbcontrol -cluster -EM_NODE db2 -EM_NODE_LIST db2
$emca -reconfig dbcontrol -cluster -EM_NODE db2 -EM_NODE_LIST db2
*Here EM_NODE is hostname on which you are running emca and EM_NODE_LIST refers to list of nodes where you want to configure EM.This can be list of nodes participating in cluster.
Drop EM Repository:
In order to drop an existing EM repository , perform below steps
1. SQL> alter user SYSMAN account lock;
2. SQL> drop user SYSMAN cascade;
3. SQL> alter user MGMT_VIEW account lock;
4. SQL> drop user MGMT_VIEW cascade;
5. $ emca -deconfig dbcontrol db -repos drop -cluster
2. SQL> drop user SYSMAN cascade;
3. SQL> alter user MGMT_VIEW account lock;
4. SQL> drop user MGMT_VIEW cascade;
5. $ emca -deconfig dbcontrol db -repos drop -cluster
Hope its helpfull..:)
No comments:
Post a Comment