不起界面,用response file的方式升级数据库

本文主要讨论如何通过response文件,在不起界面的方式升级数据库。

具体步骤如下:


一、把下载的补丁集解压,修改
vi /software/Disk1/response/patchset.rsp
把如下值修改为你实际的值:
UNIX_GROUP_NAME=oinstall
FROM_LOCATION=/software/Disk1/stage/products.xml
ORACLE_HOME=/u01/oracle/product/10.2.0/db_1
ORACLE_HOME_NAME=OraDb10g_home1 --从安装日志中找
RESTART_SYSTEM=false
CLUSTER_NODES={}
OUI_HOSTNAME=standby
REMOVE_HOMES={}

二、执行如下命令来启动补丁安装:

[oracle@standby Disk1]$ ./runInstaller -silent -responseFile /software/Disk1/response/patchset.rsp
Starting Oracle Universal Installer...

Checking installer requirements...

Checking operating system version: must be redhat-3, SuSE-9, SuSE-10, redhat-4, UnitedLinux-1.0, asianux-1 or asianux-2
Passed


All installer requirements met.

Preparing to launch Oracle Universal Installer from /tmp/OraInstall2007-06-14_12-04-34AM. Please wait ...[oracle@standby Disk1]$ Oracle Universal Installer, Version 10.2.0.3.0 Production
Copyright (C) 1999, 2006, Oracle. All rights reserved.

You can find a log of this install session at:
/u01/oracle/oraInventory/logs/installActions2007-06-14_12-04-34AM.log
.................................................................................................... 100% Done.


Loading Product Information
..................................................................................................................... 100% Done.


Analyzing dependencies
.................................................................................................... 100% Done.


-----------------------------------------------------------------------------
Summary
Global Settings
Source: /software/Disk1/stage/products.xml
Oracle Home: /u01/oracle/product/10.2.0/db_1 (OraDb10g_home1)
Product Languages
English
Simplified Chinese
Space Requirements
/ Required 825MB (includes 33MB temporary) : Available 1.62GB
New Installations (61 products)
Oracle Notification Service Patch 10.2.0.3.0
Database Configuration and Upgrade Assistants Patch 10.2.0.3.0
Character Set Migration Utility Patch 10.2.0.3.0
Oracle Database 10g Patch 10.2.0.3.0
Oracle JDBC/OCI Instant Client Patch 10.2.0.3.0
Oracle Database 10g Patch 10.2.0.3.0
SQL*Plus 10.2.0.3.0
HAS Common Files Patch 10.2.0.3.0
HAS Files for DB Patch 10.2.0.3.0
Oracle Java Client Patch 10.2.0.3.0
Oracle JVM Patch 10.2.0.3.0
Oracle Internet Directory Client Patch 10.2.0.3.0
Oracle Net Patch 10.2.0.3.0
Oracle Net Listener Patch 10.2.0.3.0
Oracle Wallet Manager Patch 10.2.0.3.0
Precompiler Common Files Patch 10.2.0.3.0
......
......
Oracle Containers for Java 10.2.0.1.0
Java Runtime Environment 1.4.2.8.0
Sun JDK 1.4.2.0.8
-----------------------------------------------------------------------------

Deinstall in progress (Thu Jun 14 00:04:58 CST 2007)
............................................................... 0% Done.
............................................................... 28% Done.
............................................................... 57% Done.
.............................. 100% Done.

Deinstall successful

Installation in progress (Thu Jun 14 00:04:59 CST 2007)
............................................................... 28% Done.
............................................................... 57% Done.
.............................................. 78% Done.
Install successful

End of install phases.(Thu Jun 14 00:12:32 CST 2007)
WARNING:
The following configuration scripts need to be executed as the "root" user.
#!/bin/sh
#Root script to run
/u01/oracle/product/10.2.0/db_1/root.sh
To execute the configuration scripts:
1. Open a terminal window
2. Log in as "root"
3. Run the scripts

三、执行root.sh
[root@standby response]# /u01/oracle/product/10.2.0/db_1/root.sh
Running Oracle10 root.sh script...

The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/oracle/product/10.2.0/db_1

Enter the full pathname of the local bin directory: [/usr/local/bin]:
The file "dbhome" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]: y
Copying dbhome to /usr/local/bin ...
The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]: y
Copying oraenv to /usr/local/bin ...
The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]: y
Copying coraenv to /usr/local/bin ...

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.

四、升级数据库
如果已经安装了数据库,则执行如下命令来调用dbua在非界面下升级数据库:

SQL> STARTUP UPGRADE
[oracle@standby Disk1]$ dbua -silent -dbname standby -oracleHome /u01/oracle/product/10.2.0/db_1 -sysDBAUserName sys -sysDBAPassword mypassword -recompile_invalid_objects true

当然,这一步可以不用dbua,你可以使用手工执行sql语句的方式来升级,具体步骤就不罗列了,大家可以参考文档。

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/231499/viewspace-63815/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/231499/viewspace-63815/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值