用非界面方式(silent)升级oracle10g
因公司网络限制,无法使用xmanager
或者VNC
等图形软件进行安装,尝试ORACLE
提供的RESPONSE FILE
进行非交互式的升级。1
,把补丁包解压拷贝Disk1/response/patchset.rsp
文件到Disk1/
下(主要是为了保留原模板文件的备份,可直接修改原文件)2
,根据实际情况修改patchset.rsp
文件中的参数(好多参数不知道做什么用,采用了默认值)
RESPONSEFILE_VERSION=2.2.1.0.0
UNIX_GROUP_NAME=dba
FROM_LOCATION="/export/home/oracle/Disk1/stage/products.xml"
NEXT_SESSION_RESPONSE="/tmp/install.rsp"
ORACLE_HOME="/usr/oracle/app/oracle/product/10.2.0.1.0"
ORACLE_HOME_NAME=OraDb10g_home1
报错后修改过的
3
,安装升级包
-bash-3.00$ ./runInstaller -silent-responseFile /export/home/oracle/Disk1/patchset.rsp
报错了
SEVERE:OUI-10136:AnOracle Home with name OraDb10g_home1 already exists at location/usr/oracle/app/oracle/product/10.2.0.1.0. Please specify another location forOracle Home.
以为要设置另外的ORACLE_HOME
,于是修改patchset.rsp
文件:ORACLE_HOME="/usr/oracle/app/oracle/product/10.2.0.4.0"
运行后,跳过了刚才的错误,但是又报了下面的错误
=======================================================================
Performing check forCompatibilityChecks
Checking for Oracle Homeincompatibilities ...
Actual Result: NEW_HOME
Check complete. Theoverall result of this check is: Failed <<<<
Check complete: Failed<<<<
Problem: This softwarecan only be installed into an existing Oracle Database 10g Oracle Home.
Recommendation: Choose an existing Oracle Database 10g OracleHome for installing this software.
疑惑了好长时间,觉得就是升级当前的ORACLE
,就应该应用当前的ORACLE_HOME
,最后发现是ORACLE_HOME_NAME
要与安装时一样(如果不报错,怎么能知道原来安装时的ORACLE_HOME_NAME
?)
然后再运行,成功!
Starting Oracle Universal Installer...
Checking installer requirements...
.
.
.
...............................................................
43% Done.
...............................................................
53% Done.
...............................................................
64% Done.
.........................
69%Done.
Install successful
Setup successful
End of install phases.(Wednesday, August 5, 2009 4:48:59 PMCST)
WARNING:
The following configuration scripts need to be executed asthe "root" user.
#!/bin/sh
#Root script to run
/usr/oracle/app/oracle/product/10.2.0.1.0/root.sh
To execute the configuration scripts:
1. Open aterminal window
2. Log in as"root"
3. Run thescripts
The installation of Oracle Database 10g Release 2 Patch Set3 was successful.
Please check'/usr/oracle/app/oracle/oraInventory/logs/silentInstall2009-08-05_04-43-57PM.log'for more details.
根据提示,用root用户运行上面的脚本,完成!
同一般的升级一样,安装完升级包后还要升级数据库
SQL>startup upgrade
SQL>@?/rdbms/admin/catalog.sql
SQL>@?/rdbms/admin/catproc.sql
SQL>@?/rdbms/admin/utlrp.sql
SQL>shutdown immediate
SQL>startup
数据库成功启动