Anda di halaman 1dari 12

1.

ANALYSIS
Here the procedure for Upgrading the database release of Oracle 10.2.0.1 to 10.2.0.4 on Linux for single instance (Non RAC System) applying patch number 6810189. This patch can be used to upgrade database release 10.2.0.x to 10.2.0.4 (where x can be 1, 2 or 3). This document describes the details of platforms on which the patch set can be applied and about patch installation process. During the upgradation process, Oracle home gets upgraded, changes to certain base tables and views happen. To know the details of invalid objects before upgradation, query the dba_objects table, as explained in the procedure below: 1) From the backend (for example Linux) Log in as an Oracle user. 2) Use SQL*Plus to log in to the database as the sys user with SYSDBA to check for invalid objects. $ sqlplus <connect as SYSDBA> Sql > select object_name, status from dba_objects where status <> VALID; 3) Query dba_registry table to know the component versions. Sql> select comp_name, version, status from dba_registry;

2.PREREQUISITES
Here are the prerequisites to apply this patch 5.1) ORACLE UNIVERSAL INSTALLER VERSION REQUIREMENTS Patch set 6810189 includes Oracle Universal Installer release 10.2.0.4, which was installed when we installed this patch set. We should not use Oracle universal installer from the earlier maintenance release or Oracle home. 5.2) SERVER DETAILS Upgrade performed on the following platforms: Operating System Red Hat Enterprise Linux 4.0 Oracle Database Oracle10g release 2 (10.2.0.1)

3.PRE-INSTALLATION TASKS
Before installing the patch set, the following steps were followed. 6.1) DOWNLOAD AND EXTRACT THE INSTALLATION SOFTWARE 1) Download p6810189_10204_Linux_x86.zip patch, on to /home/oracle directory. 2) Execute the following command to extract the installation files. $ unzip p6810189_10204_Linux-x86.zip 6.2) STOP ALL PROCESSES 1) The processes that are running now can be checked by using following command.. $ ps ef | grep <instance name> 2) Shutdown the following Oracle Database 10g processes in the order specified, before installing the patch set. a) Shutdown all processes under the Oracle home that might be accessing a database, for example sqlplus $ sqlplusctl stop b) Shutdown all listeners running under Oracle home Directory: $ lsnrctl stop c) Shut down all database instances running in the Oracle Home directory: Sql > shutdown immediate

6.3) BACKUP THE SYSTEM Oracle recommends to create a backup of the oracle Inventory, oracle 10g home, and oracle 10g Database before installation of Patchset. Identify all the Oracle Database installations from /etc/oratab file. (For oraclehome directories) and take the backup of the following directory as well as complete oracle database. Inventory_loc=/etc/oraInventory_10g

4.INSTALLATION TASKS
The patch can be installed either interactively or Non interactively. . Note: If any attempt makes to install the patch set in an Oracle home directory that does not contain an Oracle Database 10g release 10.2.0.1 or higher installation, Oracle universal installer displays a warning dialog with error. 7.1) INSTALLING THE ORACLE DATABASE 10G PATCH SET INTERACTIVELY Following steps involved in installing the patch. 1) Logged into Database server as oracle user. 2) Make sure that install X-Server software on the local computer to carry out the installation from remote computer. Run the following command on local machine to get the OUI screen. $ export DISPLAY=localhost:0.0 Here localhost refers to the Hostname or IP address of the computer that used to display Oracle universal installer. Now to enable X applications, run the following command on the Database server that used to display Oracle universal installer $ xhost + $ xclock (On Server) ( To check the Graphic screen from local computer )

3) Run the following commands to start Oracle universal Installer, where patchset_directory is the directory where we unpacked the patchset software. $ cd /home/oracle/Disk1 $ ./runInstaller 4) On the welcome screen, click Next. (This will invoke OUI on local computer)

5) On the specify Home details screen, select the name of the oracle home to update, then click Next. 6) On the summary screen click Install. This screen lists all of the patches available for installation. 7) When prompted, run the $ ORACLE_HOME/root.sh script as the root user to upgrade oracle home to 10.2.0.4. 8) On the end of Installation screen, click Exit, and then click yes to exit from oracle Universal Installer.

5.POST-INSTALLATION TASKS
After the completion of installation of patch set perform the following steps to upgrade database release. Database can be upgraded either manually or by using Database Upgrade Assistant. 8.1) MANUALLY UPGRADING A RELEASE 10.2 DATABASE Complete the following sections to upgrade an Oracle 10g release 10.2.0.1 to 10.2.0.4. 8.1.1) RUN THE PRE-UPGRADATION TOOL Analyze database by running the pre-upgrade information tool. The pre-upgrade information tool is a SQL script that ships with Oracle Database 10.2. Complete the following procedure to run the pre-upgrade Information tool. 1) Start the Database in UPGRADE mode Sql> startup upgrade 2) Set the system to spool results to a log file for later analysis. Sql> spool upgrade_info.log 3) Run the pre-upgrade Information Tool. Sql> @?/rdbms/admin/utlu102i.sql Where ? represents the $ORACLE_HOME (environment Variable) a) This script checks for the tablespaces in the current database for each tablespace, the tablespace name and minimum required size is displayed. In addition, a message is displayed if the tablespace is adequate for the upgrade. If the tablespace does not have enough free space, then space must be added to the tablespace in the current database. b) This script also checks for the list of database components which are upgraded or installed when the current database is upgraded.

