程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 數據庫知識 >> Oracle數據庫 >> Oracle教程 >> 單機oracle數據庫打最新11.2.0.4.7記錄

單機oracle數據庫打最新11.2.0.4.7記錄

編輯:Oracle教程

單機oracle數據庫打最新11.2.0.4.7記錄


操作系統版本:

[root@rh64 ~]# lsb_release -a
LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: RedHatEnterpriseServer
Description: Red Hat Enterprise Linux Server release 6.4 (Santiago)
Release: 6.4
Codename: Santiago
[root@rh64 ~]#

[oracle@rh64 soft]$ opatch lsinv

Oracle Interim Patch Installer version 11.2.0.3.6
Copyright (c) 2013, Oracle Corporation. All rights reserved.




Oracle Home : /u01/app/db11g/product/11.2.0/dbhome_1
Central Inventory : /u01/app/oraInventory
from : /u01/app/db11g/product/11.2.0/dbhome_1/oraInst.loc
OPatch version : 11.2.0.3.6
OUI version : 11.2.0.4.0
Log file location : /u01/app/db11g/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2015-07-21_01-18-11AM_1.log


Lsinventory Output file location : /u01/app/db11g/product/11.2.0/dbhome_1/cfgtoollogs/opatch/lsinv/lsinventory2015-07-21_01-18-11AM.txt


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


Oracle Database 11g 11.2.0.4.0
Oracle Database 11g Examples 11.2.0.1.0 ------------->>>>這個東東大家有興趣可以玩下,學perl與oracle結合使用的時候要用到
There are 2 product(s) installed in this Oracle Home.




Interim patches (1) :


Patch 20299013 : applied on Wed Apr 01 11:46:34 CST 2015
Unique Patch ID: 18573940
Patch description: "Database Patch Set Update : 11.2.0.4.6 (20299013)"
Created on 4 Mar 2015, 02:27:44 hrs PST8PDT
Sub-patch 19769489; "Database Patch Set Update : 11.2.0.4.5 (19769489)"
Sub-patch 19121551; "Database Patch Set Update : 11.2.0.4.4 (19121551)"
Sub-patch 18522509; "Database Patch Set Update : 11.2.0.4.3 (18522509)"
Sub-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:
17288409, 17798953, 18273830, 18607546, 17811429, 17205719, 20506699
17816865, 19972566, 17922254, 17754782, 16384983, 17726838, 13364795
16934803, 17311728, 17284817, 17441661, 17360606, 13645875, 18199537
16992075, 16542886, 17446237, 14015842, 17889549, 14565184, 19972569
17071721, 20299015, 17610798, 17375354, 17449815, 17397545, 19463897
18230522, 13866822, 17235750, 17982555, 16360112, 18317531, 17478514
19769489, 12905058, 14338435, 18235390, 13944971, 18641451, 20142975
17811789, 16929165, 18704244, 12747740, 18430495, 20506706, 17546973
14054676, 17088068, 17346091, 18264060, 17016369, 17042658, 17343514
14602788, 19972568, 19680952, 18471685, 19788842, 18508861, 14657740
17332800, 19211724, 13837378, 13951456, 16315398, 17186905, 18744139
19972564, 16850630, 18315328, 17437634, 19049453, 18673304, 17883081
19006849, 19915271, 19013183, 18641419, 17296856, 18674024, 18262334
17006183, 18277454, 16833527, 17232014, 16855292, 10136473, 17762296
14692762, 17705023, 18051556, 17865671, 17852463, 18554871, 17853498
19121551, 18334586, 19854503, 17551709, 19309466, 17588480, 19827973
17344412, 17842825, 18828868, 18681862, 18554763, 17390160, 18456514
16306373, 17025461, 13955826, 18139690, 11883252, 13609098, 17501491
17239687, 17752121, 17299889, 17602269, 19197175, 17889583, 18316692
17313525, 18673325, 12611721, 19544839, 18293054, 17242746, 18964939
17600719, 18191164, 19393542, 17571306, 18482502, 19466309, 17951233
17649265, 18094246, 19615136, 17040527, 17011832, 17165204, 18098207
16785708, 16870214, 17465741, 16180763, 17174582, 17477958, 12982566
16777840, 18522509, 20631274, 16091637, 17323222, 19463893, 16595641
16875449, 12816846, 16524926, 17237521, 18228645, 18282562, 17596908
19358317, 17811438, 17811447, 17945983, 18762750, 17156148, 18031668
16912439, 17184721, 16494615, 18061914, 17282229, 17545847, 18331850
18202441, 17082359, 18723434, 19554106, 17614134, 13558557, 17341326
14034426, 17891946, 18339044, 17716305, 19458377, 17752995, 16392068
19271443, 17891943, 18092127, 17258090, 17767676, 16668584, 18384391
17614227, 17040764, 16903536, 17381384, 14106803, 15913355, 18973907
18356166, 18673342, 17389192, 14084247, 16194160, 17612828, 17006570
20506715, 17721717, 13853126, 17390431, 18203837, 17570240, 14245531
16043574, 16863422, 17848897, 17877323, 18325460, 19727057, 17468141
17786518, 17912217, 16422541, 19972570, 17267114, 17037130, 18244962
18765602, 18203838, 18155762, 16956380, 16198143, 17246576, 17478145
17394950, 14829250, 18189036, 18641461, 18619917, 17835627, 17027426
16268425, 18247991, 19584068, 14458214, 18436307, 17265217, 17634921
13498382, 16692232, 17786278, 17227277, 16042673, 16314254, 17443671
18000422, 16228604, 16837842, 17571039, 17393683, 16344544, 17787259
18009564, 20074391, 14354737, 15861775, 18135678, 18614015, 16399083
18362222, 18018515, 16472716, 17835048, 17050888, 17936109, 14010183
17325413, 18747196, 17080436, 16613964, 17036973, 17761775, 16579084
16721594, 17082983, 18384537, 18280813, 20296213, 17302277, 16901385
18084625, 15979965, 15990359, 18203835, 17297939, 17811456, 16731148
13829543, 14133975, 17215560, 17694209, 18091059, 17385178, 8322815
17586955, 18441944, 17201159, 16450169, 9756271, 17655634, 19730508
17892268, 18868646, 17648596, 16220077, 16069901, 11733603, 16285691
17587063, 18180390, 16538760, 18193833, 17348614, 17393915, 17957017
17274537, 18096714, 17308789, 17238511, 18436647, 17824637, 14285317
19289642, 14764829, 17622427, 18328509, 16571443, 16943711, 14368995
18306996, 17346671, 14852021, 18996843, 17783588, 16618694, 17853456
18674047, 17672719, 18856999, 12364061, 18783224, 17851160, 17546761






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


