Please visit www.oracle-class.com for Videos, Free posts, Books, Webinar and Free forum … ALL about Oracle!

Upgrade Oracle database from 10.2.x.0 to 10.2.x.3

Upgrade Oracle database from 10.2.x.0 to 10.2.x.3

I m using this document to both quick installation and quick patching process of an Oracle 10G database.
This quick document was reviewed and tested in my case. Please dont hesitate to advice me or to send your feedback on this document, as always, any feedback is welcome.
Operating System : Redhat Linux Server

Set the ORACLE_HOME and ORACLE_SID Environment Variables
Enter the following commands to set the ORACLE_HOME and ORACLE_SID environment variables:
Bourne, Bash, or Korn shell:
• $ ORACLE_HOME=oracle_home
• $ ORACLE_SID=sid
• $ export ORACLE_HOME ORACLE_SID
In these examples, oracle_home is the Oracle home directory where the Oracle Database 10g installation that you want to upgrade is installed, and sid is the SID of the database that you want to upgrade.
Stop All Processes
Go to the following sections based on your Oracle Database installation type:
Stopping All Processes for a Single Instance Installation
Shut down the following Oracle Database 10g processes in the order specified before installing the patch set:
1. Shut down all processes in the Oracle home that might be accessing a database, for example Oracle Enterprise Manager Database Control or iSQL*Plus:
2. $ emctl stop dbconsole
3. $ isqlplusctl stop
4. Shut down all database instances running in the Oracle home directory, where you need to install the patch set.
5. Shut down all listeners running in the Oracle home directory, where you need to install the patch set.
Enter the following command to shut down the instance:
$ sqlplus /NOLOG
SQL> CONNECT SYS/SYS_password AS SYSDBA
SQL> SHUTDOWN IMMEDIATE
Back Up the System
Oracle recommends that you create a backup of the Oracle Database 10g installation before you install the patch set.
Installation Tasks
You can install the patch set either interactively or non-interactively. See one of the following sections for information about how to complete the installation:
• To install the patch set interactively, see the “Installing the Oracle Database 10g Patch Set Interactively” section.
• To install the patch set non interactively, see the “Installing the Oracle Database 10g Patch Set Noninteractively” section.

Installing the Oracle Database 10g Patch Set Interactively
To install the Oracle Database 10g patch set interactively:

Note:
If you attempt to install this patch set in an Oracle home directory that does not contain an Oracle Database 10g release 10.2.0.1 or 10.2.0.2 installation, Oracle Universal Installer displays a warning dialog with the following error:
OUI-10091: There are no patches that need to be applied from the patch set Oracle Database 10g Release 2 Patch Set 2
10.2.0.3
The Oracle Universal Installer does not allow the installation to proceed. Click OK, then click Cancel to end the installation.

1. Log in as the oracle user. Use your Ssh Private key :
ssh -X -2 oracle@host_name -i id_rsa.ppk
2. Enter the following commands to start Oracle Universal Installer, where patchset_directory is the directory where you unpacked the patch set software:
3. cd patchset_directory/Disk1
4. ./runInstaller

Note:
You can run Oracle Universal Installer using the ignoreSysPrereqs flag, which will skip the operating system check and continue with the installation:
./runinstaller -ignoreSysPrereqs

5. On the Welcome screen, click Next.
6. In the Specify Home Details screen, select the name of the Oracle home that you want to update, or select the Path that you want to update from the list, then click Next.
7. On the Summary screen, click Install.
This screen lists all of the patches available for installation.
8. When prompted, run the $ORACLE_HOME/root.sh script as the root user.
9. On the End of Installation screen, click Exit, then click Yes to exit from Oracle Universal Installer.

