rh4上oracle10201-10204,加打patch

fufuh2o發表於2009-12-10

SQL> select * from v$version;

BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
PL/SQL Release 10.2.0.1.0 - Production
CORE    10.2.0.1.0      Production
TNS for Linux: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production

SQL> ALTER USER DVSYS ACCOUNT UNLOCK
  2  ;
ALTER USER DVSYS ACCOUNT UNLOCK
           *
ERROR at line 1:
ORA-01918: user 'DVSYS' does not exist


SQL>

[oracle@vmoracle10g ~]$ emctl stop dbconsole
TZ set to PRC
 


Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0 
Copyright (c) 1996, 2005 Oracle Corporation.  All rights reserved.
http://vmoracle10g:5500/em/console/aboutApplication
Stopping Oracle Enterprise Manager 10g Database Control ...

 ...  Stopped.
[oracle@vmoracle10g ~]$
[oracle@vmoracle10g ~]$
[oracle@vmoracle10g ~]$
[oracle@vmoracle10g ~]$
[oracle@vmoracle10g ~]$ isqlplusctl stop
iSQL*Plus 10.2.0.1.0
Copyright (c) 2003, 2005, Oracle.  All rights reserved.
iSQL*Plus instance on port 5560 is not running ...
[oracle@vmoracle10g ~]$ lsnrctl stp

LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 09-DEC-2009 09:41:54

Copyright (c) 1991, 2005, Oracle.  All rights reserved.

NL-00853: undefined command "stp".  Try "help"
[oracle@vmoracle10g ~]$ lsnrctl stop

LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 09-DEC-2009 09:41:58

Copyright (c) 1991, 2005, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
TNS-12541: TNS:no listener
 TNS-12560: TNS:protocol adapter error
  TNS-00511: No listener
   Linux Error: 111: Connection refused
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=vmoracle10g)(PORT=1521)))
TNS-12541: TNS:no listener
 TNS-12560: TNS:protocol adapter error
  TNS-00511: No listener
   Linux Error: 111: Connection refused