OPatch succeeded.
[oracle@rh64 soft]$ cd 20760982/
[oracle@rh64 20760982]$ ls -ltr
total 88
drwxrwxr-x 4 oracle oinstall 4096 Jun 4 15:24 20760982
drwxr-xr-x 4 oracle oinstall 4096 Jun 4 15:24 19121551
drwxr-xr-x 4 oracle oinstall 4096 Jun 4 15:24 17478514
drwxr-xr-x 4 oracle oinstall 4096 Jun 4 15:24 18522509
drwxrwxr-x 4 oracle oinstall 4096 Jun 4 15:24 20299013
drwxrwxr-x 4 oracle oinstall 4096 Jun 4 15:24 19769489
drwxr-xr-x 4 oracle oinstall 4096 Jun 4 15:24 18031668
-rw-r--r-- 1 oracle oinstall 21 Jun 4 15:25 README.txt
-rw-r--r-- 1 oracle oinstall 3068 Jun 4 15:25 patchmd.xml
-rw-rw-r-- 1 oracle oinstall 49895 Jul 12 04:15 README.html
[oracle@rh64 20760982]$ opatch prereq CheckConflictAgainstOHWithDetail -ph ./
Oracle Interim Patch Installer version 11.2.0.3.6
Copyright (c) 2013, Oracle Corporation. All rights reserved.


PREREQ session


Oracle Home : /u01/app/db11g/product/11.2.0/dbhome_1
Central Inventory : /u01/app/oraInventory
from : /u01/app/db11g/product/11.2.0/dbhome_1/oraInst.loc
OPatch version : 11.2.0.3.6
OUI version : 11.2.0.4.0
Log file location : /u01/app/db11g/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2015-07-21_01-21-52AM_1.log


Invoking prereq "checkconflictagainstohwithdetail"


Prereq "checkConflictAgainstOHWithDetail" passed.


OPatch succeeded.
[oracle@rh64 20760982]$ opatch apply
Oracle Interim Patch Installer version 11.2.0.3.6
Copyright (c) 2013, Oracle Corporation. All rights reserved.




Oracle Home : /u01/app/db11g/product/11.2.0/dbhome_1
Central Inventory : /u01/app/oraInventory
from : /u01/app/db11g/product/11.2.0/dbhome_1/oraInst.loc
OPatch version : 11.2.0.3.6
OUI version : 11.2.0.4.0
Log file location : /u01/app/db11g/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2015-07-21_01-22-25AM_1.log


