10g OCP Installation

The Oracle 10g installation is much quicker than previous installations and much smaller too! With 9i, you needed to use 3 disks to do an install, with 10g, you only need one. What Oracle has done is separated the installs. To install the client, it has it’s own CD and to install the database, it has it’s own CD.

To install on Windows, it is pretty straight forward. You pop in the disk and go. With unix / linux / solaris you have to use XWindows. At home, many people just run the GUI that is installed with the Linux installation, but in most production environments the GUI and XWindows are not run on the server as to not impact performance. What you have to do is run an XWindows server such as exceed or cygwin on your machine if it is Linux, you can just use that.

At work I have a Windows XP laptop with Cygwin (free GUI), and I have a Linux laptop running Ubuntu. I have the Oracle Client installed on both (10.2.0.3) and SQL Developer (free IDE). Both work great. I’m not going to get into the actual XWindows and how to use it, but you can find it in Oracle’s installation documentation quite easily.

So what has changed with the 10g installation?

The good news about the Oracle installation is that is does a precheck to ensure that that your system meets all the system requirements. If you are installing on an “unsupported” Linux such as Ubuntu, you will need to run the installer with the -ignoresysprereqs flag. For example, ./runInstaller -ignoresysprereqs which will skip the check. With Ubuntu, you will have to do a few things to make DB or client installations work but it is not something you need to know for the exam, so it will be in another post. The main benefit of the pre-installation check is that it verifies the operationg system, version, OS patches and packages, kernel or OS parameters, if the Oracle Home is empty, and that you have sufficient memory and file system space to do the install.

Well for starters, you have 2 different options for your management choices. You can use the default OEM Database Control (local management) or you can choose the OEM Grid Control which is a separate install. If you don’t choose the default local Database Control option then you will need to install OEM Grid Control on a separate set of servers. On top of that, you will then need to install an Agent on every host you want to monitor regardless of the number of databases or homes on that machine. The Agent then feeds monitoring information back to the Grid Control servers. Both the OEM Grid Control and local OEM Database Control are html based. That means, you can access either from a Web Browser. On some further posts later, I will get into OEM Grid Control installation, troubleshooting, and use. I will even show some screen shots but for the 10g OCP, the local Database Control that comes with the standard default installation will suffice. To find which port your local OEM database control runs on, type emctl status dbconsole from the command line. It will give you a port number. Then to access, just enter http://hostname:<port#>/em to access it. You can use your database id, you can use sys or system, and you can even use sysman once you unlock that user acccount. If you did not select the local OEM Database Control and want to install it after the fact for your database, you need to use the emca or emca.bat script to install it. If it is installed and not running, you can enter emctl start dbconsole (emctl stop dbconsole to stop it). Make sure you ORACLE_HOME is set before you do this and that the ORACLE_HOME/bin is in your path.

You are also prompted for your backup options. It will only let you use this if you have chosen the default local OEM Database Control.

File storage options gives you the choice of ASM (Automated Storage Management), Raw Devices, and File Systems. I would recommend either ASM (for it’s dynamic, pooling, load balancing capabilities) or File System, for the flexibility that it gives you. I would be willing to be that 95% of installations out there right now use filesystem but there is a huge push for us internally to go to ASM because of the performance gains we have seen.

With Oracle Cluster Ready Services you can start the install from one node in the cluster and have it install on all nodes in the cluster. How does it do this? Before you setup CRS, you have to do a bunch of things but basically something called user equivalence is enabled which allows the oracle user to ssh across the interconnect to any machine in the node. You then have the /etc/hosts file setup where it knows where the other nodes are. It is then able to copy the install files to the other servers and do the install behind the scenes. I plan on doing some interesting posts on doing a RAC install on a machine that has 2GB of memory with VMWare and shared VMWare disks. It will be something you all can build at home and play with, however, it is not a requirement for the OGP upgrade exam. Just know it is an option. You install CRS before you install RAC.

Oracle has also given you the option of giving it your metalink credentials and then being able to check for any patches or updates and notify you about them. You have to have either Grid Control or Database Control to use this feature. I’ve played with it and will blog about it. I still have a knack for doing this the manual way of downloading the file and applying the patch/update.