[oracle@vmoracle10g ~]$ shutdown immediate;
-bash: shutdown: command not found
[oracle@vmoracle10g ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Wed Dec 9 09:43:03 2009

Copyright (c) 1982, 2005, Oracle.  All rights reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
[oracle@vmoracle10g ~]$ cd /u01
[oracle@vmoracle10g u01]$ ls
admin  database  flash_recovery_area  oracle  oradata  oraInventory  osw
[oracle@vmoracle10g u01]$ cd oracle
[oracle@vmoracle10g ~]$ ls
assistants        inventory  olap                          root.sh
bin               javavm     OPatch                        root.sh.old
cdata             jdbc       opmn                          slax
cfgtoollogs       jdk        oracore                       soft
clone             jlib       oraInst.loc                   sqlj
config            jre        ord                           sqlnet.log
crs               ldap       oui                           sqlplus
css               lib        owm                           srvm
ctx               log        p8833280_10204_Linux-x86.zip  sysman
dbs               md         perl                          uix
demo              mesg       plsql                         vmoracle10g_orcl
diagnostics       mgw        precomp                       vmoracle10g_xh
has               network    racg                          wwg
hs                nls        rdbms                         xdk
install           oc4j       README.html
install.platform  odbc       relnotes
[oracle@vmoracle10g ~]$ cd soft
[oracle@vmoracle10g soft]$ ls
Disk1  p6810189_10204_Linux-x86.zip  README.html
[oracle@vmoracle10g soft]$
[oracle@vmoracle10g soft]$ cd Disk1
[oracle@vmoracle10g Disk1]$ ls
10204_buglist.htm  install  patch_note.htm  response  runInstaller  stage
[oracle@vmoracle10g Disk1]$
[oracle@vmoracle10g Disk1]$ ./runInstaller
Starting Oracle Universal Installer...


圖形介面操作  (user oracle  .bash_profile中加了xmanager),遇到一個錯誤說sqlplus busy 雖然DB 已經DOWN 但SQLPLUS 還開著,關掉既可
**********************

 

 

 

***********************

[oracle@vmoracle10g Disk1]$ su - root
Password:

[root@vmoracle10g oracle]# sh /u01/oracle/root.sh
Running Oracle10 root.sh script...

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

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.

 

[root@vmoracle10g oracle]# su - oracle
[oracle@vmoracle10g ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.4.0 - Production on Wed Dec 9 09:52:37 2009

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.

Connected to an idle instance.

SQL> STARTUP UPGRADE

ORACLE instance started.

Total System Global Area  218103808 bytes
Fixed Size                  1266656 bytes
Variable Size              67111968 bytes
Database Buffers          142606336 bytes
Redo Buffers                7118848 bytes
Database mounted.
Database opened.


SQL> SPOOL upgrade_info.log
SQL> @?/rdbms/admin/utlu102i.sql

Oracle Database 10.2 Upgrade Information Utility    12-09-2009 09:53:57
.
**********************************************************************
Database:
**********************************************************************
--&gt name:       XH
--&gt version:    10.2.0.1.0
--&gt compatible: 10.2.0.1.0
--&gt blocksize:  8192
.
**********************************************************************
Tablespaces: [make adjustments in the current environment]
**********************************************************************
--&gt SYSTEM tablespace is adequate for the upgrade.
.... minimum required size: 486 MB
.... AUTOEXTEND additional space required: 6 MB
--&gt UNDOTBS1 tablespace is adequate for the upgrade.
.... minimum required size: 402 MB
.... AUTOEXTEND additional space required: 377 MB
--&gt SYSAUX tablespace is adequate for the upgrade.
.... minimum required size: 245 MB
.... AUTOEXTEND additional space required: 15 MB
--&gt TEMP tablespace is adequate for the upgrade.
.... minimum required size: 58 MB
.... AUTOEXTEND additional space required: 38 MB
.
**********************************************************************
Update Parameters: [Update Oracle Database 10.2 init.ora or spfile]
**********************************************************************
-- No update parameter changes are required.
.
**********************************************************************
Renamed Parameters: [Update Oracle Database 10.2 init.ora or spfile]
**********************************************************************
-- No renamed parameters found. No changes are required.
.
**********************************************************************
Obsolete/Deprecated Parameters: [Update Oracle Database 10.2 init.ora or spfile]
**********************************************************************
-- No obsolete parameters found. No changes are required
.
**********************************************************************
Components: [The following database components will be upgraded or installed]
**********************************************************************
--&gt Oracle Catalog Views         [upgrade]  VALID
--&gt Oracle Packages and Types    [upgrade]  VALID
--&gt JServer JAVA Virtual Machine [upgrade]  VALID
--&gt Oracle XDK for Java          [upgrade]  VALID
--&gt Oracle Java Packages         [upgrade]  VALID
--&gt Oracle Text                  [upgrade]  VALID
--&gt Oracle XML Database          [upgrade]  VALID
--&gt Oracle Workspace Manager     [upgrade]  VALID
--&gt Oracle Data Mining           [upgrade]  VALID
--&gt OLAP Analytic Workspace      [upgrade]  VALID
--&gt OLAP Catalog                 [upgrade]  VALID
--&gt Oracle OLAP API              [upgrade]  VALID
--&gt Oracle interMedia            [upgrade]  VALID
--&gt Spatial                      [upgrade]  VALID
--&gt Expression Filter            [upgrade]  VALID
--&gt EM Repository                [upgrade]  VALID
--&gt Rule Manager                 [upgrade]  VALID
.

PL/SQL procedure successfully completed.

SQL> SQL> SPOOL OFF


SQL> SPOOL patch.log
SQL> @?/rdbms/admin/catupgrd.sql

DOC>   consult the Oracle Database Upgrade Guide for troubleshooting
DOC>   recommendations.
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
SQL> shutdown immediate
SQL> startup
ORACLE instance started.

Total System Global Area  218103808 bytes
Fixed Size                  1266656 bytes
Variable Size             125832224 bytes
Database Buffers           83886080 bytes
Redo Buffers                7118848 bytes
Database mounted.
Database opened.
SQL>

SQL> @?/rdbms/admin/utlrp.sql

TIMESTAMP
--------------------------------------------------------------------------------
COMP_TIMESTAMP UTLRP_BGN  2009-12-09 10:24:23
DOC>   The following PL/SQL block invokes UTL_RECOMP to recompile invalid
DOC>   objects in the database. Recompilation time is proportional to


DOC> fixed before objects can compile successfully.
DOC>#

ERRORS DURING RECOMPILATION
---------------------------
                          0
SQL> select comp_name, version, status from sys.dba_registry;

COMP_NAME
--------------------------------------------------------------------------------
VERSION                        STATUS
------------------------------ -----------
Oracle Database Catalog Views
10.2.0.4.0                     VALID

Oracle Database Packages and Types
10.2.0.4.0                     VALID

Oracle Workspace Manager
10.2.0.4.3                     VALID

JServer JAVA Virtual Machine
10.2.0.4.0                     VALID

Oracle XDK
10.2.0.4.0                     VALID

Oracle Database Java Packages
10.2.0.4.0                     VALID

Oracle Expression Filter
10.2.0.4.0                     VALID

Oracle Data Mining
10.2.0.4.0                     VALID

Oracle Text
10.2.0.4.0                     VALID

Oracle XML Database
10.2.0.4.0                     VALID

Oracle Rule Manager
10.2.0.4.0                     VALID

Oracle interMedia
10.2.0.4.0                     VALID

OLAP Analytic Workspace
10.2.0.4.0                     VALID

Oracle OLAP API
10.2.0.4.0                     VALID

OLAP Catalog
10.2.0.4.0                     VALID

Spatial
10.2.0.4.0                     VALID

Oracle Enterprise Manager
10.2.0.4.0                     VALID

 

SQL> select * from v$version;

BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Prod
PL/SQL Release 10.2.0.4.0 - Production
CORE    10.2.0.4.0      Production
TNS for Linux: Version 10.2.0.4.0 - Production
NLSRTL Version 10.2.0.4.0 - Production

 

********************************************
打PSU  102042

[oracle@vmoracle10g ~]$ mv p8833280_10204_Linux-x86.zip  soft
[oracle@vmoracle10g ~]$ cd soft
[oracle@vmoracle10g soft]$ ll
total 1043872
drwxr-xrwx  5 oracle oinstall       4096 Feb 22  2008 Disk1
-rwxr-xrwx  1 root   root     1053748381 Dec  8 21:07 p6810189_10204_Linux-x86.zip
-rw-r--r--  1 root   root       13913510 Dec  8 20:59 p8833280_10204_Linux-x86.zip
-rw-r--r--  1 root   root         178473 Feb 26  2008 README.html
[oracle@vmoracle10g soft]$ unzip p8833280_10204_Linux-x86.zip
Archive:  p8833280_10204_Linux-x86.zip
   creating: 8833280/
   creating: 8833280/etc/

 

  inflating: 8833280/custom/scripts/post 
[oracle@vmoracle10g soft]$ ll
total 1043880
drwxrwxr-x  5 oracle oinstall       4096 Sep 10 18:48 8833280
drwxr-xrwx  5 oracle oinstall       4096 Feb 22  2008 Disk1
-rwxr-xrwx  1 root   root     1053748381 Dec  8 21:07 p6810189_10204_Linux-x86.zip
-rw-r--r--  1 root   root       13913510 Dec  8 20:59 p8833280_10204_Linux-x86.zip
-rw-r--r--  1 root   root         178473 Feb 26  2008 README.html
[oracle@vmoracle10g soft]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.4.0 - Production on Wed Dec 9 10:31:08 2009

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.

 


[oracle@vmoracle10g 8833280]$
[oracle@vmoracle10g 8833280]$ export PATH=$PATH:/usr/ccs/bin
[oracle@vmoracle10g 8833280]$
[oracle@vmoracle10g 8833280]$ opatch apply
-bash: opatch: command not found
[oracle@vmoracle10g 8833280]$
[oracle@vmoracle10g 8833280]$ cd $ORACLE_HOME

[oracle@vmoracle10g ~]$ ls
assistants   has               md           oui            slax
bin          hs                mesg         owm            soft
ccr          install           mgw          patch.log      sqlj
cdata        install.platform  network      perl           sqlnet.log
cfgtoollogs  inventory         nls          plsql          sqlplus
clone        javavm            oc4j         precomp        srvm
config       jdbc              odbc         racg           sysman
crs          jdk               olap         rdbms          uix
css          jlib              OPatch       README.html    upgrade_info.log
ctx          jre               opmn         relnotes       vmoracle10g_orcl
dbs          ldap              oracore      root.sh        vmoracle10g_xh
demo         lib               oraInst.loc  root.sh.old    wwg
diagnostics  log               ord          root.sh.old.1  xdk

[oracle@vmoracle10g ~]$ cd OPatch
[oracle@vmoracle10g OPatch]$ ll
total 76
drwxr-x---  2 oracle oinstall  4096 Dec  9 09:46 docs
-rw-r--r--  1 oracle oinstall 19263 Dec 26  2006 emdpatch.pl
drwxr-x---  2 oracle oinstall  4096 Dec  9 09:46 jlib
-rwxr-xr-x  1 oracle oinstall  6315 Nov 23  2007 opatch
-rw-r--r--  1 oracle oinstall    49 Dec  9 09:46 opatch.ini
-rw-r--r--  1 oracle oinstall  2571 Aug  8  2006 opatch.pl
drwxr-x---  4 oracle oinstall  4096 Dec  9 09:46 opatchprereqs
[oracle@vmoracle10g OPatch]$ pwd
/u01/oracle/OPatch
[oracle@vmoracle10g OPatch]$ export PATH=$PATH:/u01/oracle/OPatch
[oracle@vmoracle10g OPatch]$
[oracle@vmoracle10g OPatch]$ cd /u01/oracle/soft
[oracle@vmoracle10g soft]$ ls
8833280  p6810189_10204_Linux-x86.zip  README.html
Disk1    p8833280_10204_Linux-x86.zip
[oracle@vmoracle10g soft]$ cd 8833280
[oracle@vmoracle10g 8833280]$ opatch apply


echo $ORACLE_HOME

[root@vmoracle10g 8833280]# export ORACLE_HOME=/U01/oracle   ******
su - root

[root@vmoracle10g 8833280]# sh psu_root.sh
[root@vmoracle10g 8833280]#

 


cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> STARTUP
SQL> @catbundle.sql psu apply
SQL> QUIT

Run the pre-check script. (so named because it was initially released in CPUJan2008), which reports the maximum number of views and objects that may be recompiled:

cd $ORACLE_HOME/cpu/view_recompile
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> @recompile_precheck_jan2008cpu.sql
SQL> QUIT
The purpose of this step is to help you determine whether view recompilation should be done at the same time as the PSU install, or scheduled later.

If the database is not in a RAC environment, perform. this step and skip the next step. (If the database is in a RAC environment, go to the next step.)

Run the view recompilation script. Note that this script. is run with the database in upgrade mode, which restricts connections as SYSDBA.

cd $ORACLE_HOME/cpu/view_recompile
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> SHUTDOWN IMMEDIATE
SQL> STARTUP UPGRADE
SQL> @view_recompile_jan2008cpu.sql
SQL> SHUTDOWN;
SQL> STARTUP;
SQL> QUIT

 


SQL> SQL> shutdown immediate
shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> ORA-01012: not logged on
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@vmoracle10g view_recompile]$ cd $ORACLE_HOME/rdbms/admin
[oracle@vmoracle10g admin]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.4.0 - Production on Wed Dec 9 11:22:22 2009

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area  218103808 bytes
Fixed Size                  1266656 bytes
Variable Size             142609440 bytes
Database Buffers           67108864 bytes
Redo Buffers                7118848 bytes
Database mounted.
Database opened.
SQL> @utlrp.sql

 


[oracle@vmoracle10g admin]$ export PATH=$PATH:/u01/oracle/OPatch
[oracle@vmoracle10g admin]$
[oracle@vmoracle10g admin]$ opatch lsinventory
Invoking OPatch 10.2.0.4.2

Oracle Interim Patch Installer version 10.2.0.4.2
Copyright (c) 2007, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/oracle
Central Inventory : /u01/oraInventory
   from           : /etc/oraInst.loc
OPatch version    : 10.2.0.4.2
OUI version       : 10.2.0.4.0
OUI location      : /u01/oracle/oui
Log file location : /u01/oracle/cfgtoollogs/opatch/opatch2009-12-09_11-25-13AM.log

Lsinventory Output file location : /u01/oracle/cfgtoollogs/opatch/lsinv/lsinventory2009-12-09_11-25-13AM.txt

--------------------------------------------------------------------------------
Installed Top-level Products (2):

Oracle Database 10g                                                  10.2.0.1.0
Oracle Database 10g Release 2 Patch Set 3                            10.2.0.4.0
There are 2 products installed in this Oracle Home.


Interim patches (1) :

Patch  8833280      : applied on Wed Dec 09 10:48:47 CST 2009
   Created on 10 Sep 2009, 03:48:55 hrs PST8PDT
   Bugs fixed:
     6418420, 7835247, 7207654, 7592346, 6724797, 7936993, 7331867, 7552067
     5879114, 5457450, 8344348, 7272297, 7136866, 7196894, 7013124, 7196532
     8568395, 8309587, 7557226, 6509115, 8568397, 8568398, 6052226, 7424804
     6817593, 7553884, 6469211, 7527650, 8309592, 6945157, 6403091, 7552082
     6711853, 8304589, 8199266, 6327692, 5756769, 7460818, 6268409, 6687381
     6972843, 8230457, 6800507, 7027551, 6778714, 6200820, 6645719, 7393804
     3934160, 6683178, 6650256, 7528105, 6378112, 5126719, 7036453, 8426816
     8433026, 7270434, 7172531, 6451626, 8247855, 6874522, 7175513, 6960489
     7341598, 8576156, 6797677, 8342923, 5895190, 7150470, 7593835, 7356443
     7044551, 8227106, 4695511, 7298688, 5747462, 7197445, 5348308, 7937113
     8341623, 7569205, 8409848, 6163771, 6181488, 6375150, 7295780, 6345573
     7033630, 6954722, 7457766, 7309458, 8324577, 6840740, 6804746, 7375611
     8268054, 6988017, 7375613, 8344399, 7340448, 7375617, 8362683, 8251247
     5933656, 6599920, 7238230, 6452375, 6352003, 6833965, 7136489, 6610218
     7612639, 6392076, 5476236, 7609057, 7609058, 6374297, 6193945, 4693355
     7039896, 7432514, 7330909, 6952701, 7190270, 8287155, 7207932, 6802650
     7189447, 6615740, 7155655, 6749617, 7159505, 5727166, 5868257, 7173005
     6917874, 7691766, 7385253, 7225720, 7244238, 7363767, 7257770, 6941717
     8267348, 7710551, 7247217, 8328954, 6681695, 8702276, 8217011, 7661251
     6265559, 6823287, 6991626, 6954829, 5259835, 6500033, 5923486, 7432601
     8534387, 6653934, 7375644, 5147386, 7662491, 6490140, 8331466, 6070225
     5623467, 7396409, 6638558, 7038750, 6838714, 6870937, 7219752, 7263842
     7278117, 6882739, 5404871, 8836667, 8373286, 6678845, 6903051, 7936793
     7155248, 4966512, 7155249, 8836308, 8568402, 8568404, 8568405, 6343150
     6923450, 7643632, 8836671, 6145177, 6640411, 8347704, 8836675, 7155250
     7155251, 8836677, 7155252, 8836678, 7155253, 7155254, 8292378, 6219529
     7411865, 8227091, 8340379, 7276960, 5863926, 7123643, 6413089, 6596564
     6851438, 8836681, 8836683, 8836684, 7579469, 8836686, 7315642, 7494333
     8340383, 8340387, 6926448, 7600026, 6679303, 7197583, 7172752, 7008262
     7477934, 6733655, 6084232, 7499353, 6980597, 6799205, 6014513, 7140204
     7254987, 8833280, 7693128, 6120004, 6051177, 6858062, 7189645, 5630796
     7196863, 7378661, 7378735, 8290506, 6658484, 8309623, 7599944, 7125408
     6987790, 7257461, 5883691, 6919819, 7568556, 6955744, 6857917, 7149004
     6074620, 8283650, 7552042, 6506617, 8287504, 6271590, 5386204, 6976005
     7606362, 7043989, 8309632, 6870047, 8309637, 8309639, 6827260, 6752765
     6024730, 6628122, 8239142, 4637902, 8309642, 7345904, 6994160, 6919764
     7597354, 7523787, 6029179, 6455659, 5231155

 

--------------------------------------------------------------------------------

OPatch succeeded.
[oracle@vmoracle10g admin]$

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/12020513/viewspace-622158/,如需轉載,請註明出處,否則將追究法律責任。

相關文章