Verifying environment and performing prerequisite checks...
Prerequisite check "CheckActiveFilesAndExecutables" failed.
The details are:




Following executables are active :
/u01/app/db11g/product/11.2.0/dbhome_1/bin/oracle
UtilSession failed: Prerequisite check "CheckActiveFilesAndExecutables" failed.
Log file location: /u01/app/db11g/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2015-07-21_01-22-25AM_1.log


OPatch failed with error code 73

------->>>>>沒有關閉數據庫,需要關閉數據庫

[oracle@rh64 20760982]$ sqlplus / as sysdba


SQL*Plus: Release 11.2.0.4.0 Production on Tue Jul 21 01:22:45 2015


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




Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options


SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> quit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@rh64 20760982]$ ps -fu oracle
UID PID PPID C STIME TTY TIME CMD
oracle 1946 1945 0 01:13 pts/0 00:00:00 -bash
oracle 2127 2125 0 01:16 ? 00:00:00 /usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf
oracle 2446 1946 1 01:23 pts/0 00:00:00 ps -fu oracle
[oracle@rh64 20760982]$ opatch apply
Oracle Interim Patch Installer version 11.2.0.3.6
Copyright (c) 2013, Oracle Corporation. All rights reserved.




Oracle Home : /u01/app/db11g/product/11.2.0/dbhome_1
Central Inventory : /u01/app/oraInventory
from : /u01/app/db11g/product/11.2.0/dbhome_1/oraInst.loc
OPatch version : 11.2.0.3.6
OUI version : 11.2.0.4.0
Log file location : /u01/app/db11g/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2015-07-21_01-23-12AM_1.log


Verifying environment and performing prerequisite checks...
OPatch continues with these patches: 20760982


Do you want to proceed? [y|n]
y
User Responded with: Y
All checks passed.
Provide your email address to be informed of security issues, install and
initiate Oracle Configuration Manager. Easier for you if you use your My
Oracle Support Email address/User Name.
Visit http://www.oracle.com/support/policies.html 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/db11g/product/11.2.0/dbhome_1')




Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...
Applying sub-patch '20760982' to OH '/u01/app/db11g/product/11.2.0/dbhome_1'


Patching component oracle.sysman.console.db, 11.2.0.4.0...


Patching component oracle.rdbms, 11.2.0.4.0...


Patching component oracle.rdbms.dbscripts, 11.2.0.4.0...


Verifying the update...
Composite patch 20760982 successfully applied.
Log file location: /u01/app/db11g/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2015-07-21_01-23-12AM_1.log


OPatch succeeded.
[oracle@rh64 20760982]$ opatch lsinv
Oracle Interim Patch Installer version 11.2.0.3.6
Copyright (c) 2013, Oracle Corporation. All rights reserved.




Oracle Home : /u01/app/db11g/product/11.2.0/dbhome_1
Central Inventory : /u01/app/oraInventory
from : /u01/app/db11g/product/11.2.0/dbhome_1/oraInst.loc
OPatch version : 11.2.0.3.6
OUI version : 11.2.0.4.0
Log file location : /u01/app/db11g/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2015-07-21_01-27-11AM_1.log


Lsinventory Output file location : /u01/app/db11g/product/11.2.0/dbhome_1/cfgtoollogs/opatch/lsinv/lsinventory2015-07-21_01-27-11AM.txt


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


Oracle Database 11g 11.2.0.4.0
Oracle Database 11g Examples 11.2.0.1.0
There are 2 product(s) installed in this Oracle Home.




Interim patches (1) :