Post-installation Tasks
Review the information in this section before using the upgraded software. This section lists required and optional post installation tasks, depending on the installation type and the products that you want to use.
• Upgrading Earlier Oracle Database to Oracle Database 10g Release 2 (10.2.0.3)
• Upgrading Oracle Database 10g Release 10.2.0.x to Oracle Database 10g Release 10.2.0.3
• Running changePerm.sh Script on an Oracle Database Server Home
• Updating Oracle Time Zone Definitions
Upgrading Earlier Oracle Database to Oracle Database 10g Release 2 (10.2.0.3)
Review the following sections before upgrading an earlier Database to Oracle Database 10g release 2 (10.2.0.3):
• Upgrading Earlier Oracle Database Releases to Oracle Database 10g Release 2 (10.2.0.3)
• Upgrading a Release 9.2 Database Not Using Oracle Label Security
Upgrading Oracle Database 10g Release 10.2.0.x to Oracle Database 10g Release 10.2.0.3
See one of the following sections for upgrading an Oracle Database 10g release 10.2.0.x to Oracle Database 10g release 10.2.0.3:
• Upgrading a Release 10.2 Database using Oracle Database Upgrade Assistant
• Manually Upgrading a Release 10.2 Database
Upgrading a Release 10.2 Database using Oracle Database Upgrade Assistant
After you install the patch set, you must perform the following steps on every database associated with the upgraded Oracle home:

Note:
If you do not run the Oracle Database Upgrade Assistant as described in this section, then the following errors are displayed:
ORA-01092: ORACLE instance terminated.
ORA-39700: database must be opened with UPGRADE option.

1. Log in as the Oracle software owner user.
2. Set the values for the environment variables $ORACLE_HOME, $ORACLE_SID and $PATH.
3. For Oracle single-instance installations, start the listener as follows:
4. $ lsnrctl start
5. Run Oracle Database Upgrade Assistant either in the interactive or noninteractive mode:

Interactive mode
Enter the following command from the command prompt:
$ dbua

Complete the following steps displayed in the Oracle Database Upgrade Assistant screen:
1. On the Welcome screen, click Next.
2. On the Databases screen, select the name of the Oracle Database that you want to update, then click Next.
3. On the Recompile invalid objects screen, select the Recompile the invalid objects at the end of upgrade option, then click Next.
4. If you have not taken the back up of the database earlier, on the Backup screen, select I would like to take this tool to backup the database option, mentions the Path, and then click Next.
5. On the Summary screen, check the summary, then click Finish.
6. On the End of upgradation screen, click Exit, then click Yes to exit from Oracle Database Upgrade Assistant.
Non interactive mode
Enter the following command to upgrade Oracle Database using Oracle Database Upgrade Assistant in noninteractive mode:
$ dbua -silent -dbname $ORACLE_SID -oracleHome
$ORACLE_HOME -sysDBAUserName UserName -sysDBAPassword SYS_password
-recompile_invalid_objects true

6. If you are using the Oracle Recovery Manager catalog, enter the following command:
7. $ rman catalog username/password@alias
8. RMAN> UPGRADE CATALOG;

Manually Upgrading a Release 10.2 Database
Complete the following sections to upgrade an Oracle Database 10g release 10.2.0.x to Oracle Database 10g release 10.2.0.3:
1. Required Preupgrade Checks
2. Upgrading a Release 10.2 Database
Required Pre upgrade Checks
Check the SYSTEM tablespace size and set the initialization parameters.
• Check the SYSTEM Tablespace Size
If JServer is part of the installation, ensure that there is at least 50 MB of free space allocated to the SYSTEM tablespace or autoextend space in your SYSTEM tablespace prior to upgrading.
• Set the SHARED_POOL_SIZE and JAVA_POOL_SIZE Initialization Parameters
Set the value of the SHARED_POOL_SIZE and the JAVA_POOL_SIZE initialization parameters as follows:
1. Start the listener before attempting to connect to the database:
2. $ lsnrctl start
3. Start the database with the NOMOUNT option:
4. SQL> STARTUP NOMOUNT
5. If necessary, enter the following command to determine whether the system uses an initialization parameter file (initsid.ora) or a server parameter file (spfiledbname.ora):
6. SQL> SHOW PARAMETER PFILE;

