不起介面,用response file的方式升級資料庫

space6212發表於2019-03-18

本文主要討論如何透過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/,如需轉載,請註明出處,否則將追究法律責任。

相關文章