Patch 20760982 : applied on Tue Jul 21 01:25:38 CST 2015
Unique Patch ID: 18908105
Patch description: "Database Patch Set Update : 11.2.0.4.7 (20760982)"
Created on 4 Jun 2015, 00:23:20 hrs PST8PDT
Sub-patch 20299013; "Database Patch Set Update : 11.2.0.4.6 (20299013)"
Sub-patch 19769489; "Database Patch Set Update : 11.2.0.4.5 (19769489)"
Sub-patch 19121551; "Database Patch Set Update : 11.2.0.4.4 (19121551)"
Sub-patch 18522509; "Database Patch Set Update : 11.2.0.4.3 (18522509)"
Sub-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:
17288409, 21051852, 18607546, 17205719, 17811429, 17816865, 20506699
17922254, 17754782, 16934803, 13364795, 17311728, 17441661, 17284817
16992075, 17446237, 14015842, 19972569, 17449815, 17375354, 19463897
17982555, 17235750, 13866822, 18317531, 17478514, 18235390, 14338435
20803583, 13944971, 20142975, 17811789, 16929165, 18704244, 20506706
17546973, 20334344, 14054676, 17088068, 18264060, 17346091, 17343514
19680952, 18471685, 19211724, 13951456, 16315398, 18744139, 16850630
19049453, 18673304, 17883081, 19915271, 18641419, 18262334, 17006183
18277454, 16833527, 10136473, 18051556, 17865671, 17852463, 18554871
17853498, 18334586, 17588480, 17551709, 19827973, 17842825, 17344412
18828868, 17025461, 11883252, 13609098, 17239687, 17602269, 19197175
18316692, 17313525, 12611721, 19544839, 18964939, 17600719, 18191164
19393542, 17571306, 20777150, 18482502, 19466309, 17040527, 17165204
18098207, 16785708, 17174582, 16180763, 17465741, 16777840, 12982566
19463893, 12816846, 16875449, 17237521, 19358317, 17811438, 17811447
17945983, 18762750, 17184721, 16912439, 18061914, 17282229, 18331850
18202441, 17082359, 18723434, 19554106, 14034426, 18339044, 19458377
17752995, 17891943, 17258090, 17767676, 16668584, 18384391, 17040764
17381384, 15913355, 18356166, 14084247, 20506715, 13853126, 18203837
14245531, 16043574, 17848897, 17877323, 17468141, 17786518, 17912217
17037130, 18155762, 16956380, 17478145, 17394950, 18189036, 18641461
18619917, 17027426, 16268425, 19584068, 18436307, 17265217, 17634921
13498382, 20004087, 17443671, 18000422, 20004021, 17571039, 21067387
16344544, 18009564, 14354737, 18135678, 18614015, 18362222, 17835048
16472716, 17936109, 17050888, 17325413, 14010183, 18747196, 17761775
16721594, 17082983, 20067212, 21179898, 17302277, 18084625, 15990359
18203835, 17297939, 16731148, 17811456, 17215560, 13829543, 14133975
17694209, 18091059, 17385178, 8322815, 17586955, 17201159, 17655634
18331812, 19730508, 18868646, 17648596, 16220077, 16069901, 17348614
17393915, 17957017, 17274537, 18096714, 17308789, 18436647, 14285317
19289642, 14764829, 18328509, 17622427, 16943711, 14368995, 17346671
18996843, 17783588, 16618694, 17672719, 18856999, 18783224, 17851160
17546761, 17798953, 18273830, 19972566, 16384983, 17726838, 17360606
13645875, 18199537, 16542886, 17889549, 14565184, 17071721, 20299015
17610798, 20657441, 17397545, 18230522, 16360112, 19769489, 12905058
18641451, 12747740, 18430495, 17042658, 17016369, 14602788, 19972568
19788842, 18508861, 14657740, 17332800, 13837378, 19972564, 17186905
18315328, 19699191, 17437634, 19006849, 19013183, 17296856, 18674024
17232014, 16855292, 21051840, 14692762, 17762296, 17705023, 19121551
19854503, 19309466, 18681862, 20558005, 17390160, 18554763, 18456514
13955826, 16306373, 18139690, 17501491, 17299889, 17752121, 17889583
18673325, 18293054, 17242746, 17951233, 17649265, 18094246, 19615136
17011832, 16870214, 17477958, 18522509, 20631274, 16091637, 17323222
16595641, 16524926, 18228645, 18282562, 17596908, 17156148, 18031668
16494615, 17545847, 17614134, 13558557, 17341326, 17891946, 17716305
16392068, 19271443, 18092127, 17614227, 18440047, 14106803, 16903536
18973907, 18673342, 17389192, 16194160, 17006570, 17612828, 17721717
17570240, 17390431, 16863422, 18325460, 19727057, 16422541, 17267114
19972570, 18244962, 18765602, 18203838, 16198143, 17246576, 14829250
17835627, 18247991, 14458214, 21051862, 16692232, 17786278, 17227277
16042673, 16314254, 16228604, 16837842, 17393683, 17787259, 20331945
20074391, 15861775, 16399083, 18018515, 21051858, 18260550, 17036973
16613964, 17080436, 16579084, 18384537, 18280813, 20296213, 16901385
15979965, 18441944, 16450169, 9756271, 17892268, 11733603, 17587063
16285691, 16538760, 18180390, 18193833, 21051833, 17238511, 17824637
16571443, 18306996, 14852021, 18674047, 17853456, 12364061






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


