Pages

Wednesday, January 18, 2006

How to upgrade Oracle 9.2.0.1 to 9.2.0.5 or 9.2.0.6 (9i versions)

Applying Oracle upgrade to version 9.2.0.5 (patchset 3501955) or 9.2.0.6 (patchset 3948480)

Applying Oracle 9i Patch (This can be used for the Oracle client and server both)

1. Log in to the database server machine as the oracle user (administrator role in case of windows) on Unix.
2. Make sure that your environment contains the correct values for the ORACLE_HOME and ORACLE_SID variables.
3. Stop the listener process (in case of Oracle server upgrade). As the oracle user:

lsnrctl stop

4. Download the patchset Extract the 9.2.0.5 patchset (3501955) or 9.2.0.6 patch set (3948480) archive into a temporary directory.
5. Change to the directory that contains the 9.2.0.5 or 9.2.0.6 patch archive and execute the following:

Unzip the patch archive, viz. p3948480_9206_***.zip (this example is for Linux. Windows & other Unix patch names would be different.)


6. Install the Oracle Universal Installer (setup.exe in case of Windows patch) :

cd /usr/local/tmp/oracle/patches/3948480
Disk1/runInstaller &

Welcome
Next ->
Specify File Locations
Source Path: choose default
Destination Name: ORACLE_HOME
Destination Path: /usr/local/oracle/products/9.2
Next ->
Select a Product to Install
Select: Oracle Universal Installer 10.1.0.3.0
Next ->
Summary
Install ->
End of Installation
Exit


7. Install the Oracle 9.2.0.6 patch set:

Disk1/runInstaller &

Welcome
Next ->
Specify File Locations
Source Path: choose default
Destination Name: ORACLE_HOME
Destination Path:
Next ->
Select a Product to Install
Select: Oracle 9iR2 Patch Set 9.2.0.6.0
Next ->
Summary
Install ->

A window will open and you will be prompted to execute (This will not happen in Windows)
root.sh. Open a console window and run $ORACLE_HOME/root.sh as
"root" user of Unix.
OK ->
End of Installation
Exit


Database Upgrade Presteps

Before upgrading the database, do the following:

*

If JServer is part of the installation, ensure that there is at least 10 MB of free space allocated to the SYSTEM tablespace.
*

For RAC installations, ensure that there is at least 50 MB of free space allocated to the XDB tablespace.
*

Set the value of the SHARED_POOL_SIZE and the JAVA_POOL_SIZE initialization parameters as follows:
1. Start the database:

SQL> startup


2. Enter the following command to determine whether the system uses an initialization parameter file (initsid.ora) or a server parameter file (spfiledbname.ora):

SQL> show parameter pfile;


This displays the name and location of the server parameter file or the initialization parameter file.

If the system is using a server parameter file, do the following:
1. Execute the following command to display the current value of the SHARED_POOL_SIZE initialization parameter:

SQL> show parameter shared_pool_size;


2. If SHARED_POOL_SIZE initialization parameter is less than 150 MB, execute the following command:

SQL> alter system set shared_pool_size='150M' scope=spfile;


3. Execute the following command to display the current value of the JAVA_POOL_SIZE initialization parameter:

SQL> show parameter java_pool_size;


4. If the JAVA_POOL_SIZE initialization parameter is less than 150 MB, execute the following command:


SQL> alter system set java_pool_size='150M' scope=spfile;


3. Shut down the database:

SQL> shutdown immediate;


[Note] Note

The UF installation uses an spfile (Oracle9i Database will automatically use the $ORACLE_HOME/dbs/spfilewebct.ora file if it exists), but we want to make sure that the pfile and the spfile match up to reduce confusion.

If you adjust the above parameters, run the following:

SQL> create pfile from spfile;


Upgrading the Database

Perform the following steps on every database associated with the upgraded Oracle home:

1. Log in as the oracle user:

sqlplus /nolog
SQL> connect / as sysdba


2. Enter the following SQL*Plus commands:

SQL> startup migrate
SQL> spool patch.log
SQL> @?/rdbms/admin/catpatch.sql
SQL> spool off


3. Review the patch.log file for errors and inspect the list of components that is displayed at the end of catpatch.sql script. This list provides the version and status of each SERVER component in the database. If necessary, rerun the catpatch.sql script after correcting any problems.
4. Restart the database:

SQL> shutdown immediate
SQL> startup


5. Execute the following script to recompile all invalid PL/SQL packages now. (This step is optional but recommended.)

SQL> @?/rdbms/admin/utlrp.sql


6. Restart the listener process (in case of Oracle server). As the oracle user:

lsnrctl start

Sunday, January 01, 2006

The art & science of working with Oracle databases & applications

I'm an Oracle database & applications specialist - that's what I call myself, for my experience, certifications & interest in the subject & the technology. Oracle database administration (DBA) & Apps (also called as Oracle Applications) are my passion, as well as my job, my food & water :-) . I'm a certified OCP (Oracle Certified professional) for Oracle 9i and 8i both. I'm planning further certifications soon - 10g and Apps DBA.

I was recently looking for some information on Oracle Apps, when I landed upon a very useful discussion on Asktom website . I immediately thought, that I must save this piece of research somewhere, or it would be lost soon. After spending so much of resources research, I figure out that Asktom is a really wonderful resource of truthful & to the point information on the subject. Tom Kyte works in Oracle Corp. & knows things in and out. A good source of Oracle Demos, news & developments is PSOUG.org .

Another rather small and useful piece of information was found in Sridhar's posts, who seems to have researched the subject well. I appreciate his focussed information, organized into numbered statements. Two alltime good resources of Apps related information are Oracle Applications Community and included here, is Apps documentation . I've found a really useful Oracle Apps blog (my wife searched for me :-) ) -- Oracleappsblog . If you want to search for some more resources, try the Google search box below (there are few good ones on the left sidebar). You'll find Database industry news at the bottom.

I myself plan to contribute some interesting pieces of knowledge which are not available in books & could be gained only through experience & research. This would be my target in later posts on this page. So, here goes my first Oracle technology post ! I better keep it small & simple :-)

--Anshu