Search This Blog

Friday, March 16, 2012

Install Oracle Grid Control 11g

To install Oracle Grid Control, you need to have a few components installed beforehand.
* Oracle database 11g
* Oracle Weblogic server

Once this is done, you can install it. The steps bellow will guide you from the beginning.


Step 1 : Install the DB
It will be detailed in another post. Link to come soon.

Step 2 : Install the weblogic server
Be sure you have the java 1.6 SDK installed:
[oracle@ora-gridr1 oracle]$ java -version

java version "1.6.0_21"
Java(TM) SE Runtime Environment (build 1.6.0_21-b06)
Java HotSpot(TM) 64-Bit Server VM (build 17.0-b16, mixed mode)

Then, download the version of the installer you need, then run it:
java -jar wls1032_generic.jar

When it is asked, choose the typical install

After that, next, next, next and finish.

Step 3 : Install Enterprise manager
Official installation doc: http://docs.oracle.com/cd/E11857_01/install.111/e15838/toc.htm

* stop the dbconsole created via dbca
SQL> drop user sysman cascade;
SQL> drop role MGMT_USER;
SQL> drop user MGMT_VIEW cascade;
SQL> drop public synonym MGMT_TARGET_BLACKOUTS;
SQL> drop public synonym SETEMVIEWUSERCONTEXT;
* Manually remove the following folders:
ORACLE_HOME/host_sid/ ORACLE_HOME/oc4j/j2ee/OC4J_DBConsole_host_sid

For example if ORACLE_HOME is /u01/app/oracle and hostname is test.oracle.com and sid is db1, then the above mentioned folders would be:
/u01/app/oracle/oracle/test.oracle.com_db1 /u01/app/oracle/oc4j/j2ee/OC4J_DBConsole_test.oracle.com_db1


* set some Oracle parameters:
SQL> alter system set processes = 500 scope = spfile;

System altered.

SQL>  alter system set  session_cached_cursors = 200 scope = spfile;

System altered.

SQL> create pfile from spfile;

File created.

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area 3423965184 bytes
Fixed Size      2218152 bytes
Variable Size   1879050072 bytes
Database Buffers  1526726656 bytes
Redo Buffers     15970304 bytes
Database mounted.
Database opened.


* add a datafile for the undo tablespace to be more than 200m:
alter tablespace UNDOTBS1 add datafile '/u01/app/oracle/oradata/GRID/undotbs02.dbf' size 200m autoextend on next 1m maxsize 500m;

* the install will fail trying to configure the repository. You still need to do it.
After that, you will have to clean the mess and start again, then it will work.

*Drop AQ related objects in the SYSMAN schema
SQL> exec DBMS_AQADM.DROP_QUEUE_TABLE(queue_table=>'SYSMAN.MGMT_NOTIFY_QTABLE',force =>TRUE);

* Drop the DB Control Repository Objects
Logon SQLPLUS as user SYS or SYSTEM, and drop the sysman account and management objects:
SQL> SHUTDOWN IMMEDIATE;
SQL> STARTUP RESTRICT;
SQL> EXEC sysman.emd_maintenance.remove_em_dbms_jobs;
SQL> EXEC sysman.setEMUserContext('',5);
SQL> REVOKE dba FROM sysman;
SQL> DECLARE
CURSOR c1 IS
SELECT owner, synonym_name name
FROM dba_synonyms
WHERE table_owner = 'SYSMAN';
BEGIN
FOR r1 IN c1 LOOP
IF r1.owner = 'PUBLIC' THEN
EXECUTE IMMEDIATE 'DROP PUBLIC SYNONYM '||r1.name;
ELSE
EXECUTE IMMEDIATE 'DROP SYNONYM '||r1.owner||'.'||r1.name;
END IF;
END LOOP;
END;
/
SQL> DROP USER mgmt_view CASCADE;
SQL> DROP ROLE mgmt_user;
SQL> DROP USER sysman CASCADE;
SQL> ALTER SYSTEM DISABLE RESTRICTED SESSION;

Now, click on retry.
The install and configuration process will keep going, you can go for a coffee.

Your grid control is now operational, have fun

No comments:

Post a Comment