OPatch succeeded.
[oracle@rh64 20760982]$ cd $ORACLE_HOME/rdbms/admin
[oracle@rh64 admin]$ sqlplus /nolog


SQL*Plus: Release 11.2.0.4.0 Production on Tue Jul 21 01:27:48 2015


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


SQL> CONNECT / AS SYSDBA
Connected to an idle instance.
SQL> STARTUP
ORACLE instance started.


Total System Global Area 839282688 bytes
Fixed Size 2257880 bytes
Variable Size 507513896 bytes
Database Buffers 327155712 bytes
Redo Buffers 2355200 bytes
Database mounted.
Database opened.
SQL> @catbundle.sql psu apply


PL/SQL procedure successfully completed.




Function created.




Function created.




PL/SQL procedure successfully completed.














PL/SQL procedure successfully completed.










Generating apply and rollback scripts...
Check the following file for errors:
/u01/app/cfgtoollogs/catbundle/catbundle_PSU_ORA11G_GENERATE_2015Jul21_01_28_33.log
Apply script: /u01/app/db11g/product/11.2.0/dbhome_1/rdbms/admin/catbundle_PSU_ORA11G_APPLY.sql
Rollback script: /u01/app/db11g/product/11.2.0/dbhome_1/rdbms/admin/catbundle_PSU_ORA11G_ROLLBACK.sql


PL/SQL procedure successfully completed.


Executing script file...








SQL> COLUMN spool_file NEW_VALUE spool_file NOPRINT
SQL> SELECT '/u01/app/cfgtoollogs/catbundle/' || 'catbundle_PSU_' || name || '_APPLY_' || TO_CHAR(SYSDATE, 'YYYYMonDD_hh24_mi_ss', 'NLS_DATE_LANGUAGE=''AMERICAN''') || '.log' AS spool_file FROM v$database;








SQL> SPOOL &spool_file
SQL> exec sys.dbms_registry.set_session_namespace('SERVER')


PL/SQL procedure successfully completed.


SQL> PROMPT Processing OLAP Analytic Workspace...
Processing OLAP Analytic Workspace...
SQL> ALTER SESSION SET current_schema = sys;


Session altered.


SQL> @?/rdbms/admin/bug20558005.sql
SQL> --
SQL> -- bug20558005.sql
SQL> --
SQL> -- Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
SQL> --
SQL> -- NAME
SQL> -- bug20558005.sql -- drop unneeded procedure
SQL> --
SQL> -- DESCRIPTION
SQL> -- patch 9968263 left a procedure behind. This file drops it.
SQL> --
SQL> -- NOTES
SQL> -- None
SQL> --
SQL> -- MODIFIED (MM/DD/YY)
SQL> -- jcarey 03/16/15 - Created
SQL>
SQL> drop procedure sys.drop_aw_elist_all;
drop procedure sys.drop_aw_elist_all
*
ERROR at line 1:
ORA-04043: object DROP_AW_ELIST_ALL does not exist




SQL>
SQL> PROMPT Processing Oracle Database Packages and Types...
Processing Oracle Database Packages and Types...
SQL> ALTER SESSION SET current_schema = sys;


Session altered.


SQL> @?/rdbms/admin/bug20876312_apply.sql
SQL> Rem
SQL> Rem $Header: rdbms/admin/bug20876312_apply.sql /st_rdbms_11.2.0.4.0dbpsu/2 2015/05/12 23:28:52 ratakuma Exp $
SQL> Rem
SQL> Rem bug20876312_apply.sql
SQL> Rem
SQL> Rem Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
SQL> Rem
SQL> Rem NAME
SQL> Rem bug20876312_apply.sql -
SQL> Rem
SQL> Rem DESCRIPTION
SQL> Rem
SQL> Rem
SQL> Rem NOTES
SQL> Rem
SQL> Rem
SQL> Rem BEGIN SQL_FILE_METADATA
SQL> Rem SQL_SOURCE_FILE: rdbms/admin/bug20876312_apply.sql
SQL> Rem SQL_SHIPPED_FILE:
SQL> Rem SQL_PHASE:
SQL> Rem SQL_STARTUP_MODE: NORMAL
SQL> Rem SQL_IGNORABLE_ERRORS: NONE
SQL> Rem SQL_CALLING_FILE:
SQL> Rem END SQL_FILE_METADATA
SQL> Rem
SQL> Rem MODIFIED (MM/DD/YY)
SQL> Rem ratakuma 04/17/15 - Created
SQL> Rem
SQL>
SQL> SET ECHO ON
SQL> SET FEEDBACK 1
SQL> SET NUMWIDTH 10
SQL> SET LINESIZE 80
SQL> SET TRIMSPOOL ON
SQL> SET TAB OFF
SQL> SET PAGESIZE 100
SQL>
SQL> create or replace view USER_AUDIT_POLICIES (OBJECT_NAME,
2 POLICY_NAME, POLICY_TEXT, POLICY_COLUMN, PF_SCHEMA,
3 PF_PACKAGE, PF_FUNCTION, ENABLED,
4 SEL, INS, UPD, DEL, AUDIT_TRAIL,
5 POLICY_COLUMN_OPTIONS)
6 as
7 SELECT OBJECT_NAME, POLICY_NAME, POLICY_TEXT, POLICY_COLUMN,
8 PF_SCHEMA, PF_PACKAGE, PF_FUNCTION, ENABLED,
9 SEL, INS, UPD, DEL, AUDIT_TRAIL, POLICY_COLUMN_OPTIONS
10 FROM DBA_AUDIT_POLICIES
11 WHERE OBJECT_SCHEMA = SYS_CONTEXT('USERENV','CURRENT_USER')
12 /