4) Turn off the spooling of script result to the log file. Sql> spool off Note: Tablespace adjustments must be made before the database is upgraded. 8.1.2) UPGRADING A RELEASE 10.2 DATABASE For upgrading the Database follow the below steps 1) Log in as the oracle software owner user. 2) Start the listener as follows $ lsnrctl start 3) Use SQL*Plus to log in to the Database as the sys user with SYSDBA. $ sqlplus <connect as SYSDBA> 4) Enter the Following SQL*Plus command. Sql> startup upgrade Sql> spool patch.log Sql> @?/rdbms/admin/catupgrd.sql Sql> spool off catupgrad.sql script updates certain base tables and views to upgrade database. . 5) Review the patch. log file for errors and inspected the list of components that were displayed at the end of catupgrd.sql script. This list provides the version and status of each SERVER component in the Database.

Note: If the script catupgrd.sql is not run as described and if any attempt makes to start up a Database for normal operation, then ORA-01092: ORACLE instance terminated. Disconnection forced errors and ORA-39700: Database must be opened with UPGRADE option will occur, these errors can be checked in the alert log file. If necessary, re run the catupgrd.sql script after correcting any issues. 6) Restart the Database. Sql> shutdown immediate Sql> startup 7) Run the utlrp.sql Script to recompile all invalid PL/SQL Packages Sql> @?/rdbms/admin/utlrp.sql The catupgrd.sql script updates some of the base tables and views, so the packages developed based on the earlier base tables got invalid, so to make those packages valid, run the utlrp.sql script. Note: Ignore any messages indicating that the Database contains invalid recycle bin objects. 8) Run the following command to check the status of all the components a after upgrade. Sql> select comp_name, version, status from sys.dba_registry; In the output of the preceding command, the status of all the components should be VALID for a successful upgrade

8.1.3) MISSING COMPONENTS WHEN UPGRADING Note: If any component listed as missing by the pre-upgrade utility script, and was not installed before running the catupgrd.sql script, then need to install the missing component from the companion CD and run the catupgrd.sql script again.

Database can be upgraded by using Database Upgrade Assistant also as follows

8.2) UPGRADING A RELEASE 10.2 DATABASE USING ORACLE DATABASE UPGRADE ASSISTANT After installation of the Patchset, the following steps should be performed. 1) Log in as the oracle software Owner user. 2) Start the listener. $ lsnrctl start 3) Run Oracle Database Upgrade Assistant in either Interactive mode or Non Interactive mode. 8.2.1) RUNNING THE INTERACTIVE MODE DATABASE UPGRADE ASSISTANT IN

Enter the following command from the command prompt $ dbua Complete the following steps displayed in the Oracle Dbua screen. a) On the Welcome screen, click Next. b) On the Database screen, select the name of the Oracle Database that is going to update, then click Next. c) On the Recompile Invalid objects screen, Select the Recompile the Invalid objects at the end of the Upgrade option, and then click Next. d) If the backup of the database is not taken earlier, on the Backup screen, select the I would like to take this tool to backup the database option, select or guarantee the path, then click Next. e) On the summary screen, check the summary, and then click Finish. f) On the end of Database Upgrade Assistants Upgrade Results screen, click close to exit from oracle Database Upgrade Assistant.

8.3) RUNNING CHANGEPERM.SH DATABASE SERVER HOME

SCRIPT

ON

AN

ORACLE

1) Oracle recommends using the most restrictive file permissions possible for the given implementation. 2) Perform these optional steps only after considering all security issues and only if this installation is going to be shared by users or clients. 3) 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. The following steps to be performed to change the permissions. a) Change to the install directory by using following command. $ cd $ORACLE_HOME/install b) Run changePerm.sh and specify the patched server oracle home location, before accessing client-side utilities in the Database home.

APPENDIX
The following points used to know few basic things like operation system information and to query tables to know component versions etc.. While doing upgradation Check the operating system information with $uname -a To know the invalid objects use dba_objects table. Sql > select object_name, status from dba_objects; To know the component versions use dba_registry table. Sql> select comp_name, version, status from dba_registry; To kill the processes use the following command $ Kill -9 pid (if any process is running, kill the process.) Where pid is the process identifier. To change the permissions of a file $ chmod 777 <filename> (indicates all permissions)

Symbols
$ Represents the command prompt Sql> Represents the sql prompt ? Represents the Oraclehome.

Anda mungkin juga menyukai