just do it
分类: Oracle
2014-07-22 16:53:50
1. Oracle 升级9206—>9208 :
1) 静默安装oracle9208 patch
修改response静默安装文件,主要修改以下三条:
UNIX_GROUP_NAME="dba"
ORACLE_HOME="/orahome/oracle/product/9.2.0"
ORACLE_HOME_NAME=" ora9ibims "
ORACLE_HOME_NAME可以从../oraInventory/ContentsXML/inventory.xml文件中 HOME NAME获取。
bash-3.00$ grep ORACLE_HOME bims.rsp //bims.rsp为修改后的response文件
#Name : ORACLE_HOME
#Example: ORACLE_HOME = "C:\OHOME1"
ORACLE_HOME="/orahome/oracle/product/9.2.0"
#Name : ORACLE_HOME_NAME
#Example: ORACLE_HOME_NAME = "OHOME1"
ORACLE_HOME_NAME="ora9ibims"
bash-3.00$ grep UNIX_GROUP_NAME bims.rsp
#Name : UNIX_GROUP_NAME
#Example: UNIX_GROUP_NAME = "install"
UNIX_GROUP_NAME="dba"
#-------------------------------------------------------------------------------
#Name : FROM_LOCATION
#Datatype : String
#Description: Complete path to the products.xml.
#Example: FROM_LOCATION = "../stage/products.xml"
#-------------------------------------------------------------------------------
FROM_LOCATION="/orahome/software/Disk1/stage/products.xml"
执行静默安装:
bash-3.00$ cd /orahome/software/Disk1
bash-3.00$ ./runInstaller -silent -responseFile /orahome/software/Disk1/response/bims.rsp
安装完成后用root用户执行roo.sh文件完成安装:
root@ts-db1 # /orahome/oracle/product/9.2.0/root.sh
Running Oracle9 root.sh script...
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /orahome/oracle/product/9.2.0
Enter the full pathname of the local bin directory: [/usr/local/bin]:
Creating /usr/local/bin directory...
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...
Creating /var/opt/oracle/oratab file...
Adding entry to /var/opt/oracle/oratab file...
Entries will be added to the /var/opt/oracle/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.
rm: /orahome/oracle/product/9.2.0/rdbms/filemap is a directory
root@ts-db1 #
2) 更新数据字典,编译失效对象
$ sqlplus /nolog
SQL> CONNECT /AS SYSDBA
SQL> STARTUP
SQL> SHOW PARAMETER SHARED_POOL_SIZE
SQL> SHOW PARAMETER JAVA_POOL_SIZE
SQL> ALTER SYSTEM SET JAVA_POOL_SIZE='150M' SCOPE=spfile;
SQL> shutdown immediate
SQL> STARTUP MIGRATE
SQL> SPOOL patch.log
SQL> @?/rdbms/admin/catpatch.sql
SQL> SPOOL OFF
SQL> SPOOL OFF
SQL> shutdown immediate
SQL> STARTUP
SQL> select comp_id,status,version from dba_registry;
检查是否有无效的对象。
Sql>select object_name,status from dba_objects where object_Name in ('SYS','SYSTEM') and status = 'INVALID';
如果有invalid对象则运行以下的脚本。
SQL> @?/rdbms/admin/utlrp.sql
3) 检查完成
SQL> ALTER SYSTEM SET JAVA_POOL_SIZE='64M' SCOPE=spfile; (还原设置)
SQL> select comp_id,status,version from dba_registry;
查一下表,查一下alert日志
启动监听:lsnrctl start
检查监听:lsnrctl status
安装过程中遇到的问题:
bash-3.00$ more /tmp/OraInstall2014-07-22_02-33-50PM/installActions2014-07-22_02-33-50PM.log
Using paramFile: /orahome/oracle/product/9.2.0/oui/oraparam.ini
Checking installer requirements...
Checking operating system version: must be 5.8 or 5.9. Actual 5.10
Failed <<<<
Exiting Oracle Universal Installer, log for this session can be found at /tmp/OraInstall2014-07-22_02-33-50PM/installActions2014-07-
22_02-33-50PM.log
解决办法:
修改/orahome/oracle/product/9.2.0/oui/oraparam.ini文件
[Certified Versions]
#You can customise error message shown for failure through CERTIFIED_VERSION_FAILURE_MESSAGE
Solaris=5.8,5.9,5.10 添加5.10