View created.


SQL>
SQL> create or replace view USER_AUDIT_POLICY_COLUMNS(OBJECT_SCHEMA, OBJECT_NAME,
2 POLICY_NAME, POLICY_COLUMN)
3 as
4 select OBJECT_SCHEMA, OBJECT_NAME,
5 POLICY_NAME, POLICY_COLUMN
6 from DBA_AUDIT_POLICY_COLUMNS
7 WHERE OBJECT_SCHEMA = SYS_CONTEXT('USERENV','CURRENT_USER')
8 /


View created.


SQL>
SQL> CREATE OR REPLACE VIEW user_scheduler_job_log
2 ( LOG_ID, LOG_DATE, OWNER, JOB_NAME, JOB_SUBNAME, JOB_CLASS, OPERATION, STATUS,
3 USER_NAME, CLIENT_ID, GLOBAL_UID, CREDENTIAL_OWNER, CREDENTIAL_NAME,
4 DESTINATION_OWNER, DESTINATION, ADDITIONAL_INFO)
5 AS
6 (SELECT
7 LOG_ID, LOG_DATE, OWNER,
8 DECODE(instr(e.NAME,'"'),0, e.NAME,substr(e.NAME,1,instr(e.NAME,'"')-1)),
9 DECODE(instr(e.NAME,'"'),0,NULL,substr(e.NAME,instr(e.NAME,'"')+1)),
10 co.NAME, OPERATION,e.STATUS, USER_NAME, CLIENT_ID, GUID,
11 decode(e.credential, NULL, NULL,
12 substr(e.credential, 1, instr(e.credential, '"')-1)),
13 decode(e.credential, NULL, NULL,
14 substr(e.credential, instr(e.credential, '"')+1,
15 length(e.credential) - instr(e.credential, '"'))),
16 decode(bitand(e.flags, 1), 0, NULL,
17 substr(e.destination, 1, instr(e.destination, '"')-1)),
18 decode(bitand(e.flags, 1), 0, e.destination,
19 substr(e.destination, instr(e.destination, '"')+1,
20 length(e.destination) - instr(e.destination, '"'))),
21 ADDITIONAL_INFO
22 FROM scheduler$_event_log e, obj$ co
23 WHERE e.type# = 66 and e.dbid is null and e.class_id = co.obj#(+)
24 AND owner = SYS_CONTEXT('USERENV','CURRENT_USER'))
25 /


View created.


