打上同版本的补丁
今天在做了个实验,就是在LINUX AS4下面打上ORACLE 10.1.0.3到10.1.0.5的补丁[@more@]今天在做了个实验,就是在LINUX AS4下面打上ORACLE 10.1.0.3到10.1.0.5的补丁 下面说一下具体的步骤 1、 先到MetaLink上面下载补丁,地址是https://updates.oracle.com/ARULink/AdvancedSearch/process_form?search_style=9&language=0&patch_type=patchset&incl_prod=&incl_prod_checked=yes&release=80101050&plat_lang=46P&product=9480 2、关闭掉所有的ORACLE服务、监听等 注:用ps -ef|grep ora看一下是否还有ORACLE的相关进程,可能看到会有CRS的守护进程ocssd.bin还是在运行,必须停掉该进程,但是kill是不能解决问题的,执行命令# /etc/init.d/init.cssd stop(root权限下执行) 3、备份数据库,冷备热备均可,但必须是完全备份。推荐冷备,一旦有问题恢复也快。 4、安装补丁包 [oracle@oracle1 patch_10105_LINUX]$ cd Disk1/ [oracle@oracle1 Disk1]$ ll total 2004 -rwxrwxr-x 1 oracle oinstall 1886206 Jan 10 2006 10105_buglist.htm drwxrwxr-x 4 oracle oinstall 4096 Jan 10 2006 install -rwxrwxr-x 1 oracle oinstall 136968 Jan 30 2006 patchnote.htm drwxrwxr-x 2 oracle oinstall 4096 Jan 10 2006 response -rwxrwxr-x 1 oracle oinstall 907 May 21 2004 runInstaller drwxrwxr-x 8 oracle oinstall 4096 Jan 24 2006 stage [oracle@oracle1 Disk1]$ ./runInstaller 5、按照提示在root权限下运行.sh 文件 6、修改数据库启动参数SHARED_POOL_SIZE/JAVA_POOL_SIZE都为至少150M 7、待安装完成之后打开监听,启动数据库 8、进入数据库,运行catpatch.sql脚本 [oracle@oracle1 ~]$ sqlplus /nolog SQL*Plus: Release 10.1.0.5.0 - Production on Fri Dec 7 12:05:13 2007 Copyright (c) 1982, 2005, Oracle. All rights reserved. SQL> conn /as sysdba Connected. SQL> STARTUP MIGRATE SQL> SPOOL patch.log SQL> @$ORACLE_BASE/ORACLE_HOME/rdbms/admin/catpatch.sql SQL> SPOOL OFF SQL> @ORACLE_BASEORACLE_HOMErdbmsadmincatpatch.sql SP2-0310: unable to open file "ORACLE_BASEORACLE_HOMErdbmsadmincatpatch.sql" SQL> @/u01/app/oracle/product/10.1.0/db_1/rdbms/admin/catpatch.sql DOC>###################################################################### DOC>###################################################################### DOC> The following PL/SQL block will cause an ORA-20000 error and DOC> terminate the current SQLPLUS session if the user is not SYS. DOC> Disconnect and reconnect with AS SYSDBA. DOC>###################################################################### DOC>###################################################################### DOC># PL/SQL procedure successfully completed. PL/SQL procedure successfully completed. Session altered. TIMESTAMP -------------------------------------------------------------------------------- COMP_TIMESTAMP PATCH_BGN 2007-12-17 16:46:40 ............................................................................................................................ ............................................................................................................. ............................................................................................... .................................................................................. ............................................................................................................................ TIMESTAMP -------------------------------------------------------------------------------- COMP_TIMESTAMP PATCH_END 2007-12-17 17:55:10 COMP_NAME STATUS VERSION ----------------------------------- ---------------------- -------------------- Oracle Workspace Manager VALID 10.1.0.2.0 Oracle Database Catalog Views VALID 10.1.0.5.0 Oracle Database Packages and Types VALID 10.1.0.5.0 JServer JAVA Virtual Machine VALID 10.1.0.5.0 Oracle XDK VALID 10.1.0.5.0 Oracle Database Java Packages VALID 10.1.0.5.0 Oracle XML Database VALID 10.1.0.5.0 Oracle Data Mining INVALID 10.1.0.5.0 OLAP Analytic Workspace VALID 10.1.0.5.0 OLAP Catalog VALID 10.1.0.5.0 Oracle OLAP API VALID 10.1.0.5.0 Oracle interMedia INVALID 10.1.0.5.0 Spatial VALID 10.1.0.5.0 Oracle Text VALID 10.1.0.5.0 Oracle Ultra Search VALID 10.1.0.5.0 Oracle Expression Filter INVALID 10.1.0.5.0 Oracle Enterprise Manager VALID 10.1.0.5.0 DOC>####################################################################### DOC>####################################################################### DOC> DOC> The above query lists the SERVER components in the database, DOC> along with their current patch set version and status. DOC> DOC> Please review the status and version columns and look for DOC> any errors in the spool log file. If there are errors in the spool DOC> file, or any components are not VALID or not the correct version, DOC> consult the Patch Set Notes. DOC> DOC> Next shutdown immediate, restart for normal operation, and then DOC> run utlrp.sql to recompile any invalid application objects. DOC> DOC>####################################################################### DOC>####################################################################### DOC># SQL> SPOOL OFF 查看patch.log文件中的错误和文件末尾列出的部件版本和状态。 9、重新启动数据库 SQL> SHUTDOWN Database closed. Database dismounted. ORACLE instance shut down. SQL> startup ORACLE instance started. Total System Global Area 243269632 bytes Fixed Size 778816 bytes Variable Size 128982464 bytes Database Buffers 113246208 bytes Redo Buffers 262144 bytes Database mounted. Database opened. SQL> select count(1) from dba_objects where status='INVALID'; COUNT(1) ---------- 403 SQL> @?/rdbms/admin/utlrp.sql TIMESTAMP -------------------------------------------------------------------------------- COMP_TIMESTAMP UTLRP_BGN 2007-12-17 17:58:36 TIMESTAMP -------------------------------------------------------------------------------- COMP_TIMESTAMP UTLRP_END 2007-12-17 18:01:43 Invoking Ultra Search Install/Upgrade validation procedure VALIDATE_WK Ultra Search VALIDATE_WK done with no error SQL> select count(1) from dba_objects where status='INVALID'; COUNT(1) ---------- 1 SQL> select tablespace_name,status from dba_tablespaces; TABLESPACE_NAME STATUS ------------------------------------------------------------ ------------------ SYSTEM ONLINE UNDOTBS1 ONLINE SYSAUX ONLINE TEMP ONLINE USERS ONLINE SQL> select username from dba_users; USERNAME ------------------------------------------------------------ SYS SYSTEM OUTLN WK_TEST MDSYS ORDSYS CTXSYS ANONYMOUS EXFSYS DMSYS DBSNMP WMSYS SYSMAN XDB WKPROXY ORDPLUGINS MGMT_VIEW SI_INFORMTN_SCHEMA OLAPSYS WKSYS MDDATA DIP SCOTT SQL> select * from dba_objects where status='INVALID'; OWNER ------------------------------------------------------------ OBJECT_NAME -------------------------------------------------------------------------------- SUBOBJECT_NAME OBJECT_ID ------------------------------------------------------------ ---------- DATA_OBJECT_ID OBJECT_TYPE CREATED LAST_DDL_TIM -------------- -------------------------------------- ------------ ------------ TIMESTAMP STATUS TE GE SE -------------------------------------- -------------- -- -- -- WK_TEST BIN$QXeDqVeuu+jgQAB/AQA48g==$0 47687 TRIGGER 10-AUG-04 17-DEC-07 2007-12-17:17:51:01 INVALID N N N ok,恭喜,升级成功。。 注:dba_objects视图中也许会有一些类似BIN$QXeDqVeuu+jgQAB/AQA48g==$0的对象存在,这是10g后提供的新功能,对象删除后并非真正被删,而是扔到回收站,这些对象就是回收站的对象,不用管它。 10、备份数据库
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/9821375/viewspace-996446/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/9821375/viewspace-996446/