 |
|
Installing 10g
Release 2 Database Software
Oracle Database Tips by Donald Burleson |
The oracle user account will need an updated
version of its default variables. Figure 11.2 shows the variables
after being updated for Oracle 10g Release 2. The file should be
updated on each node.
The following table will walk through the steps of
installing Oracle Database Software Release 2.
1.
Insert the CD for Oracle Database Software Release 2 and launch
the installer.
2.
Select the Enterprise Edition.
3.
The oracle home for release 2 should appear as shown.
4.
Ensure oracle2 is checked and click next.
5.
On this prerequisite-check screen, you can either check the
boxes where it fails, or click ?next? and get a warning.
6.
Choose No to upgrade an existing database.
7.
Choose to install database software only. The possibility of
configuring ASM at this point is new.
8.
As in previous installs, the final step is to run the
root.shscript. Be sure to run the script in the release 2
oracle home directory. Replace previous versions of dbhome, oraenv,
and coraenv by answering ?y? to the prompts. This step must be
completed on each node.
9.
The installation should finish without any trouble
10.
Edit the /etc/oratab file to change the default oracle_home to
the release 2 oracle home as shown here. This step must be done as
root on each node.
11.
Launch the release 2 netca program and install the listeners.
12.
It is a good idea to backup the CRS and voting files right
after the install.
Moving ASM to Release 2
With release 2 completely installed, the first
step to take is to move ASM to the release 2 home directory. To start
this process, ensure ASM and any dependent databases are still shut
down.
The following table steps though moving ASM to the
release 2 oracle home:
1.
Remove the ASM service for each node from the CRS using the 10g
release 1 srvctl.
%
Note: any ASM dependent database, such as the database
?past? seen in the image, must first be removed.
2.
As root, edit the /etc/oratab to update +ASM for the new oracle
home. This step must be done on each node.
3.
Move the file that points to the spfile from the release1
oracle home to the release 2 oracle home. Recreate the link to the
password file. This step must be completed on each node using the
appropriate file names as shown.
4.
Use the release 2 srvctl to register the ASM with CRS and to
start the ASM instances.
Upgrading a 10g Release
1 Database to 10g Release 2
The steps for upgrading a database to 10g release
2 are similar to those demonstrated in the 9i to 10g upgrade in
Chapter 10. The following table will walk through the steps of the
upgrade process for a 10g release 1 database named PAST that is stored
on ASM.
You may prefer to use sqlplus to start up your
database on only one node to avoid problems that could come from
adding a database to and then removing a database from the CRS with
srvctl.
1.
With the PAST database started up, spool the upgrade diagnostic
script as shown.
Shutdown the database, and if necessary,
remove the database from CRS with srvctl.
2.
Create a backup directory $ORACLE_BASE/admin/<db_name>/backup.
Use racenv to set the environment for the
database. Launch RMAN and startup mount as shown. The backup of a
database in mount state using RMAN is equivalent to a cold backup.
When the backup is finished, issue the
shutdown immediate command and exit.
3.
From each node, move the
initpast.ora pointer files to the new oracle home. Create a new
password file using 10g release 2 version of
orapwd.
4.
Instead of using a copy of the original pfile, this time a new
pfile will be created. To do this, launch sqlplus. Login sys as sysdba
and create a pfile as shown. It is not necessary to start the database
if the path and filename of the spfile are included as shown.
5.
Using the ~/upgrade_<db_name>_diagnostic.log file that was
spooled, find the parameters that need to be changed and open the
pfile and change them as shown. If a
remote_listener is defined,
it must be commented out as shown.
As root, open the /etc/oratab file with an
editor and change the oracle home directory for the PAST database to
the release 2 home. This should be done on both nodes.
6.
Use the export command to define an environmental variable
PFILE that equals the path and filename for the parameter file created
in the previous step.
This time, use racenv to set the
environment to the PAST database located in the release 2 oracle home
($ORACLE_SID will equal ?past1?). Launch sqlplus and login sys as
sysdba. Start the database with the UPGRADE keyword pointing to the
pfile. Spool a log file of the upgrade.
Oracle 10g Release 2 has just one upgrade
script for all versions being upgraded. It does the work of selecting
the appropriate sub-scripts to run depending on the version of the
database being upgraded.
7.
When the upgrade completes, scroll up and find the results
table to ensure the upgrade was successful.
Shutdown the database. Startup the
database using the pfile=$PFILE, but without the UPGRADE keyword.
After startup, run the script @$db10g2/rdbms/admin/utlrp.sql to
compile all of the database objects.
8.
Run the update_tns.sh
script to add the current database into the tnsnames.ora file for the
current oracle home. This step must be completed on each node.
9.
Edit the file initpast.ora
to change the parameters shown.
10.
Create a new spfile using sqlplus as shown.
11.
Use srvctl to add the database and instances. This time,
because PAST relies on the ASM service, modify the instances to make
them dependent upon ASM. This will ensure each ASM instance is started
before its dependent database instance.
To ensure everything was done correctly,
startup and shutdown each instance, one at a time, using sqlplus.
Finally, startup the database with srvctl
and check its status with the
crs_statusscript.
 |
If you want to learn RAC at home, get the bestselling book "Personal
Oracle Real Application Clusters" by Edward Stoever.
You can buy it direct from the publisher for 30%-off and get
instant access to the code depot of Oracle tuning scripts. |
|