SQL>
SQL> CREATE OR REPLACE VIEW user_scheduler_job_run_details
2 ( LOG_ID, LOG_DATE, OWNER, JOB_NAME, JOB_SUBNAME, STATUS, ERROR#, REQ_START_DATE,
3 ACTUAL_START_DATE, RUN_DURATION, INSTANCE_ID, SESSION_ID, SLAVE_PID,
4 CPU_USED, CREDENTIAL_OWNER, CREDENTIAL_NAME, DESTINATION_OWNER,
5 DESTINATION, ADDITIONAL_INFO)
6 AS
7 (SELECT
8 j.LOG_ID, j.LOG_DATE, e.OWNER,
9 DECODE(instr(e.NAME,'"'),0, e.NAME,substr(e.NAME,1,instr(e.NAME,'"')-1)),
10 DECODE(instr(e.NAME,'"'),0,NULL,substr(e.NAME,instr(e.NAME,'"')+1)),
11 e.STATUS, j.ERROR#, j.REQ_START_DATE, j.START_DATE, j.RUN_DURATION,
12 j.INSTANCE_ID, j.SESSION_ID, j.SLAVE_PID, j.CPU_USED,
13 decode(e.credential, NULL, NULL,
14 substr(e.credential, 1, instr(e.credential, '"')-1)),
15 decode(e.credential, NULL, NULL,
16 substr(e.credential, instr(e.credential, '"')+1,
17 length(e.credential) - instr(e.credential, '"'))),
18 decode(bitand(e.flags, 1), 0, NULL,
19 substr(e.destination, 1, instr(e.destination, '"')-1)),
20 decode(bitand(e.flags, 1), 0, e.destination,
21 substr(e.destination, instr(e.destination, '"')+1,
22 length(e.destination) - instr(e.destination, '"'))),
23 j.ADDITIONAL_INFO
24 FROM scheduler$_job_run_details j, scheduler$_event_log e
25 WHERE j.log_id = e.log_id
26 AND e.dbid is null
27 AND e.type# = 66
28 AND e.owner = SYS_CONTEXT('USERENV','CURRENT_USER'))
29 /


View created.


SQL>
SQL> CREATE OR REPLACE VIEW all_scheduler_job_log
2 ( LOG_ID, LOG_DATE, OWNER, JOB_NAME, JOB_SUBNAME, JOB_CLASS, OPERATION, STATUS,
3 USER_NAME, CLIENT_ID, GLOBAL_UID, CREDENTIAL_OWNER, CREDENTIAL_NAME,
4 DESTINATION_OWNER, DESTINATION, ADDITIONAL_INFO)
5 AS
6 (SELECT
7 e.LOG_ID, e.LOG_DATE, e.OWNER,
8 DECODE(instr(e.NAME,'"'),0, e.NAME,substr(e.NAME,1,instr(e.NAME,'"')-1)),
9 DECODE(instr(e.NAME,'"'),0,NULL,substr(e.NAME,instr(e.NAME,'"')+1)),
10 co.NAME, OPERATION, e.STATUS, e.USER_NAME, e.CLIENT_ID, e.GUID,
11 decode(e.credential, NULL, NULL,
12 substr(e.credential, 1, instr(e.credential, '"')-1)),
13 decode(e.credential, NULL, NULL,
14 substr(e.credential, instr(e.credential, '"')+1,
15 length(e.credential) - instr(e.credential, '"'))),
16 decode(bitand(e.flags, 1), 0, NULL,
17 substr(e.destination, 1, instr(e.destination, '"')-1)),
18 decode(bitand(e.flags, 1), 0, e.destination,
19 substr(e.destination, instr(e.destination, '"')+1,
20 length(e.destination) - instr(e.destination, '"'))),
21 e.ADDITIONAL_INFO
22 FROM scheduler$_event_log e, obj$ co
23 WHERE e.type# = 66 and e.dbid is null and e.class_id = co.obj#(+)
24 AND ( e.owner = SYS_CONTEXT('USERENV','CURRENT_USER')
25 or /* user has object privileges */
26 ( select jo.obj# from obj$ jo, user$ ju where
27 DECODE(instr(e.NAME,'"'),0, e.NAME,substr(e.NAME,1,instr(e.NAME,'"')-1)) = jo.name
28 and e.owner = ju.name and jo.owner# = ju.user#
29 and jo.subname is null and jo.type# = 66
30 ) in
31 ( select oa.obj#
32 from sys.objauth$ oa
33 where grantee# in ( select kzsrorol from x$kzsro )
34 )
35 or /* user has system privileges */
36 (exists ( select null from v$enabledprivs
37 where priv_number = -265 /* CREATE ANY JOB */
38 )
39 and e.owner!='SYS')
40 )
41 )
42 /


View created.


