Install Oracle Enterprise Manager
Introduction:
Oracle Enterprise Manager (OEM) is the suite we use to manage the database.
This requires a repository that may be installed into an existing instance or a new one may be created for it. I will be installing this into the existing instance; whs. I'm not sure my small server could handle another instance.
Huh? On the Warehouse Database?!? Why there?
OK, this is a development and training setup, and, as I have said, 80% of the time, effort and money in Data Warehousing goes into ETL. So we will spend most of our time on the sta (Staging instance). Sure, we will be loading data into the whs target but, once it's there, not much will happen to it. Therefore, most of the load on this setup is on sta. It makes sense, then, to put all the repositories, where possible, on whs. Note: a commercial setup would never do this. It would probably have a special repository instance or lump it in on the development box.
Aim:
Get OEM installed and configured.
Requirements:
The Oracle database is installed and running.
Procedure:
- Log in as oracle.
- Open Terminal.
- Set up sta's startup parameters:
- Connect to whs as system:
- $ sqlplus system/*********@whs
- Connect to sys as sysdba:
- SQL> connect sys/*********@whs as sysdba
- Connected.
- Alter startup settings:
- SQL> alter system set session_cached_cursors=200 scope=spfile;
- SQL> alter system set aq_tm_processes=1 scope=spfile;
- SQL> alter system set sga_target=268435456 scope=spfile;
- Each of these returns with; System altered.
- Create DBMS Pool objects:
- SQL> @/u01/app/oracle/10.2.0.1/db01/rdbms/admin/dbmspool
- This returns with:
- Package created.
- Grant succeeded.
- View created.
- Package body created.
- SQL> exit
- Restart Oracle to make the startup changes take effect:
- $ su - root
- Password: *********
- # service oracle10g restart
- This comes back with a 'Processing Database instance...' message for each installed instance.
- You can leave this window open, there is some stuff to do later as root.
- Create directories required by OEM:
- Go to oracle's Terminal.
- $ cd /u01/app/oracle/10.2.0.1
- $ mkdir oms
- $ cd oms
- $ mkdir oradata
- Create a local directory to hold the download files:
- $ cd
- $ mkdir oraem
- $ cd oraem
- Go here (OTN - link through here to register) and download the following files to this directory:
- Linux_Grid_Control_full_102010_disk1.zip
- Linux_Grid_Control_full_102010_disk2.zip
- Linux_Grid_Control_full_102010_disk3.zip
- (You could burn these files on to CD now.)
- Unzip these files by running the following commands:
- $ unzip Linux_Grid_Control_full_102010_disk1.zip
- $ unzip Linux_Grid_Control_full_102010_disk2.zip
- $ unzip Linux_Grid_Control_full_102010_disk3.zip
- These throw a stack of messages as they are unzipped resulting in 8 new directories and a couple of files - most importantly; runInstaller.
- Run the installer:
- $ ./runInstaller
- Specify Installation Type:
- Enterprise Manager 10 Grid Control Using an Existing Database
- [Next]
- Specify Installation Location:
- Parent Directory: /u01/app/oracle/10.2.0.1/oms/oms10g
- [Next]
- Product - Specific Prerequisite Checks:
- This throws some warning on the 'Checking operating system package requirements...' check but these can be ignored.
- Tick this check: Status -> User Verified
- [Next]
- Specific Repository Database Configuration:
- Database Hostname: lisa.steveroach.org
- Port: 1521
- Service / SID: whs
- Sys Password: *********
- Management Tablespace Location: /u01/app/oracle/10.2.0.1/oms/oradata/mgmt.dbf
- Configuration Data Tablespace Location: /u01/app/oracle/10.2.0.1/oms/oradata/mgmt_ecm_depot1.dbf
- [Next]
- Warning:
- This has detected an existing sysman schema. Clicking [Continue] drops this and creates a new one; which is what we want...
- [Continue]
- Warning:
- Dispatchers; this seems to be an old message not relevant to this installation...
- [Continue]
- Specify Optional Configuration:
- Configure Email Notification
- E-mail Address: The recipient email.
- SMTP Server: lisa.steveroach.org (the fully qualified local host name)
- If you're lucky enough to have a Metalink accout:
- Configure Metalink
- Username: Your Metalink user.
- Password: Your Metalink password.
- [Next]
- Specify Passwords:
- Registration Password: *********
- Confirm Password: *********
- Sysman Password:
- You already set this up here. Although this installation will recreate the sysman user, you will probably use the same password as before.:
- Password: *********
- Confirm Password: *********
- [Next]
- Summary:
- [Install]
- Warning:
- This is a warning about OPMN Process Manager. Click [Continue] for now.
- Execute Configuration Scripts:
- Go to the root Terminal window.
- # cd /u01/app/oracle/10.2.0.1/oms/oms10g/oms10g
- # ./allroot.sh
- There are some interactive parts to this:
- Enter the full name of the local bin directory: [/usr/local/bin]: Hit 'Enter'.
- Next, you are asked whether you want to overwrite it. Answer n(o) to all of these.
- The above is asked twice. Use the answers given for both parts.
- Go back to the OUI window.
- [OK]
- End of Installation:
- This bit is important. A URLs is listed for Enterprise Manager Grid Control. Note this down. Mine is listed on my Server Specification.
- An Oracle Application Server instance was installed. Note the Instance Name.
- Connection details for the Enterprise Manager Repository are given. These should be the same as for the whs database. This is also worth noting.
- [Exit]
- Start the Enterprise Manager (EM) Console:
- Got to an oracle Terminal.
- Set ORACLE_SID to whs:
- $ export ORACLE_SID=whs
- $ emctl start dbconsole
- If this fails with a set of messages regarding Timezone mismatch, go here.
- This comes back with a URL and then; '...started.'. That's the DB Console URL for whs.
- Log in to the DB Console:
- Open Firefox.
- Type in your Database Control URL for whs:
- Login to Database: whs:
- User Name: sysman
- Password: *********
- Connect As: -Normal-
- [Login]
- Oracle Database 10g Licensing Information:
- Ensure that all radio-buttons under 'Grant Access' are checked.
- [I agree]
- Open a new tab in Firefox:
- -File-
- -New Tab-
- Type in your Database Control URL for sta.
- Do the same as above for sta.
- You can play around with this to your heart's content - but don't TOUCH anything unless you REALLY know what you are doing.
- Set up email notifications - do this for both databases:
- Home
- -Administration- tab
- Administration:
- Enterprise Manager Administration:
- -Administrators-
- Administrators:
- -Notification Methods-
- Notification Methods:
- Sender's E-mail Address: Make sure this is the recipient that you want.
- [Apply]
- [Test Mail Servers]
- Go to the recipient's mailbox and chech that a test email has landed - this may take a while.
- You can log out of this when you have had enough.
- Add dbconsole start and stop to the boot sequence:
- Get to a root shell prompt.
- # cd /etc/init.d
- Best, copy this file to this directory and call it 'emctl10g',
- Or, $ vi emctl10g and paste the following into it:
#!/bin/sh |
- # chmod 755 emctl10g
- # chkconfig --add emctl10g
- A couple of things to note about the way that this script runs:
- Any output from the emctl script is redirected to /dev/null. This means that any errors generated by this will not be visible.
- The 'stop' part runs in foreground. This means that the script won't finish until the DB Console for all databases have been stopped. This doesn't take long and slightly delays system shutdown.
- The 'start' part runs in background. This means that, during startup, it is started and then the boot sequence continues immediately. This is for two reasons. Firstly, the start takes quite a long time and I don't want to hang around while this does its stuff. Secondly, there are no dependent start tasks so nothing in the boot sequence needs to wait for this to complete. You can only do this in background if this is the case.
- The implications for this is that the system could have completed boot-up but the DB Console hasn't yet started. You could have a situation where, if you are quick enough, the browser returns; 'The connection was refused when attempting to contact lisa.steveroach.org:[port].'. You just need to wait until the Console is up.
- Reboot the server. You should now see this during the boot sequence:
Starting emctl10g: [ OK ] |
Testing:
- Log in as oracle.
- Open Firefox.
- Type in the URLs for both databases and check that you can get in to the DB Console.
0 Comments:
Post a Comment
<< Home