太懒
分类: Oracle
2014-08-01 16:10:58
DB 11.2.0.4 patchset () has been released on
[oracle@my2950 ~]$[oracle@my2950 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Thu Jul 31 13:48:15 2014
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing options13:57:54 SYS@mydb1>create pfile from spfile;File created.13:58:04 SYS@mydb1>13:48:16 SYS@mydb1>shutdown immediateDatabase closed.Database dismounted.ORACLE instance shut down.13:48:56 SYS@mydb1>quitDisconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing options[oracle@my2950 ~]$ lsnrctl stop
LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 31-JUL-2014 13:49:02
Copyright (c) 1991, 2011, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=my2950.momo.org)(PORT=1521)))The command completed successfully[oracle@my2950 ~]$ ps -eaf|grep oracleroot 15314 662 0 10:38 ? 00:00:00 sshd: oracle [priv]oracle 15316 15314 0 10:38 ? 00:00:08 sshd: oracle@pts/0oracle 15317 15316 0 10:38 pts/0 00:00:00 -bashoracle 19667 15317 1 13:49 pts/0 00:00:00 ps -eaforacle 19668 15317 0 13:49 pts/0 00:00:00 grep oracle[oracle@my2950 ~]$
开始备份,略......
忘了这个
Purging the Database Recycle Bin
The database recycle bin must be empty before you begin the upgrade process. You use the PURGE statement to remove items and their associated objects from the recycle bin and release their storage space.
To empty the database recycle bin
Issue the following command:
SQL> PURGE dba_recyclebinCaution:
The database recycle bin must be empty during the upgrade process to avoid possible ORA-00600 errors and to minimize the upgrade time.
来源: <>
[oracle@my2950 database]$ ./runInstaller -ignorePrereq -ignoreSysPrereqs -showProgress -silent -responseFile /home/oracle/db_upgrade.rsp
[oracle@my2950 database]$ ./runInstaller -ignorePrereq -ignoreSysPrereqs -showProgress -silent -responseFile /home/oracle/db_upgrade.rspStarting Oracle Universal Installer...
Checking Temp space: must be greater than 120 MB. Actual 8987 MB PassedChecking swap space: must be greater than 150 MB. Actual 8081 MB PassedPreparing to launch Oracle Universal Installer from /tmp/OraInstall2014-07-31_02-04-02PM. Please wait ...[oracle@my2950 database]$[oracle@my2950 database]$[oracle@my2950 database]$[oracle@my2950 database]$ [WARNING] [INS-35373] Single-instance database not detectedCAUSE: The installer could not detect a single-instance database that could be upgraded.ACTION: NoneYou can find the log of this install session at:/u01/app/oracle/oraInventory/logs/installActions2014-07-31_02-04-02PM.log
Prepare in progress................................................... 8% Done.
Prepare successful.
Copy files in progress................................................... 13% Done................................................... 19% Done................................................... 24% Done................................................... 29% Done................................................... 34% Done................................................... 39% Done................................................... 44% Done................................................... 51% Done................................................... 56% Done................................................... 61% Done................................................... 66% Done.........................................Copy files successful.
Link binaries in progress...........Link binaries successful.
Setup files in progress................................................... 71% Done................................................... 76% Done.
Setup files successful.The installation of Oracle Database 11g was successful.Please check '/u01/app/oracle/oraInventory/logs/silentInstall2014-07-31_02-04-02PM.log' for more details.
Execute Root Scripts in progress.
As a root user, execute the following script(s):1. /u01/app/oracle/product/11.2.4/db_1/root.sh
Execute Root Scripts successful................................................... 81% Done.
Oracle Net Configuration Assistant in progress................................................... 100% Done.
Oracle Net Configuration Assistant successful.Successfully Setup Software.##########################################################Start Database Upgrade Assistant to upgrade the database.##########################################################
[oracle@my2950 database]$[oracle@my2950 database]$
[root@my2950 ~]# /u01/app/oracle/product/11.2.4/db_1/root.shCheck /u01/app/oracle/product/11.2.4/db_1/install/root_my2950_2014-07-31_14-09-56.log for the output of root script[root@my2950 ~]# more /u01/app/oracle/product/11.2.4/db_1/install/root_my2950_2014-07-31_14-09-56.logPerforming root user operation for Oracle 11g
The following environment variables are set as:ORACLE_OWNER= oracleORACLE_HOME= /u01/app/oracle/product/11.2.4/db_1Copying dbhome to /usr/local/bin ...Copying oraenv to /usr/local/bin ...Copying coraenv to /usr/local/bin ...
Entries will be added to the /etc/oratab file as needed byDatabase Configuration Assistant when a database is createdFinished running generic part of root script.Now product-specific root actions will be performed.Finished product-specific root actions.Finished product-specific root actions.[root@my2950 ~]#
[oracle@my2950 dbs]$ cd /u01/app/oracle/product/11.2.3/db_1/dbs[oracle@my2950 dbs]$ pwd/u01/app/oracle/product/11.2.3/db_1/dbs[oracle@my2950 dbs]$ cp initmydb1.ora control02.ctl ../../../11.2.4/db_1/dbs/[oracle@my2950 dbs]$ pwd/u01/app/oracle/product/11.2.3/db_1/dbs[oracle@my2950 dbs]$[oracle@my2950 dbs]$ ll /u01/app/oracle/product/11.2.4/db_1/dbstotal 9560-rw-r----- 1 oracle dba 9781248 Jul 31 14:18 control02.ctl-rw-r--r-- 1 oracle dba 1182 Jul 31 14:18 initmydb1.ora-rw-r--r-- 1 oracle dba 2851 May 15 2009 init.ora[oracle@my2950 dbs]$
修改initmydb1.ora
[oracle@my2950 dbs]$ cd ../../../11.2.4/db_1/dbs/[oracle@my2950 dbs]$[oracle@my2950 dbs]$ pwd/u01/app/oracle/product/11.2.4/db_1/dbs[oracle@my2950 dbs]$ lltotal 9556-rw-r----- 1 oracle dba 9781248 Jul 31 14:18 control02.ctl-rw-r--r-- 1 oracle dba 1182 Jul 31 14:18 initmydb1.ora[oracle@my2950 dbs]$
然后启动数据库
[oracle@my2950 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Thu Jul 31 14:47:39 2014
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup nomountORA-01078: failure in processing system parametersORA-00821: Specified value of sga_target 800M is too small, needs to be at least 1520MSQL>SQL> startup upgradeORA-01078: failure in processing system parametersORA-00828: specified value of shared_pool_reserved_size inconsistent with internal settingsSQL>
SQL> startup upgradeORA-01078: failure in processing system parametersORA-00093: _shared_pool_reserved_min_alloc must be between 4000 and 0SQL>
SQL> startup upgradeORACLE instance started.
Total System Global Area 1586708480 bytesFixed Size 2253624 bytesVariable Size 1543507144 bytesDatabase Buffers 33554432 bytesRedo Buffers 7393280 bytesDatabase mounted.Database opened.SQL>
SQL> startup upgradeORACLE instance started.
Total System Global Area 1586708480 bytesFixed Size 2253624 bytesVariable Size 1543507144 bytesDatabase Buffers 33554432 bytesRedo Buffers 7393280 bytesDatabase mounted.Database opened.SQL>SQL>SQL> spool upgrade.logSQL> @?/rdbms/admin/catupgrd.sql
Thu Jul 31 15:20:03 2014 开始
16:53还没结束...
2014年7月31日 17:21:07
ERROR:ORA-02002: error while writing to audit trailORA-00604: error occurred at recursive SQL level 1ORA-04031: unable to allocate 3896 bytes of shared memory ("sharedpool","insert into sys.aud$( sessio...","sga heap(1,0)","kglsim object batch")
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing options (with complications)[oracle@my2950 ~]$
[oracle@my2950 ~]$ ps -eaf|grep oracleroot 24206 662 0 14:25 ? 00:00:00 sshd: oracle [priv]oracle 24208 24206 0 14:25 ? 00:00:00 sshd: oracle@pts/0oracle 24209 24208 0 14:25 pts/0 00:00:00 -bashroot 24283 662 0 14:25 ? 00:00:00 sshd: oracle [priv]oracle 24285 24283 0 14:25 ? 00:00:04 sshd: oracle@pts/1oracle 24286 24285 0 14:25 pts/1 00:00:00 -bashoracle 24322 1 0 14:26 ? 00:00:16 /u01/app/oracle/product/11.2.4/db_1/bin/tnslsnr LISTENER -inheritroot 24365 662 0 14:31 ? 00:00:00 sshd: oracle [priv]oracle 24367 24365 0 14:31 ? 00:00:00 sshd: oracle@pts/2oracle 24369 24367 0 14:31 pts/2 00:00:00 -bashoracle 25618 1 0 15:19 ? 00:00:01 ora_pmon_mydb1oracle 25620 1 0 15:19 ? 00:00:00 ora_psp0_mydb1oracle 25622 1 0 15:19 ? 00:00:33 ora_vktm_mydb1oracle 25626 1 0 15:19 ? 00:00:01 ora_gen0_mydb1oracle 25628 1 0 15:19 ? 00:00:01 ora_diag_mydb1oracle 25630 1 0 15:19 ? 00:00:01 ora_dbrm_mydb1oracle 25632 1 0 15:19 ? 00:00:48 ora_dia0_mydb1oracle 25634 1 0 15:19 ? 00:00:04 ora_mman_mydb1oracle 25636 1 0 15:19 ? 00:00:09 ora_dbw0_mydb1oracle 25638 1 0 15:19 ? 00:00:11 ora_lgwr_mydb1oracle 25640 1 0 15:19 ? 00:00:02 ora_ckpt_mydb1oracle 25642 1 0 15:19 ? 00:00:01 ora_smon_mydb1oracle 25644 1 0 15:19 ? 00:00:00 ora_reco_mydb1oracle 25650 1 0 15:19 ? 00:00:00 ora_d000_mydb1oracle 25652 1 0 15:19 ? 00:00:00 ora_s000_mydb1oracle 25659 1 0 15:19 ? 00:00:01 ora_rvwr_mydb1oracle 25662 1 0 15:19 ? 00:00:01 ora_arc0_mydb1oracle 25666 1 0 15:19 ? 00:00:01 ora_arc1_mydb1oracle 25668 1 0 15:19 ? 00:00:00 ora_arc2_mydb1oracle 25670 1 0 15:19 ? 00:00:01 ora_arc3_mydb1oracle 25692 1 0 15:20 ? 00:00:09 ora_mmon_mydb1oracle 25694 1 0 15:20 ? 00:00:07 ora_mmnl_mydb1oracle 25698 1 0 15:20 ? 00:00:00 ora_cjq0_mydb1oracle 25937 24369 0 15:43 pts/2 00:00:00 tail -f /u01/app/oracle/diag/rdbms/mydb1/mydb1/trace/alert_mydb1.logoracle 26647 24286 0 17:21 pts/1 00:00:00 ps -eaforacle 26648 24286 0 17:21 pts/1 00:00:00 grep oracle[oracle@my2950 ~]$
登陆不进去,密码文件拷贝过来
[oracle@my2950 db_1]$ cp ../../orig.11.2.3/db_1/dbs/orapwmydb1 ./dbs/[oracle@my2950 db_1]$
[oracle@my2950 db_1]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Thu Jul 31 17:24:35 2014
Copyright (c) 1982, 2013, Oracle. All rights reserved.
ERROR:ORA-01075: you are currently logged on
Enter user-name: sysEnter password:ERROR:ORA-04031: unable to allocate 3896 bytes of shared memory ("sharedpool","unknown object","sga heap(1,0)","kglsim object batch")
Enter user-name:
shutdown abort后startup
SQL> @?/rdbms/admin/utlu112s.sql.Oracle Database 11.2 Post-Upgrade Status Tool 07-31-2014 17:40:38.Component Current Version Elapsed TimeName Status Number HH:MM:SS.Oracle Server.JServer JAVA Virtual MachineUpgrade Incomplete
PL/SQL procedure successfully completed.
SQL>
SQL> @?/rdbms/admin/catuppst.sql
PL/SQL procedure successfully completed.
BEGIN*ERROR at line 1:ORA-04045: errors during recompilation/revalidation of MDSYS.SDO_ST_SYN_CREATEORA-01031: insufficient privilegesORA-06512: at line 39
IF CatbundleCreateDir(:catbundleLogDir) = 0 THEN*ERROR at line 71:ORA-06550: line 71, column 14:PLS-00201: identifier 'CATBUNDLECREATEDIR' must be declaredORA-06550: line 71, column 11:PL/SQL: Statement ignored
[oracle@my2950 dbs]$
2014年8月1日 13:42:48 加大内存以后
SQL> spool upgrade.logSQL> @?/rdbms/admin/catupgrd.sql
2014年8月1日 14:18:56
终于结束
Commit complete.
SQL>SQL> shutdown immediate;Database closed.Database dismounted.ORACLE instance shut down.SQL>SQL>SQL> DOCDOC>#######################################################################DOC>#######################################################################DOC>DOC> The above sql script is the final step of the upgrade. PleaseDOC> review any errors in the spool log file. If there are any errors inDOC> the spool file, consult the Oracle Database Upgrade Guide forDOC> troubleshooting recommendations.DOC>DOC> Next restart for normal operation, and then run utlrp.sql toDOC> recompile any invalid application objects.DOC>DOC> If the source database had an older time zone version prior toDOC> upgrade, then please run the DBMS_DST package. DBMS_DST will upgradeDOC> TIMESTAMP WITH TIME ZONE data to use the latest time zone file shippedDOC> with Oracle.DOC>DOC>#######################################################################DOC>#######################################################################DOC>#SQL>SQL> Rem Set errorlogging offSQL> SET ERRORLOGGING OFF;SQL>SQL> REM END OF CATUPGRD.SQLSQL>SQL> REM bug 12337546 - Exit current sqlplus session at end of catupgrd.sql.SQL> REM This forces user to start a new sqlplus session in orderSQL> REM to connect to the upgraded db.SQL> exitDisconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64 bit ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing options[oracle@my2950 product]$
看看日志
Successful close of redo thread 1Completed: ALTER DATABASE CLOSE NORMALALTER DATABASE DISMOUNTShutting down archive processesArchiving is disabledCompleted: ALTER DATABASE DISMOUNTARCH: Archival disabled due to shutdown: 1089Shutting down archive processesArchiving is disabledFri Aug 01 14:16:37 2014Stopping background process VKTMARCH: Archival disabled due to shutdown: 1089Shutting down archive processesArchiving is disabledFri Aug 01 14:16:40 2014Instance shutdown complete
启动数据库
[oracle@my2950 product]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Fri Aug 1 14:19:26 2014
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startupORACLE instance started.
Total System Global Area 2572144640 bytesFixed Size 2255992 bytesVariable Size 2348811144 bytesDatabase Buffers 201326592 bytesRedo Buffers 19750912 bytesDatabase mounted.Database opened.SQL>
SQL> @?/rdbms/admin/utlrp.sql
SQL> select count(*) from dba_objects where status = 'INVALID';
COUNT(*)----------0
SQL>
SQL> @?/rdbms/admin/utlu112s.sql
SQL> @?/rdbms/admin/utlu112s.sql
.
Oracle Database 11.2 Post-Upgrade Status Tool 08-01-2014 14:34:18
.
Component Current Version Elapsed Time
Name Status Number HH:MM:SS
.
Oracle Server
. VALID 11.2.0.4.0 00:10:52
JServer JAVA Virtual Machine
. VALID 11.2.0.4.0 00:04:15
Oracle Real Application Clusters
. INVALID 11.2.0.4.0 00:00:00
Oracle Workspace Manager
. VALID 11.2.0.4.0 00:00:45
OLAP Analytic Workspace
. VALID 11.2.0.4.0 00:00:59
OLAP Catalog
. VALID 11.2.0.4.0 00:00:46
Oracle OLAP API
. VALID 11.2.0.4.0 00:00:27
Oracle Enterprise Manager
. VALID 11.2.0.4.0 00:04:59
Oracle XDK
. VALID 11.2.0.4.0 00:00:45
Oracle Text
. VALID 11.2.0.4.0 00:00:33
Oracle XML Database
. VALID 11.2.0.4.0 00:03:18
Oracle Database Java Packages
. VALID 11.2.0.4.0 00:00:15
Oracle Multimedia
. VALID 11.2.0.4.0 00:02:47
Spatial
. VALID 11.2.0.4.0 00:02:44
Oracle Expression Filter
. VALID 11.2.0.4.0 00:00:10
Oracle Rules Manager
. VALID 11.2.0.4.0 00:00:08
Oracle Application Express
. VALID 3.2.1.00.12
Final Actions
. 00:00:00
Total Upgrade Time: 00:33:54
PL/SQL procedure successfully completed.
SQL>
SQL> @?/rdbms/admin/utlu112i.sql
Oracle Database 11.2 Pre-Upgrade Information Tool 08-01-2014 14:35:00
Script Version: 11.2.0.4.0 Build: 001
.
**********************************************************************
Database:
**********************************************************************
--> name: MYDB1
--> version: 11.2.0.4.0
--> compatible: 11.2.0.0.0
--> blocksize: 8192
--> timezone file: V14
.
Database already upgraded; to rerun upgrade use rdbms/admin/catupgrd.sql.
SQL>
重新启动一次
SQL> create spfile from pfile;
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 2572144640 bytes
Fixed Size 2255992 bytes
Variable Size 2348811144 bytes
Database Buffers 201326592 bytes
Redo Buffers 19750912 bytes
Database mounted.
Database opened.
SQL> show parameter pfile
spfile string /u01/app/oracle/product/11.2.4
/db_1/dbs/spfilemydb1.ora
SQL> select * from v$version;
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
PL/SQL Release 11.2.0.4.0 - Production
CORE 11.2.0.4.0 Production
TNS for Linux: Version 11.2.0.4.0 - Production
NLSRTL Version 11.2.0.4.0 - Production
SQL>
继续 11.2.0.4.3
[oracle@my2950 18522509]$ cd /var/ftp/pub/software/oracle11G/x86_64/112040/18522509[oracle@my2950 18522509]$ pwd/var/ftp/pub/software/oracle11G/x86_64/112040/18522509[oracle@my2950 18522509]$ lltotal 56drwxrwxr-x 4 oracle dba 28 Jun 30 23:15 17478514/drwxrwxr-x 4 oracle dba 28 Jun 30 23:15 18031668/drwxrwxr-x 4 oracle dba 28 Jun 30 23:15 18522509/-rw-r--r-- 1 oracle dba 2871 Jun 30 23:15 patchmd.xml-rw-rw-r-- 1 oracle dba 48527 Jul 14 21:32 README.html-rw-r--r-- 1 oracle dba 21 Jun 30 23:15 README.txt[oracle@my2950 18522509]$
打开README.html,里边有步骤介绍
文件介绍opatch版本必须是11.2.0.3.6或者更新,看看现在版本是多少
[oracle@my2950 OPatch]$ pwd/u01/app/oracle/product/11.2.4/db_1/OPatch[oracle@my2950 OPatch]$ ./opatch versionOPatch Version: 11.2.0.3.4
OPatch succeeded.[oracle@my2950 OPatch]$
需要下载opatch工具,参考How To Download And Install The Latest OPatch Version (Doc ID 274526.1)
下载回来,
备份原来的optach[oracle@my2950 OPatch]$ cd ../[oracle@my2950 db_1]$ mv OPatch OPatch.11.2.0.3.4[oracle@my2950 db_1]$[oracle@my2950 db_1]$ ll|grep OPatchdrwxr-xr-x 8 oracle dba 4096 Jul 31 14:06 OPatch.11.2.0.3.4[oracle@my2950 db_1]$
[oracle@my2950 db_1]$ cp /var/ftp/pub/software/oracle11G/x86_64/112040/optach/p6880880_112000_Linux-x86-64.zip ./[oracle@my2950 db_1]$ unzip p6880880_112000_Linux-x86-64.zipArchive: p6880880_112000_Linux-x86-64.zip
[oracle@my2950 db_1]$ ll|grep OPatchdrwxr-xr-x 8 oracle dba 4096 Dec 14 2013 OPatchdrwxr-xr-x 8 oracle dba 4096 Jul 31 14:06 OPatch.11.2.0.3.4[oracle@my2950 db_1]$ ./OPatch/opopatch opatchdiag opatch.ini opatchprereqs/opatch.bat opatchdiag.bat opatch.pl oplan/[oracle@my2950 db_1]$ ./OPatch/opatch versionOPatch Version: 11.2.0.3.6
OPatch succeeded.[oracle@my2950 db_1]$
修改环境变量,把 $ORACLE_HOME/OPatch 添加到PATH里
[oracle@my2950 18522509]$ opatch versionOPatch Version: 11.2.0.3.6
OPatch succeeded.[oracle@my2950 18522509]$
1,检查 PSU patch冲突
[oracle@my2950 18522509]$ opatch prereq CheckConflictAgainstOHWithDetail -ph ./Oracle Interim Patch Installer version 11.2.0.3.6Copyright (c) 2013, Oracle Corporation. All rights reserved.
PREREQ session
Oracle Home : /u01/app/oracle/product/11.2.4/db_1Central Inventory : /u01/app/oracle/oraInventoryfrom : /u01/app/oracle/product/11.2.4/db_1/oraInst.locOPatch version : 11.2.0.3.6OUI version : 11.2.0.4.0Log file location : /u01/app/oracle/product/11.2.4/db_1/cfgtoollogs/opatch/opatch2014-08-01_15-16-26PM_1.log
Invoking prereq "checkconflictagainstohwithdetail"
Prereq "checkConflictAgainstOHWithDetail" passed.
OPatch succeeded.[oracle@my2950 18522509]$
2. 检查一下这个patch需不需停机
[oracle@my2950 18522509]$ pwd/var/ftp/pub/software/oracle11G/x86_64/112040/18522509[oracle@my2950 18522509]$ lltotal 56drwxrwxr-x 4 oracle dba 28 Jun 30 23:15 17478514/drwxrwxr-x 4 oracle dba 28 Jun 30 23:15 18031668/drwxrwxr-x 4 oracle dba 28 Jun 30 23:15 18522509/-rw-r--r-- 1 oracle dba 2871 Jun 30 23:15 patchmd.xml-rw-rw-r-- 1 oracle dba 48527 Jul 14 21:32 README.html-rw-r--r-- 1 oracle dba 21 Jun 30 23:15 README.txt[oracle@my2950 18522509]$ more 18522509/etc/config/inventory.xml |grep instalce_[oracle@my2950 18522509]$ more 18522509/etc/config/inventory.xml |grep instance_true [oracle@my2950 18522509]$
需要停机,文档也说了需要停机.
关闭实例和监听
[oracle@my2950 18522509]$ pwd/var/ftp/pub/software/oracle11G/x86_64/112040/18522509[oracle@my2950 18522509]$ lltotal 56drwxrwxr-x 4 oracle dba 28 Jun 30 23:15 17478514/drwxrwxr-x 4 oracle dba 28 Jun 30 23:15 18031668/drwxrwxr-x 4 oracle dba 28 Jun 30 23:15 18522509/-rw-r--r-- 1 oracle dba 2871 Jun 30 23:15 patchmd.xml-rw-rw-r-- 1 oracle dba 48527 Jul 14 21:32 README.html-rw-r--r-- 1 oracle dba 21 Jun 30 23:15 README.txt[oracle@my2950 18522509]$ opatch applyOracle Interim Patch Installer version 11.2.0.3.6Copyright (c) 2013, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/11.2.4/db_1Central Inventory : /u01/app/oracle/oraInventoryfrom : /u01/app/oracle/product/11.2.4/db_1/oraInst.locOPatch version : 11.2.0.3.6OUI version : 11.2.0.4.0Log file location : /u01/app/oracle/product/11.2.4/db_1/cfgtoollogs/opatch/opatch2014-08-01_15-32-54PM_1.log
Verifying environment and performing prerequisite checks...Prerequisite check "CheckActiveFilesAndExecutables" failed.The details are:
Following executables are active :/u01/app/oracle/product/11.2.4/db_1/lib/libclntsh.so.11.1UtilSession failed: Prerequisite check "CheckActiveFilesAndExecutables" failed.Log file location: /u01/app/oracle/product/11.2.4/db_1/cfgtoollogs/opatch/opatch2014-08-01_15-32-54PM_1.log
OPatch failed with error code 73[oracle@my2950 18522509]$
貌似有进程没关干净,退出所有客户端,重开一个
[oracle@my2950 ~]$ opatch apply /var/ftp/pub/software/oracle11G/x86_64/112040/18522509 -verbose
Composite patch 18522509 successfully applied.OPatch Session completed with warnings.Log file location: /u01/app/oracle/product/11.2.4/db_1/cfgtoollogs/opatch/opatch2014-08-01_15-39-32PM_1.log
OPatch completed with warnings.[oracle@my2950 ~]$
[oracle@my2950 ~]$ opatch lsinventoryOracle Interim Patch Installer version 11.2.0.3.6Copyright (c) 2013, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/11.2.4/db_1Central Inventory : /u01/app/oracle/oraInventoryfrom : /u01/app/oracle/product/11.2.4/db_1/oraInst.locOPatch version : 11.2.0.3.6OUI version : 11.2.0.4.0Log file location : /u01/app/oracle/product/11.2.4/db_1/cfgtoollogs/opatch/opatch2014-08-01_15-43-24PM_1.log
Lsinventory Output file location : /u01/app/oracle/product/11.2.4/db_1/cfgtoollogs/opatch/lsinv/lsinventory2014-08-01_15-43-24PM.txt
--------------------------------------------------------------------------------Installed Top-level Products (1):
Oracle Database 11g 11.2.0.4.0There are 1 product(s) installed in this Oracle Home.
Interim patches (1) :
Patch 18522509 : applied on Fri Aug 01 15:41:31 CST 2014Unique Patch ID: 17604597Patch description: "Database Patch Set Update : 11.2.0.4.3 (18522509)"Created on 30 Jun 2014, 08:14:42 hrs PST8PDTSub-patch 18031668; "Database Patch Set Update : 11.2.0.4.2 (18031668)"Sub-patch 17478514; "Database Patch Set Update : 11.2.0.4.1 (17478514)"Bugs fixed:17752995, 17288409, 16392068, 17205719, 17811429, 17767676, 1761422717040764, 17381384, 17754782, 17726838, 13364795, 17311728, 1738919217006570, 17612828, 17284817, 17441661, 13853126, 17721717, 1364587518203837, 17390431, 16542886, 16992075, 16043574, 17446237, 1686342214565184, 17071721, 17610798, 17468141, 17786518, 17375354, 1739754518203838, 16956380, 17478145, 16360112, 17235750, 17394950, 1386682217478514, 17027426, 12905058, 14338435, 16268425, 13944971, 1824799114458214, 16929165, 17265217, 13498382, 17786278, 17227277, 1754697314054676, 17088068, 16314254, 17016369, 14602788, 17443671, 1622860416837842, 17332800, 17393683, 13951456, 16315398, 18744139, 1718690516850630, 17437634, 19049453, 17883081, 15861775, 17296856, 1827745416399083, 16855292, 18018515, 10136473, 16472716, 17050888, 1786567117325413, 14010183, 18554871, 17080436, 16613964, 17761775, 1672159417588480, 17551709, 17344412, 18681862, 15979965, 13609098, 1813969017501491, 17239687, 17752121, 17602269, 18203835, 17297939, 1731352516731148, 17811456, 14133975, 17600719, 17385178, 17571306, 1645016917655634, 18094246, 17892268, 17165204, 17011832, 17648596, 1678570817477958, 16180763, 16220077, 17465741, 17174582, 18522509, 1606990116285691, 17323222, 18180390, 17393915, 16875449, 18096714, 1723851117596908, 17811438, 17811447, 18031668, 16912439, 18061914, 1762242717545847, 16943711, 17082359, 17346671, 18996843, 14852021, 1778358816618694, 17672719, 17614134, 17341326, 17546761, 17716305--------------------------------------------------------------------------------OPatch succeeded.[oracle@my2950 ~]
Loading Modified SQL Files into the Database
[oracle@my2950 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Fri Aug 1 15:46:29 2014
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startupORACLE instance started.
Total System Global Area 2572144640 bytesFixed Size 2255992 bytesVariable Size 2348811144 bytesDatabase Buffers 201326592 bytesRedo Buffers 19750912 bytesDatabase mounted.Database opened.SQL> @?/rdbms/admin/catbundle.sql psu apply
SQL> select * from dba_registry_history;
ACTION_TIME ACTION NAMESPACE VERSION ID BUNDLE_SERIES COMMENTS------------------------------ ------ ---------- ---------- ---------- --------------- ---------------18-SEP-11 06.02.59.465921 PM APPLY SERVER 11.2.0.3 0 PSU Patchset 11.2.0.2.0
04-JUN-13 06.10.26.569884 PM APPLY SERVER 11.2.0.3 0 PSU Patchset 11.2.0.2.0
01-AUG-14 02.16.12.327067 PM VIEW I 8289601 view invalidatiNVALID onATE
01-AUG-14 02.16.12.409109 PM UPGRAD SERVER 11.2.0.4.0 Upgraded from 1
ACTION_TIME ACTION NAMESPACE VERSION ID BUNDLE_SERIES COMMENTS------------------------------ ------ ---------- ---------- ---------- --------------- ---------------E 1.2.0.3.0
01-AUG-14 02.51.43.342447 PM APPLY SERVER 11.2.0.4 0 PSU Patchset 11.2.0.2.0
01-AUG-14 03.47.52.700232 PM APPLY SERVER 11.2.0.4 3 PSU PSU 11.2.0.4.3
6 rows selected.
SQL>
卸载补丁
关闭实例和监听
[oracle@my2950 ~]$ opatch rollback -id 18522509Oracle Interim Patch Installer version 11.2.0.3.6Copyright (c) 2013, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/11.2.4/db_1Central Inventory : /u01/app/oracle/oraInventoryfrom : /u01/app/oracle/product/11.2.4/db_1/oraInst.locOPatch version : 11.2.0.3.6OUI version : 11.2.0.4.0Log file location : /u01/app/oracle/product/11.2.4/db_1/cfgtoollogs/opatch/18522 509_Aug_01_2014_15_57_50/rollback2014-08-01_15-57-50PM_1.log
Patches will be rolled back in the following order:18522509 18031668 17478514The following patch(es) will be rolled back: 18522509 18031668 17478514Sub-patches of a composite series are being rolled back. The system will be retu rned to a state where all subpatches are rolled back.The following bug fixes will be removed: 17596908,17174582,17648596,17011832,136 45875,18096714,17752995,13951456,17655634,16992075,17786518,17393915,13498382,13 609098,15861775,16360112,17571306,17477958,16392068,17006570,14458214,14602788,1 7397545,16268425,17165204,14565184,17883081,18522509,18018515,17672719,16315398, 13853126,18554871,17767676,17588480,16542886,17227277,16855292,14054676,17786278 ,17311728,18247991,18277454,15979965,18681862,18996843,17754782,17892268,1761413 4,16314254,17478145,18061914,19049453,17238511,17600719,17381384,18744139,172979 39,17783588,17716305,16180763,17545847,18203838,17393683,16863422,17389192,17394 950,16731148,17761775,10136473,17726838,17186905,17441661,17325413,18203835,1336 4795,17050888,16472716,17622427,17546761,17468141,17040764,14010183,16837842,162 28604,17205719,17284817,17346671,18180390,17235750,14133975,17721717,17082359,17 602269,17071721,16613964,16929165,16043574,17080436,17265217,17865671,14852021,1 6399083,16943711,17375354,17546973,16785708,16956380,18094246,17614227,18031668, 17313525,16912439,17385178,16618694,16220077,17016369,18203837,17027426,17341326 ,18139690,17437634,16875449,17465741,17752121,17344412,17296856,17390431,1433843 5,17323222,16850630,17551709,13944971,17811447,13866822,17811429,16069901,167215 94,17443671,17478514,17612828,17610798,17239687,17501491,17446237,16450169,17811 438,17288409,17811456,12905058,17088068,16285691,17332800
Please shutdown Oracle instances running out of this ORACLE_HOME on the local sy stem.(Oracle Home = '/u01/app/oracle/product/11.2.4/db_1')
Is the local system ready for patching? [y|n]yUser Responded with: Y
Rolling back patch 18522509...
RollbackSession rolling back interim patch '18522509' from OH '/u01/app/oracle/p roduct/11.2.4/db_1'
Patching component oracle.rdbms.rsf, 11.2.0.4.0...
Patching component oracle.rdbms, 11.2.0.4.0...Deleting "kzradmape.o" from archive "/u01/app/oracle/product/11.2.4/db_1/lib/lib server11.a"
Patching component oracle.precomp.common, 11.2.0.4.0...
Patching component oracle.rdbms.rman, 11.2.0.4.0...
Patching component oracle.rdbms.dbscripts, 11.2.0.4.0...
Patching component oracle.rdbms.deconfig, 11.2.0.4.0...RollbackSession removing interim patch '18522509' from inventory
Rolling back patch 18031668...
RollbackSession rolling back interim patch '18031668' from OH '/u01/app/oracle/p roduct/11.2.4/db_1'
Patching component oracle.rdbms, 11.2.0.4.0...
Patching component oracle.rdbms.rsf, 11.2.0.4.0...
Patching component oracle.ldap.rsf, 11.2.0.4.0...
Patching component oracle.rdbms.crs, 11.2.0.4.0...
Patching component oracle.precomp.common, 11.2.0.4.0...
Patching component oracle.ldap.rsf.ic, 11.2.0.4.0...
Patching component oracle.rdbms.deconfig, 11.2.0.4.0...
Patching component oracle.rdbms.dbscripts, 11.2.0.4.0...
Patching component oracle.rdbms.rman, 11.2.0.4.0...RollbackSession removing interim patch '18031668' from inventory
Rolling back patch 17478514...
RollbackSession rolling back interim patch '17478514' from OH '/u01/app/oracle/p roduct/11.2.4/db_1'
Patching component oracle.rdbms, 11.2.0.4.0...
Patching component oracle.rdbms.rsf, 11.2.0.4.0...
Patching component oracle.sdo, 11.2.0.4.0...
Patching component oracle.sysman.agent, 10.2.0.4.5...
Patching component oracle.xdk, 11.2.0.4.0...
Patching component oracle.rdbms.dbscripts, 11.2.0.4.0...
Patching component oracle.sdo.locator, 11.2.0.4.0...
Patching component oracle.nlsrtl.rsf, 11.2.0.4.0...
Patching component oracle.xdk.rsf, 11.2.0.4.0...
Patching component oracle.rdbms.rman, 11.2.0.4.0...RollbackSession removing interim patch '17478514' from inventory
OPatch found the word "warning" in the stderr of the make command.Please look at this stderr. You can re-run this make command.Stderr output:ins_emagent.mk:113: warning: overriding commands for target `nmosudo'ins_emagent.mk:52: warning: ignoring old commands for target `nmosudo'/u01/app/oracle/product/11.2.4/db_1/sysman/lib/ins_emagent.mk:113: warning: over riding commands for target `nmosudo'/u01/app/oracle/product/11.2.4/db_1/sysman/lib/ins_emagent.mk:52: warning: ignor ing old commands for target `nmosudo'
OPatch Session completed with warnings.Log file location: /u01/app/oracle/product/11.2.4/db_1/cfgtoollogs/opatch/185225 09_Aug_01_2014_15_57_50/rollback2014-08-01_15-57-50PM_1.log
OPatch completed with warnings.[oracle@my2950 ~]$
[oracle@my2950 ~]$ opatch lsinventoryOracle Interim Patch Installer version 11.2.0.3.6Copyright (c) 2013, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/11.2.4/db_1Central Inventory : /u01/app/oracle/oraInventoryfrom : /u01/app/oracle/product/11.2.4/db_1/oraInst.locOPatch version : 11.2.0.3.6OUI version : 11.2.0.4.0Log file location : /u01/app/oracle/product/11.2.4/db_1/cfgtoollogs/opatch/opatch2014-08-01_16-00-27PM_1.log
Lsinventory Output file location : /u01/app/oracle/product/11.2.4/db_1/cfgtoollogs/opatch/lsinv/lsinventory2014-08-01_16-00-27PM.txt
--------------------------------------------------------------------------------Installed Top-level Products (1):
Oracle Database 11g 11.2.0.4.0There are 1 product(s) installed in this Oracle Home.
There are no Interim patches installed in this Oracle Home.
--------------------------------------------------------------------------------
OPatch succeeded.[oracle@my2950 ~]$
[oracle@my2950 admin]$ pwd/u01/app/oracle/product/11.2.4/db_1/rdbms/admin[oracle@my2950 admin]$ ll|grep catbundle-rw-r--r-- 1 oracle dba 1307 Apr 8 2013 catbundleapply.sql-rw-r--r-- 1 oracle dba 673 Apr 8 2013 catbundle_exa.sql-rw-r--r-- 1 oracle dba 1220 Aug 1 15:47 catbundle_PSU_MYDB1_APPLY.sql-rw-r--r-- 1 oracle dba 1269 Aug 1 15:47 catbundle_PSU_MYDB1_ROLLBACK.sql-rw-r--r-- 1 oracle dba 669 Apr 8 2013 catbundle_psu.sql-rw-r--r-- 1 oracle dba 29922 Aug 8 2011 catbundle.sql[oracle@my2950 admin]$
[oracle@my2950 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Fri Aug 1 16:00:49 2014
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startupORACLE instance started.
Total System Global Area 2572144640 bytesFixed Size 2255992 bytesVariable Size 2348811144 bytesDatabase Buffers 201326592 bytesRedo Buffers 19750912 bytesDatabase mounted.Database opened.SQL> @?/rdbms/admin/catbundle_PSU_MYDB1_ROLLBACK.sql psu apply
SQL> select * from dba_registry_history;
ACTION_TIME ACTION NAMESPACE VERSION ID BUNDLE_SERIES COMMENTS------------------------------ ------ ---------- ---------- ---------- --------------- ---------------18-SEP-11 06.02.59.465921 PM APPLY SERVER 11.2.0.3 0 PSU Patchset 11.2.0.2.0
04-JUN-13 06.10.26.569884 PM APPLY SERVER 11.2.0.3 0 PSU Patchset 11.2.0.2.0
01-AUG-14 02.16.12.327067 PM VIEW I 8289601 view invalidatiNVALID onATE
01-AUG-14 02.16.12.409109 PM UPGRAD SERVER 11.2.0.4.0 Upgraded from 1E 1.2.0.3.0
01-AUG-14 02.51.43.342447 PM APPLY SERVER 11.2.0.4 0 PSU Patchset 11.2.0.2.0
01-AUG-14 03.47.52.700232 PM APPLY SERVER 11.2.0.4 3 PSU PSU 11.2.0.4.301-AUG-14 04.01.54.819027 PM ROLLBA SERVER 11.2.0.4 3 PSU PSU 11.2.0.4.3CK
01-AUG-14 04.01.58.649253 PM APPLY SERVER 11.2.0.4 0 PSU Patchset 11.2.0.2.0
8 rows selected.
SQL>
再次打补丁
关闭实例和监听
opatch apply /var/ftp/pub/software/oracle11G/x86_64/112040/18522509
[oracle@my2950 ~]$ opatch apply /var/ftp/pub/software/oracle11G/x86_64/112040/18522509Oracle Interim Patch Installer version 11.2.0.3.6Copyright (c) 2013, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/11.2.4/db_1Central Inventory : /u01/app/oracle/oraInventoryfrom : /u01/app/oracle/product/11.2.4/db_1/oraInst.locOPatch version : 11.2.0.3.6OUI version : 11.2.0.4.0Log file location : /u01/app/oracle/product/11.2.4/db_1/cfgtoollogs/opatch/opatch2014-08-01_16-05-35PM_1.log
Verifying environment and performing prerequisite checks...OPatch continues with these patches: 17478514 18031668 18522509
Do you want to proceed? [y|n]yUser Responded with: YAll checks passed.Provide your email address to be informed of security issues, install andinitiate Oracle Configuration Manager. Easier for you if you use your MyOracle Support Email address/User Name.Visit for details.Email address/User Name:
You have not provided an email address for notification of security issues.Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]: y
Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.(Oracle Home = '/u01/app/oracle/product/11.2.4/db_1')
Is the local system ready for patching? [y|n]yUser Responded with: YBacking up files...Applying sub-patch '17478514' to OH '/u01/app/oracle/product/11.2.4/db_1'
Patching component oracle.rdbms, 11.2.0.4.0...
Patching component oracle.rdbms.rsf, 11.2.0.4.0...
Patching component oracle.sdo, 11.2.0.4.0...
Patching component oracle.sysman.agent, 10.2.0.4.5...
Patching component oracle.xdk, 11.2.0.4.0...
Patching component oracle.rdbms.dbscripts, 11.2.0.4.0...
Patching component oracle.sdo.locator, 11.2.0.4.0...
Patching component oracle.nlsrtl.rsf, 11.2.0.4.0...
Patching component oracle.xdk.rsf, 11.2.0.4.0...
Patching component oracle.rdbms.rman, 11.2.0.4.0...
Verifying the update...Applying sub-patch '18031668' to OH '/u01/app/oracle/product/11.2.4/db_1'
Patching component oracle.rdbms, 11.2.0.4.0...
Patching component oracle.rdbms.rsf, 11.2.0.4.0...
Patching component oracle.ldap.rsf, 11.2.0.4.0...
Patching component oracle.rdbms.crs, 11.2.0.4.0...
Patching component oracle.precomp.common, 11.2.0.4.0...
Patching component oracle.ldap.rsf.ic, 11.2.0.4.0...
Patching component oracle.rdbms.deconfig, 11.2.0.4.0...
Patching component oracle.rdbms.dbscripts, 11.2.0.4.0...
Patching component oracle.rdbms.rman, 11.2.0.4.0...
Verifying the update...Applying sub-patch '18522509' to OH '/u01/app/oracle/product/11.2.4/db_1'
Patching component oracle.rdbms.rsf, 11.2.0.4.0...
Patching component oracle.rdbms, 11.2.0.4.0...
Patching component oracle.precomp.common, 11.2.0.4.0...
Patching component oracle.rdbms.rman, 11.2.0.4.0...
Patching component oracle.rdbms.dbscripts, 11.2.0.4.0...
Patching component oracle.rdbms.deconfig, 11.2.0.4.0...
Verifying the update...
OPatch found the word "warning" in the stderr of the make command.Please look at this stderr. You can re-run this make command.Stderr output:ins_emagent.mk:113: warning: overriding commands for target `nmosudo'ins_emagent.mk:52: warning: ignoring old commands for target `nmosudo'/u01/app/oracle/product/11.2.4/db_1/sysman/lib/ins_emagent.mk:113: warning: overriding commands for target `nmosudo'/u01/app/oracle/product/11.2.4/db_1/sysman/lib/ins_emagent.mk:52: warning: ignoring old commands for target `nmosudo'
Composite patch 18522509 successfully applied.OPatch Session completed with warnings.Log file location: /u01/app/oracle/product/11.2.4/db_1/cfgtoollogs/opatch/opatch2014-08-01_16-05-35PM_1.log
OPatch completed with warnings.[oracle@my2950 ~]$
[oracle@my2950 ~]$ opatch lsinventoryOracle Interim Patch Installer version 11.2.0.3.6Copyright (c) 2013, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/11.2.4/db_1Central Inventory : /u01/app/oracle/oraInventoryfrom : /u01/app/oracle/product/11.2.4/db_1/oraInst.locOPatch version : 11.2.0.3.6OUI version : 11.2.0.4.0Log file location : /u01/app/oracle/product/11.2.4/db_1/cfgtoollogs/opatch/opatch2014-08-01_16-07-42PM_1.log
Lsinventory Output file location : /u01/app/oracle/product/11.2.4/db_1/cfgtoollogs/opatch/lsinv/lsinventory2014-08-01_16-07-42PM.txt
--------------------------------------------------------------------------------Installed Top-level Products (1):
Oracle Database 11g 11.2.0.4.0There are 1 product(s) installed in this Oracle Home.
Interim patches (1) :
Patch 18522509 : applied on Fri Aug 01 16:06:31 CST 2014Unique Patch ID: 17604597Patch description: "Database Patch Set Update : 11.2.0.4.3 (18522509)"Created on 30 Jun 2014, 08:14:42 hrs PST8PDTSub-patch 18031668; "Database Patch Set Update : 11.2.0.4.2 (18031668)"Sub-patch 17478514; "Database Patch Set Update : 11.2.0.4.1 (17478514)"Bugs fixed:17752995, 17288409, 16392068, 17205719, 17811429, 17767676, 1761422717040764, 17381384, 17754782, 17726838, 13364795, 17311728, 1738919217006570, 17612828, 17284817, 17441661, 13853126, 17721717, 1364587518203837, 17390431, 16542886, 16992075, 16043574, 17446237, 1686342214565184, 17071721, 17610798, 17468141, 17786518, 17375354, 1739754518203838, 16956380, 17478145, 16360112, 17235750, 17394950, 1386682217478514, 17027426, 12905058, 14338435, 16268425, 13944971, 1824799114458214, 16929165, 17265217, 13498382, 17786278, 17227277, 1754697314054676, 17088068, 16314254, 17016369, 14602788, 17443671, 1622860416837842, 17332800, 17393683, 13951456, 16315398, 18744139, 1718690516850630, 17437634, 19049453, 17883081, 15861775, 17296856, 1827745416399083, 16855292, 18018515, 10136473, 16472716, 17050888, 1786567117325413, 14010183, 18554871, 17080436, 16613964, 17761775, 1672159417588480, 17551709, 17344412, 18681862, 15979965, 13609098, 1813969017501491, 17239687, 17752121, 17602269, 18203835, 17297939, 1731352516731148, 17811456, 14133975, 17600719, 17385178, 17571306, 1645016917655634, 18094246, 17892268, 17165204, 17011832, 17648596, 1678570817477958, 16180763, 16220077, 17465741, 17174582, 18522509, 1606990116285691, 17323222, 18180390, 17393915, 16875449, 18096714, 1723851117596908, 17811438, 17811447, 18031668, 16912439, 18061914, 1762242717545847, 16943711, 17082359, 17346671, 18996843, 14852021, 1778358816618694, 17672719, 17614134, 17341326, 17546761, 17716305
--------------------------------------------------------------------------------
OPatch succeeded.[oracle@my2950 ~]$
[oracle@my2950 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Fri Aug 1 16:08:16 2014
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startupORACLE instance started.
Total System Global Area 2572144640 bytesFixed Size 2255992 bytesVariable Size 2348811144 bytesDatabase Buffers 201326592 bytesRedo Buffers 19750912 bytesDatabase mounted.Database opened.SQL> @?/rdbms/admin/catbundle.sql psu apply