The requirements are 256MB for the DB and 512 if you want the DB Control. You would only install on this kind of memory if playing at home and learning. If you are using this for production, you will obviously want a bigger box : ) The space requirements are 2.5GB for the installation, 1GB of swap space, and 400MB in /tmp.

The deinstallation is also much cleaner. Before you had to clean things out, but now it does a much better job of removing everything. Before doing an uninstall, make sure you shutdown all databases, your database control, and your listeners.

The response file is another option. It allows you to perform installation silently and you do not need an xserver…. really : )

DBCA also has some enhancements. What you will notice is one of the options is to create an ASM instance. This is where you use either raw disks / devices or disks controlled by ASMLIB if on Linux. It will enable you to create tablespaces and have your new databases use ASM for the file options. The SYSAUX tablespace is now a new requirement in 10g. The SYSAUX tablespace is where Oracle stores most of it’s tools. By default, DB Control, AWR, ADDM, RMAN etc gets consolidated in this tablespace now instead of the SYSTEM tablespace. This makes it much easier to manage.

Another option is the FLASH RECOVERY AREA. How are we using it? Well if you don’t specify backup locations or places to put your archive logs, they will go here. We are sizing our Flash Recovery Area at 125% of the size for our database. We then have all archive logs go here as well as our backups. It can be file system or another ASM diskgroup (could be the same but not recommended). We are actually putting 1 uncompressed level 0 and then putting uncompressed level 1′s each night using a blok changing file. We then merge the level 1 with the level 0 to create a new level 0 and then ship that off to tape.  We then run backup validate database to check for corruption. Not needed for OCP but is something I will write about when I finish the OCP and get into many of the things I am doing at work. To query information about the flash recovery area, you can do a describe on the V$FLASH_RECOVERY_FILE_DEST view.

In older versions you could set the compatibility setting to a higher version and then go back by using alter database reset compatibility. This is now deprecated and you are unable to do this in 10g. You cannot go back once going forward.

In 10g you can also track database usage statistics. The view is DBA_FEATURE_USAGE_STATISTICS. It will tell you how you are using a feature, if it is currently being used, as well as the first and last time it was used. You can also view the HWM of the feature. The features you can track are Advanced Replication, Oracle Streams, Virtual Private Database etc… You can also track the HWM for things like tables, datafiles, session, and segments.

So what collects all these statisics?

You guessed it! (maybe you didn’t) Oracle has a new process called MMON. So what does that mean? It’s called the Manageability Monitor Process. If you do a ps -ef in Unix, Linux, or Solaris, you will see it. With Windows you won’t, because Windows uses threads and you would need something to peak inside the process to see the MMON thread. You can also use the Register_DB_Feature and Register_High_Water_Mark procedures in the new DBMS_FEATURE_USAGE package to track usage. You can also see these inside of OEM (Grid Control or DB Control).

So what are the supported upgrade paths?

Anything under 8.1.6 must be upgraded to at least 8.1.7 with the exception of 8.0.6 before upgrading to 10g. All of 9i can go straight to 10g as well.

Upgrading?

It used to be that the DBA had to run a bunch of scripts and follow a bunch of manual steps in order to upgrade the database. Oracle also has the DBUA – Database Upgrade Assistant. This enables you to startup a GUI and it will connect to the database and run the scripts in the proper order and issue the proper commands to upgrade your database. I have used this a few times and it worked really well.

Oracle also includes an Upgrade Information Tool to help the DBA collect information before upgrading. It does a few things. It makes sure you have a SYSAUX tablespace. The redo logs must be at leats 4MB in size. Tablespace sizes are checked. Init parameters are checks. Versions and compatibilities are checked. It will also tell you how long it things the upgrade will take. To invoke it, access utlu101i.sql.

There is also a new post ugprade tool which is script utlu101s.sql. You can also query the DBA_SERVER_REGISTRY view to see if the proper components were upgraded and if the status is VALID or INVALID.

This was chapter 1 in Sam Alapti’s book. It was actually 49 pages but these are my notes. I would highly recommend you go and buy his book online or from your local bookstore :)

Leave a Comment