This command displays the name and location of the server parameter file or the initialization parameter file.
7. Determine the current values of these parameters:
8. SQL> SHOW PARAMETER SHARED_POOL_SIZE
9. SQL> SHOW PARAMETER JAVA_POOL_SIZE
10. If the system is using a server parameter file:
If necessary, set the value of the SHARED_POOL_SIZE initialization parameter to at least 150 MB:
SQL> ALTER SYSTEM SET SHARED_POOL_SIZE=’150M’ SCOPE=spfile;

If necessary, set the value of the JAVA_POOL_SIZE initialization parameter to at least 150 MB:
SQL> ALTER SYSTEM SET JAVA_POOL_SIZE=’150M’ SCOPE=spfile;

If the system uses an initialization parameter file, if necessary change the values of the SHARED_POOL_SIZE and the JAVA_POOL_SIZE initialization parameters to at least 150 MB in the initialization parameter file (initsid.ora).
If you use Automatic Shared Memory Management, ensure that the value of the SGA_TARGET initialization parameter size is at least 50 MB greater than the sum of the values of the SHARED_POOL_SIZE and the JAVA_POOL_SIZE initialization parameters.

Note:
The value of the SGA_TARGET parameter depends on the environment. If you receive a system error when you restart the database, increase the value of the SGA_TARGET parameter to the value specified in the error.

11. Shut down the database:
12. SQL> SHUTDOWN

Upgrading a Release 10.2 Database
After you install the patch set, you must perform the following steps on every database associated with the upgraded Oracle home:

Note:
If you do not run the catupgrd.sql script as described in this section and you start up a database for normal operation, then ORA-01092: ORACLE instance terminated. Disconnection forced errors will occur and the error ORA-39700: database must be opened with UPGRADE option will be in the alert log.

1. Log in as the Oracle software owner user.
2. For single-instance installations, start the listener as follows:
3. $ lsnrctl start
4. For single-instance installations, use SQL*Plus to log in to the database as the SYS user with SYSDBA privileges:
5. $ sqlplus /nolog
6. SQL> CONNECT SYS/SYS_password AS SYSDBA
Enter the following SQL*Plus commands:
7. SQL> STARTUP UPGRADE
8. SQL> SPOOL patch.log
9. SQL> @?/rdbms/admin/catupgrd.sql
10. SQL> SPOOL OFF
Review the patch.log file for errors and inspect the list of components that is displayed at the end of catupgrd.sql script.
This list provides the version and status of each SERVER component in the database.
11. If necessary, rerun the catupgrd.sql script after correcting any problems.
12. Restart the database:
13. SQL> SHUTDOWN
14. SQL> STARTUP
15.
16. Run the utlrp.sql script to recompile all invalid PL/SQL packages now instead of when the packages are accessed for the first time. This step is optional but recommended.
17. SQL> @?/rdbms/admin/utlrp.sql

Note:
When the 10.2.0.3 patch set is applied to an Oracle Database 10g Standard Edition database, there may be 42 invalid objects after the utlrp.sql script runs. These objects belong to the unsupported components and do not affect the database operation.
Ignore any messages indicating that the database contains invalid recycle bin objects similar to the following:
BIN$4lzljWIt9gfgMFeM2hVSoA==$0

18. If you are using the Oracle Recovery Manager catalog, enter the following command:
19. $ rman catalog username/password@alias
20. RMAN> UPGRADE CATALOG;

Running changePerm.sh Script on an Oracle Database Server Home

Important:
Oracle recommends using the most restrictive file permissions possible for your given implementation. Perform these optional steps only after considering all security ramifications and only if you need to share this installation.

During patch set installation, all new files and directories are created with restricted access, by default. Users or third party applications with a different group identifier from that of the database, which try to access client-side utilities or libraries in the database home, will see permission errors when trying to access these files or directories. Perform the following steps to change the permissions:
1. Change to the install directory by using the following command:
$ cd $ORACLE_HOME/install
2. Run changePerm.sh and specify the patched server Oracle home location, before accessing client-side utilities or libraries in the database home.

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: