单机oracle数据库打最新11.2.0.4.7记录

操作系统版本:

[[email protected] ~]# 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

[[email protected] ~]#

[[email protected] 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.

[[email protected] soft]$ cd 20760982/

[[email protected] 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

[[email protected] 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.

[[email protected] 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

------->>>>>没有关闭数据库,需要关闭数据库

[[email protected] 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

[[email protected] 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

[[email protected] 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.

[[email protected] 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.

[[email protected] 20760982]$ cd $ORACLE_HOME/rdbms/admin

[[email protected] 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 - <one-line expansion of the name>

SQL> Rem

SQL> Rem    DESCRIPTION

SQL> Rem      <short description of component this file declares/defines>

SQL> Rem

SQL> Rem    NOTES

SQL> Rem      <other useful comments, qualifications, etc.>

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

版权声明:本文为博主原创文章,未经博主允许不得转载。

时间: 2024-10-09 19:25:51

单机oracle数据库打最新11.2.0.4.7记录的相关文章

探索Oracle之数据库升级四 11.2.0.4.0 PSU 11.2.0.4.3

探索Oracle之数据库升级四 11.2.0.4.0 PSU 11.2.0.4.3   一.  检查当前数据库PSU号: [[email protected] ~]$ cd/DBSoft/Product/11.2.4/db_1/OPatch/ [[email protected] OPatch]$ ls crs docs emdpatch.pl jlib ocm opatch opatch.bat opatchdiag opatchdiag.bat opatch.ini opatch.pl op

探索Oracle之数据库升级二 11.2.0.3升级到11.2.0.4完整步骤

探索Oracle之数据库升级二  11.2.0.3升级到11.2.0.4完整步骤 说明:         这篇文章主要是记录下单实例环境下Oracle 11.2.0.1升级到11.2.0.3的过程,当然RAC的升级是会有所不同.但是他们每个版本之间升级步骤都是差不多的,先升级Database Software,再升级Oracle Instance. Oracle 11.2.0.4的Patchset No:19852360下载需要有Oracle Support才可以.  Patchset包含有7个

探索Oracle之数据库升级六 11.2.0.4.3 Upgrade12c(12.2.0.1)

探索Oracle之数据库升级六 11.2.0.4.3 Upgrade12c(12.2.0.1) 一.前言:        Oracle 12c发布距今已经一年有余了,其最大亮点是一个可以插拔的数据库(PDB),这是在之前版本没有的:但是如果我们要将以前版本的数据库升级到12c来,那么也应顺其自然的将其变成一个pdb,那么我们的工作不仅包含了数据库软件的升级,同时也包含如何将一个NO-CDB的数据库plug to CDB none. 二.升级要求: 三.升级前准备:        3.1.查看数据

Oracle数据库无法使用localhost和127.0.0.1访问

最近学习Oracle数据库,在虚拟机中的Windows XP SP3系统中安装了Oracle 10g(版本:Oracle_10g_10.2.0.1_win32). 安装完成后,使用PL/SQL Developer访问Oracle数据库,发现只能使用IP地址访问(192.168.135.90),而无法使用localhost和127.0.0.1访问. 经过研究,发现这是LISTENER配置问题导致的. 解决办法:配置LISTENER时,使用主机名,而不是IP地址或localhost. 解决后的LIS

vs2010连接Oracle数据库(支持.net 2.0)

近日看了许多连接Oracle数据库的博文,经本人实测,.net环境下连接Oracle数据库分以下几步: 1.连接Oracle数据库需要下载一个Oracle.DataAccess.dll文件.地址在这里 http://pan.baidu.com/s/1ctAsY 2.打开vs,新建一个项目.然后 项目右键——>添加引用. 接着在浏览中找到下载下来的Oracle.DataAccess.dll添加进来. 3.添加using Oracle.DataAccess.Client;这个引用. 4.代码: pr

Oracle数据库查询优化方案(处理上百万级记录如何提高处理查询速度)

1.对查询进行优化,应尽量避免全表扫描,首先应考虑在 where 及 order by 涉及的列上建立索引.2.应尽量避免在 where 子句中对字段进行 null 值判断,否则将导致引擎放弃使用索引而进行全表扫描,如:select id from t where num is null可以在num上设置默认值0,确保表中num列没有null值,然后这样查询:select id from t where num=03.应尽量避免在 where 子句中使用!=或<>操作符,否则将引擎放弃使用索引

在Maven仓库中添加Oracle数据库的JDBC驱动依赖

今天在使用IDEA构建Maven项目时,发现Oracle数据库JDBC驱动依赖使用不了,就在网上搜索了一下,下面是不能使用的原因. 由于Oracle授权问题,Maven3不提供oracle JDBC driver,我们也可以在Maven的中心搜索ojdbc驱动包,但是可以看到版本过于陈旧,即使有坐标,也下载不了. 为了可以在使用Maven构建的项目中使用Oracle JDBC driver,我们就必须手动添加Oracle的JDBC驱动依赖到本地仓库中. 既然要手动添加Maven依赖到本地仓库中,

图形化升级单机oracle 11.2.0.4 到 12.2.0.1

1. 讲补丁包上传到 Oracle server ,解压.安装 [[email protected] tmp]$ unzip linuxx64_12201_database.zip 2. 检查当前版本 SQL> select * from v$version; BANNER--------------------------------------------------------------------------------Oracle Database 11g Enterprise Ed

探索Oracle之数据库升级五 PSU11.2.0.4.3 rollback 11.2.0.4.0

探索Oracle之数据库升级五 PSU11.2.0.4.3 rollback 11.2.0.4.0 一.进入PSU目录,执行opatch rollback [[email protected]~]# su - oracle [[email protected]~]$ ls c18522509 Desktop OPatch p18522509_112040_Linux-x86-64.zip p6880880_112000_Linux-x86-64.zip PatchSearch.xml upgra