SQL>
SQL> CREATE OR REPLACE VIEW all_scheduler_job_run_details
2 ( LOG_ID, LOG_DATE, OWNER, JOB_NAME, JOB_SUBNAME, STATUS, ERROR#, REQ_START_DATE,
3 ACTUAL_START_DATE, RUN_DURATION, INSTANCE_ID, SESSION_ID, SLAVE_PID,
4 CPU_USED, CREDENTIAL_OWNER, CREDENTIAL_NAME, DESTINATION_OWNER,
5 DESTINATION, ADDITIONAL_INFO)
6 AS
7 (SELECT
8 j.LOG_ID, j.LOG_DATE, e.OWNER,
9 DECODE(instr(e.NAME,'"'),0, e.NAME,substr(e.NAME,1,instr(e.NAME,'"')-1)),
10 DECODE(instr(e.NAME,'"'),0,NULL,substr(e.NAME,instr(e.NAME,'"')+1)),
11 e.STATUS, j.ERROR#, j.REQ_START_DATE, j.START_DATE, j.RUN_DURATION,
12 j.INSTANCE_ID, j.SESSION_ID, j.SLAVE_PID, j.CPU_USED,
13 decode(e.credential, NULL, NULL,
14 substr(e.credential, 1, instr(e.credential, '"')-1)),
15 decode(e.credential, NULL, NULL,
16 substr(e.credential, instr(e.credential, '"')+1,
17 length(e.credential) - instr(e.credential, '"'))),
18 decode(bitand(e.flags, 1), 0, NULL,
19 substr(e.destination, 1, instr(e.destination, '"')-1)),
20 decode(bitand(e.flags, 1), 0, e.destination,
21 substr(e.destination, instr(e.destination, '"')+1,
22 length(e.destination) - instr(e.destination, '"'))),
23 j.ADDITIONAL_INFO
24 FROM scheduler$_job_run_details j, scheduler$_event_log e
25 WHERE j.log_id = e.log_id
26 AND e.type# = 66 and e.dbid is null
27 AND ( e.owner = SYS_CONTEXT('USERENV','CURRENT_USER')
28 or /* user has object privileges */
29 ( select jo.obj# from obj$ jo, user$ ju where
30 DECODE(instr(e.NAME,'"'),0, e.NAME,substr(e.NAME,1,instr(e.NAME,'"')-1)) = jo.name
31 and e.owner = ju.name and jo.owner# = ju.user#
32 and jo.subname is null and jo.type# = 66
33 ) in
34 ( select oa.obj#
35 from sys.objauth$ oa
36 where grantee# in ( select kzsrorol from x$kzsro )
37 )
38 or /* user has system privileges */
39 (exists ( select null from v$enabledprivs
40 where priv_number = -265 /* CREATE ANY JOB */
41 )
42 and e.owner!='SYS')
43 )
44 )
45 /


View created.


SQL>
SQL>
SQL> alter view USER_AUDIT_POLICIES compile;


View altered.


SQL> alter view USER_AUDIT_POLICY_COLUMNS compile;


View altered.


SQL> alter view user_scheduler_job_log compile;


View altered.


SQL> alter view user_scheduler_job_run_details compile;


View altered.


SQL> alter view all_scheduler_job_log compile;


View altered.


SQL> alter view all_scheduler_job_run_details compile;


View altered.


SQL>
SQL> ALTER SESSION SET current_schema = SYS;


Session altered.


SQL> PROMPT Updating registry...
Updating registry...
SQL> INSERT INTO registry$history
2 (action_time, action,
3 namespace, version, id,
4 bundle_series, comments)
5 VALUES
6 (SYSTIMESTAMP, 'APPLY',
7 SYS_CONTEXT('REGISTRY$CTX','NAMESPACE'),
8 '11.2.0.4',
9 7,
10 'PSU',
11 'PSU 11.2.0.4.7');


1 row created.


SQL> COMMIT;


Commit complete.


SQL> SPOOL off
SQL> SET echo off
Check the following log file for errors:
/u01/app/cfgtoollogs/catbundle/catbundle_PSU_ORA11G_APPLY_2015Jul21_01_28_35.log
SQL> select * from dba_registry_history;
ACTION_TIME ACTION NAMESPACE VERSION ID BUNDLE_SERIES COMMENTS
--------------------------------------------------------------------------- ------------------------------ ------------------------------ ------------------------------ ---------- ------------------------------ ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
08-NOV-14 12.54.51.873764 PM APPLY SERVER 11.2.0.4 2 PSU PSU 11.2.0.4.2
27-JAN-15 11.57.18.744412 AM APPLY SERVER 11.2.0.4 5 PSU PSU 11.2.0.4.5
01-APR-15 11.54.50.240210 AM APPLY SERVER 11.2.0.4 6 PSU PSU 11.2.0.4.6
21-JUL-15 01.28.36.827706 AM APPLY SERVER 11.2.0.4 7 PSU PSU 11.2.0.4.7


4 rows selected.


SQL>

 

5 Known Issues

7.2 Bug Fixes

沒有啥特別的單機,比較簡單那,需要注意下readme裡面的knowns issues和bug fixes

 

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved