查看原来的版本号
SQL> select version from v$timezone_file;
VERSION
----------
2
SQL> select version from v$instance;
VERSION
-----------------
10.2.0.1.0
停用数据库和所有服务,监听,如下
8.8.1 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:
-
Shut down all processes in the Oracle home that might be accessing a database; for example, Oracle Enterprise Manager Database Control:
$ emctl stop dbconsole $ lsnrctl stop
Note:
Before you shut down all processes that are monitored by Oracle Enterprise Manager Grid Control, set a blackout in Grid Control for the processes that you intend to shut down. This is necessary so that the availability records for these processes indicate that the shutdown was planned downtime rather than an unplanned system outage. -
Shut down all database instances running in the Oracle home directory, where you need to install the patch set.
-
Shut down all listeners running in the Oracle home directory, where you need to install the patch set.
-
If there is an Automatic Storage Management instance present, then enter the following command to set the values for the environment variables
$ORACLE_HOME
and$ORACLE_SID
:-
Bourne, Bash, or Korn shell:
$ export ORACLE_SID=+ASM $ export ORACLE_HOME=ASM_HOME
-
C shell:
% setenv ORACLE_SID +ASM % setenv ORACLE_HOME ASM_HOME
Enter the following command to shut down the Automatic Storage Management instance:
cd $ORACLE_HOME/bin $ ./sqlplus /NOLOG SQL> CONNECT SYS AS SYSDBA Enter password:SYS_password SQL> SHUTDOWN IMMEDIATE
-
-
For Automatic Storage Management, as the
root
user enter the following command to shut down the Oracle Cluster Synchronization Services daemon:# $ORACLE_HOME/bin/crsctl stop crs
修改升级包的用户和组
[root@localhost oracle]# chown -R oracle:oinstall p8202632_10205_LINUX.zip
进入oracle用户解压
[oracle@localhost ~]$ unzip p8202632_10205_LINUX.zip
执行
[oracle@localhost Disk1]$ ./runInstaller
进入图形界面进行升级
附录:官方说明
9.1 Installing 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 Oracle10 g release 10.2.0.1 or higher 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 4 10.2.0.5
Oracle Universal Installer does not allow the installation to proceed. Click OK, then click Cancel to end the installation.
To install the Oracle Database 10g patch set interactively:
Log in as the
oracle
user.If you are not installing the software on the local computer, then run the following command on remote machine:
Bourne, Bash, or Korn shell:
$ export DISPLAY=localhost:0.0
C shell:
% setenv DISPLAY local_host:0.0
In this example,
local_host
is the host name or IP address of the computer that you want to use to display Oracle Universal Installer.Now to enable X applications, run the following command on the machine that you want to use to display Oracle Universal Installer:
$ xhost + [fully_qualified_remote_host_name]
Enter the following commands to start Oracle Universal Installer, where
patchset_directory
is the directory where you unpacked the patch set software:% cd patchset_directory/Disk1 % ./runInstaller
On the Welcome screen, click Next.
On 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.
Enter your e-mail address and password for your My Oracle Support account to be informed of security issues, then click Next.
Note:
The registration and configuration can also be done manually after patch set installation.The OCM registration page appears only while applying 10.2.0.5 patch over existing Database instances alone.
If you are installing the patch set on an Oracle RAC cluster, click Next when the Selected Nodes screen appears.
On the Product-specific Prerequisite Checks screen, correct any reported errors, and click Next.
On the Summary screen, click Install.
This screen lists all of the patches available for installation.
When prompted, run the
$ORACLE_HOME/root.sh
script as theroot
user. If you are applying the patch set to an Oracle RAC installation, then run theroot.sh
script on each node of the cluster.On the End of Installation screen, click Exit, then click Yes to exit from Oracle Universal Installer.
Note:
If you are applying this patch set to an Oracle Clusterware installation, then complete all of the steps displayed on the Oracle Universal Installer screen.The Oracle Clusterware installation instructions displayed on the Oracle Universal Installer screen are also available in the
CRS_home
/install/readme.txt
file.When applying this patch set on an Oracle Clusterware home, Oracle Universal Installer prompts you to run the
root102.sh
script from$ORACLE_HOME/install
. You must run this script as theroot
user on all nodes.
注意,升级的过程中要关闭sqlplus,否则在安装的过程中会报错!如在安装的过程中弹出错误对话框,检查sqlplus是否关闭!
完成升级安装后执行如下的步骤:
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 thecatupgrd.sql
script as described in this section and you start up a database for normal operation, thenORA-01092: ORACLE instance terminated. Disconnection forced
errors will occur and the errorORA-39700: database must be opened with UPGRADE option
will be in the alert log.
Log in as the Oracle software owner user.
For Oracle RAC installations, start listener on each node of the cluster as follows:
$ srvctl start listener -n node
If you are using Automatic Storage Management, start the Automatic Storage Management instance.
For single-instance installations, start the
listener
as follows:$ lsnrctl startFor single-instance installations, use SQL*Plus to log in to the database as the
SYS
user withSYSDBA
privileges:$ sqlplus /nolog SQL> CONNECT SYS AS SYSDBA Enter password:SYS_password
Users of single-instance implementations should now bypass steps that apply to Oracle RAC installations.
For Oracle RAC installations:
Use SQL*Plus to log in to the database as the
SYS
user withSYSDBA
privileges:$ sqlplus /nolog SQL> CONNECT SYS AS SYSDBA Enter password: SYS_password SQL> STARTUP NOMOUNT
Set the
CLUSTER_DATABASE
initialization parameter toFALSE
:SQL> ALTER SYSTEM SET CLUSTER_DATABASE=FALSE SCOPE=spfile;Shut down the database:
SQL> SHUTDOWNEnter the following SQL*Plus commands:
SQL> STARTUP UPGRADE SQL> SPOOL patch.log SQL> @?/rdbms/admin/catupgrd.sql SQL> SPOOL OFFReview the
patch.log
file for errors and inspect the list of components that is displayed at the end ofcatupgrd.sql
script.This list provides the version and status of each
SERVER
component in the database.If necessary, rerun the
catupgrd.sql
script after correcting any problems.Restart the database:
SQL> SHUTDOWN IMMEDIATE SQL> STARTUPRun 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.SQL> @?/rdbms/admin/utlrp.sqlNote:
When the 10.2.0.5 patch set is applied to an Oracle10 g Standard Edition database, there may be 54 invalid objects after theutlrp.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==$0This issue is tracked with Oracle bug 9386364.
Run the following command to check the status of all the components after the 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.If you are using the Oracle Recovery Manager catalog, enter the following command:
$ rman catalog username/password@alias RMAN> UPGRADE CATALOG;
- For Oracle RAC installations:
- Set the
CLUSTER_DATABASE
initialization parameter toTRUE
:SQL> ALTER SYSTEM SET CLUSTER_DATABASE=TRUE SCOPE=spfile;Restart the database:
SQL> SHUTDOWN IMMEDIATE SQL> STARTUPStart any database services that you want to use:
$ srvctl start service -d db_name -s service_name
- To configure and secure Enterprise Manager follow these steps:
- Ensure the database and Listener are operational.
- In the case of a single instance, execute
emca -upgrade dbIn the case of Oracle RAC, execute
emca -upgrade db -cluster
Note: If you are upgrading a database where Oracle Database Control is configured in non-secure mode, then Oracle Database Control will run in secure mode after upgrade.
完成升级如下:
升级过程中遇到的问题:
1,启动不了图形界面,修改了/etc/redhat-release中的版本也不行
详见这里,
./runinstaller -ignoreSysPrereqs
使用ignoreSysPrereqs标记会跳过对先决条件的检查
2.出现如下错误