oracle11g从11.2.0.3.0升级到11.2.0.3.6操作步骤(二)

时间:2022-05-15 07:48:06

oracle 11g 从11.2.0.3.0升级到11.2.0.3.6操作步骤

操作步骤如下

SQL> SHOW ERRORS;
No errors.
SQL> @?/rdbms/admin/prvtawr.plb
SQL> /* -------------------------------------------------------------------------
> * DBMS_SWRF_REPORT_INTERNAL PACKAGE BODY
SQL> *
SQL> * This package will handle the reporting for AWR. It will have the
SQL> * following interfaces:
SQL> * ------------------------------------------------------------------------- */
SQL> create or replace package body dbms_swrf_report_internal wrapped
2 a000000
3 1
4 abcd
1327 wKk7IQ3WXOeFrhDeACwwKPYweqOLM9RTJkM6KrZ3p8+l8hA35i00KEIMYX4lQn/V44J4ul0B
1328 tgil3ydlq67xesDf+re3JkYL9vHtiCjTF7ZlaD6cb+q3zjvt+s9nLEhL9xNPFUpmD6qCKkK3
1329 ka1oEYTwlxs7hcqGoJE+iYdHcoIUQG0UE5W3H7WGtR0rVWgD
1330
1331 /

Package body created.

SQL> show errors;
No errors.
SQL> /* --------------------------------------------
> * DBMS_WORKLOAD_REPOSITORY package body
SQL> * -------------------------------------------- */
SQL> CREATE OR REPLACE PACKAGE BODY dbms_workload_repository wrapped
2 a000000
3 1
4 abcd
5 abcd
6 abcd
7 abcd
120 iH1rtidMcPIOpljmFMHED9x/sogmrVG75YGMrY81xHZpcK362U0+b+laQveklV6BQIq1znhi
121 kDQP
122
123 /

Package body created.

SQL> SHOW ERRORS;
No errors.
SQL> @?/rdbms/admin/prvtawrs.plb
SQL> CREATE OR REPLACE PACKAGE BODY dbms_awr_report_layout wrapped
2 a000000
3 1
4 abcd
5 abcd
6 abcd
7 abcd
8 abcd
9 abcd
10 abcd
11 abcd
3115 7Shs+ikxqrHn2WfyvyKQxz+kzeTHI0IIu7WatSzEK8cx
3116
3117 /

Package body created.

SQL> SHOW ERRORS;
No errors.
SQL> @?/patch/scripts/bug12904308.sql
SQL> Rem
SQL> Rem vpriyans 07/12/12 - Created
SQL> Rem
SQL>
SQL> Rem --Enable Audit for CREATE/DROP DIRECTORY actions
SQL> AUDIT DIRECTORY BY ACCESS;

Audit succeeded.

SQL>
SQL> PROMPT Processing Oracle Workspace Manager...
Processing Oracle Workspace Manager...
SQL> ALTER SESSION SET current_schema = sys;

Session altered.

SQL> @?/rdbms/admin/owmv1120.plb
SQL> update wmsys.wm$env_vars set value = '11.2.0.3.0' where name = 'OWM_VERSION';

1 row updated.

SQL> commit;

Commit complete.

SQL> create or replace function wmsys.get_expanded_nextvers wrapped
2 a000000
3 1
4 abcd
5 abcd
6 abcd
7 abcd
8 abcd
9 abcd
10 abcd
11 abcd
12 abcd
13 abcd
14 abcd
15 abcd
16 abcd
17 abcd
18 abcd
19 8
20 269 19d
21 pGwkFZjwr/4ajpli3MJGYw41Fgowg/AJ2SdqfC+KMQ8tB+ZWBkAbxux2kRK2mZExfTjaSczj
22 KWKJ34nPPwFs4ulr0G3bvMkXYIOI9/YrmTCI/59TNCJPSmqzQUDZOgswEtDH72OUYqDDi2yN
23 /Ra4gLKxynTBNhQn70T1jXtNXOpVmYoybSXgmlQuggoosuFe81+Q0fulgLvrM/5AdWerrVM0
24 4sUnE6P7tqv+Fsb6LvzVaJ/YUAFUOObevbfsNm/6Zlh/01S2B+zuQb0HpjTiEwjLr3aFdnpH
25 A0GyWZIrSmUYZrLHCDvbJiVdFzeMVwFlxsfoiHzko9zTu3OBFOuSMSiu9Z6n+ylDe3PR/J08
26 zn+KWEDiovOmfu6z6pDJu4ON/83qaEF68GCAuSL7Ql5P/A==
27
28 /

Function created.

SQL> begin
2 delete wmsys.wm$nextver_table
3 where next_vers != '-1' and split=1 and
4 exists (select 1
5 from table(wmsys.get_expanded_nextvers(next_vers)) n
6 where n.next_vers not in(select version from wmsys.wm$version_hierarchy_table v)) ;
7 end;
8 /

PL/SQL procedure successfully completed.

SQL> drop function wmsys.get_expanded_nextvers ;

Function dropped.

SQL> create or replace view wmsys.wm$exp_map as
2 select *
3 from table(wmsys.lt_export_pkg.export_mapping_view_func()) ;

View created.

SQL> declare
2 cnt integer ;
3 begin
4 select count(*) into cnt
5 from dba_tables
6 where owner = 'WMSYS' and
7 table_name = 'WM$EXP_MAP_TBL' ;
8
9 if (cnt=0) then
10 execute immediate 'create table wmsys.wm$exp_map_tbl as (select * from wmsys.wm$exp_map where 1=2)' ;
11 end if ;
12 end;
13 /

PL/SQL procedure successfully completed.

SQL> delete sys.impcalloutreg$ where tag='WMSYS';

27 rows deleted.

SQL> insert into sys.impcalloutreg$ values('LT_EXPORT_PKG', 'WMSYS', 'WMSYS', 3, 1000, 0, 'WMSYS', 'WM$EXP_MAP', 4, 'Workspace Manager') ;

1 row created.

SQL> insert into sys.impcalloutreg$ values('LT_EXPORT_PKG', 'WMSYS', 'WMSYS', 3, 1000, 0, 'WMSYS', 'WM$BATCH_COMPRESSIBLE_TABLES', 2, 'Workspace Manager') ;

1 row created.

SQL> insert into sys.impcalloutreg$ values('LT_EXPORT_PKG', 'WMSYS', 'WMSYS', 3, 1000, 0, 'WMSYS', 'WM$CONSTRAINTS_TABLE', 2, 'Workspace Manager') ;

1 row created.

SQL> insert into sys.impcalloutreg$ values('LT_EXPORT_PKG', 'WMSYS', 'WMSYS', 3, 1000, 0, 'WMSYS', 'WM$CONS_COLUMNS', 2, 'Workspace Manager') ;

1 row created.

SQL> insert into sys.impcalloutreg$ values('LT_EXPORT_PKG', 'WMSYS', 'WMSYS', 3, 1000, 0, 'WMSYS', 'WM$ENV_VARS', 2, 'Workspace Manager') ;

1 row created.

SQL> insert into sys.impcalloutreg$ values('LT_EXPORT_PKG', 'WMSYS', 'WMSYS', 3, 1000, 0, 'WMSYS', 'WM$EVENTS_INFO', 2, 'Workspace Manager') ;

1 row created.

SQL> insert into sys.impcalloutreg$ values('LT_EXPORT_PKG', 'WMSYS', 'WMSYS', 3, 1000, 0, 'WMSYS', 'WM$HINT_TABLE', 2, 'Workspace Manager') ;

1 row created.

SQL> insert into sys.impcalloutreg$ values('LT_EXPORT_PKG', 'WMSYS', 'WMSYS', 3, 1000, 0, 'WMSYS', 'WM$INSTEADOF_TRIGS_TABLE', 2, 'Workspace Manager') ;

1 row created.

SQL> insert into sys.impcalloutreg$ values('LT_EXPORT_PKG', 'WMSYS', 'WMSYS', 3, 1000, 0, 'WMSYS', 'WM$LOCKROWS_INFO', 2, 'Workspace Manager') ;

1 row created.

SQL> insert into sys.impcalloutreg$ values('LT_EXPORT_PKG', 'WMSYS', 'WMSYS', 3, 1000, 0, 'WMSYS', 'WM$MODIFIED_TABLES', 2, 'Workspace Manager') ;

1 row created.

SQL> insert into sys.impcalloutreg$ values('LT_EXPORT_PKG', 'WMSYS', 'WMSYS', 3, 1000, 0, 'WMSYS', 'WM$MP_GRAPH_WORKSPACES_TABLE', 2, 'Workspace Manager') ;

1 row created.

SQL> insert into sys.impcalloutreg$ values('LT_EXPORT_PKG', 'WMSYS', 'WMSYS', 3, 1000, 0, 'WMSYS', 'WM$MP_PARENT_WORKSPACES_TABLE', 2, 'Workspace Manager') ;

1 row created.

SQL> insert into sys.impcalloutreg$ values('LT_EXPORT_PKG', 'WMSYS', 'WMSYS', 3, 1000, 0, 'WMSYS', 'WM$NESTED_COLUMNS_TABLE', 2, 'Workspace Manager') ;

1 row created.

SQL> insert into sys.impcalloutreg$ values('LT_EXPORT_PKG', 'WMSYS', 'WMSYS', 3, 1000, 0, 'WMSYS', 'WM$NEXTVER_TABLE', 2, 'Workspace Manager') ;

1 row created.

SQL> insert into sys.impcalloutreg$ values('LT_EXPORT_PKG', 'WMSYS', 'WMSYS', 3, 1000, 0, 'WMSYS', 'WM$REMOVED_WORKSPACES_TABLE', 2, 'Workspace Manager') ;

1 row created.

SQL> insert into sys.impcalloutreg$ values('LT_EXPORT_PKG', 'WMSYS', 'WMSYS', 3, 1000, 0, 'WMSYS', 'WM$RESOLVE_WORKSPACES_TABLE', 2, 'Workspace Manager') ;

1 row created.

SQL> insert into sys.impcalloutreg$ values('LT_EXPORT_PKG', 'WMSYS', 'WMSYS', 3, 1000, 0, 'WMSYS', 'WM$RIC_LOCKING_TABLE', 2, 'Workspace Manager') ;

1 row created.

SQL> insert into sys.impcalloutreg$ values('LT_EXPORT_PKG', 'WMSYS', 'WMSYS', 3, 1000, 0, 'WMSYS', 'WM$RIC_TABLE', 2, 'Workspace Manager') ;

1 row created.

SQL> insert into sys.impcalloutreg$ values('LT_EXPORT_PKG', 'WMSYS', 'WMSYS', 3, 1000, 0, 'WMSYS', 'WM$RIC_TRIGGERS_TABLE', 2, 'Workspace Manager') ;

1 row created.

SQL> insert into sys.impcalloutreg$ values('LT_EXPORT_PKG', 'WMSYS', 'WMSYS', 3, 1000, 0, 'WMSYS', 'WM$UDTRIG_DISPATCH_PROCS', 2, 'Workspace Manager') ;

1 row created.

SQL> insert into sys.impcalloutreg$ values('LT_EXPORT_PKG', 'WMSYS', 'WMSYS', 3, 1000, 0, 'WMSYS', 'WM$UDTRIG_INFO', 2, 'Workspace Manager') ;

1 row created.

SQL> insert into sys.impcalloutreg$ values('LT_EXPORT_PKG', 'WMSYS', 'WMSYS', 3, 1000, 0, 'WMSYS', 'WM$VERSION_HIERARCHY_TABLE', 2, 'Workspace Manager') ;

1 row created.

SQL> insert into sys.impcalloutreg$ values('LT_EXPORT_PKG', 'WMSYS', 'WMSYS', 3, 1000, 0, 'WMSYS', 'WM$VERSION_TABLE', 2, 'Workspace Manager') ;

1 row created.

SQL> insert into sys.impcalloutreg$ values('LT_EXPORT_PKG', 'WMSYS', 'WMSYS', 3, 1000, 0, 'WMSYS', 'WM$VT_ERRORS_TABLE', 2, 'Workspace Manager') ;

1 row created.

SQL> insert into sys.impcalloutreg$ values('LT_EXPORT_PKG', 'WMSYS', 'WMSYS', 3, 1000, 0, 'WMSYS', 'WM$WORKSPACES_TABLE', 2, 'Workspace Manager') ;

1 row created.

SQL> insert into sys.impcalloutreg$ values('LT_EXPORT_PKG', 'WMSYS', 'WMSYS', 3, 1000, 0, 'WMSYS', 'WM$WORKSPACE_PRIV_TABLE', 2, 'Workspace Manager') ;

1 row created.

SQL> insert into sys.impcalloutreg$ values('LT_EXPORT_PKG', 'WMSYS', 'WMSYS', 3, 1000, 0, 'WMSYS', 'WM$WORKSPACE_SAVEPOINTS_TABLE', 2, 'Workspace Manager') ;

1 row created.

SQL> commit ;

Commit complete.

SQL> grant alter session to wmsys ;

Grant succeeded.

SQL> PROMPT Processing Spatial...
Processing Spatial...
SQL> ALTER SESSION SET current_schema = sys;

Session altered.

SQL> @?/md/admin/mdprivs.sql
SQL> Rem
SQL> Rem $Header: sdo/admin/mdprivs.sql /st_recommended_11.2.0.3.0/1 2013/01/03 09:09:59 sravada Exp $
SQL> Rem
SQL> Rem mdprivs.sql
SQL> Rem NOTES
SQL> Rem ranwei 10/22/98 - Privileges list for MDSYS
SQL> Rem ranwei 10/22/98 - Created
SQL> Rem
SQL>
SQL> REM
SQL> REM You must connect as SYS prior to running this script.
SQL> REM
SQL>
SQL> --
SQL> -- System privs needed by MDSYS
SQL> --
SQL> -- grant all privileges to MDSYS with admin option;
SQL> -- the set below should be included in the admin option
SQL>
SQL> grant create session to MDSYS;

Grant succeeded.

SQL> grant connect, resource, create library, create procedure to MDSYS;

Grant succeeded.

SQL> grant create operator to MDSYS;

Grant succeeded.

SQL> grant create indextype to MDSYS;

Grant succeeded.

SQL> grant create type to MDSYS;

Grant succeeded.

SQL> grant create table to MDSYS;

Grant succeeded.

SQL> grant create public synonym to MDSYS;

Grant succeeded.

SQL> grant drop public synonym to MDSYS;

Grant succeeded.

SQL> -- grant select_catalog_role to MDSYS ;
SQL> -- grant execute_catalog_role to MDSYS;
SQL> grant create view to MDSYS;

Grant succeeded.

SQL> grant create sequence to MDSYS;

Grant succeeded.

SQL>
SQL> -- the following seem to give errors; so explicitly grant them
SQL> --
SQL> -- Privs needed for MDSYS to create mdbootstrap package
SQL> --
SQL> -- grant select on sys.obj$ to MDSYS;
SQL> -- grant select on sys.user$ to MDSYS;
SQL> -- grant select on sys.ts$ to MDSYS;
SQL> -- grant select on sys.col$ to MDSYS;
SQL>
SQL> --
SQL> -- Privs needed for MDSYS to create mdlib package
SQL> --
SQL> grant select on sys.dba_objects to MDSYS;

Grant succeeded.

SQL> grant select on sys.dba_tablespaces to MDSYS;

Grant succeeded.

SQL> grant select on sys.dba_tables to MDSYS;

Grant succeeded.

SQL> grant select on dba_views to mdsys with grant option;

Grant succeeded.

SQL> grant select on dba_object_tables to mdsys with grant option;

Grant succeeded.

SQL> grant select on sys.dba_tab_columns to MDSYS;

Grant succeeded.

SQL> grant select on sys.dba_tab_privs to MDSYS;

Grant succeeded.

SQL> grant select on sys.dba_constraints to MDSYS;

Grant succeeded.

SQL> grant select on sys.dba_cons_columns to MDSYS;

Grant succeeded.

SQL> grant select on sys.dba_indexes to MDSYS;

Grant succeeded.

SQL> grant select on sys.dba_ind_columns to MDSYS;

Grant succeeded.

SQL> grant select on sys.kopm$ to mdsys;

Grant succeeded.

SQL> grant EXECUTE on dbms_registry to mdsys;

Grant succeeded.

SQL> grant select on dba_registry to mdsys;

Grant succeeded.

SQL> grant select on dba_role_privs to mdsys;

Grant succeeded.

SQL> grant execute on dbms_lock to mdsys;

Grant succeeded.

SQL>
SQL>
SQL> --
SQL> -- Privs needed for MDSYS to use import/export extensibility
SQL> --
SQL>
SQL> -- grant insert on sys.exppkgobj$ to MDSYS;
SQL> -- grant insert on sys.exppkgact$ to MDSYS;
SQL> -- grant insert on sys.expdepobj$ to MDSYS;
SQL> -- grant insert on sys.expdepact$ to MDSYS;
SQL> -- grant delete on sys.exppkgobj$ to MDSYS;
SQL> -- grant delete on sys.exppkgact$ to MDSYS;
SQL> -- grant delete on sys.expdepobj$ to MDSYS;
SQL> -- grant delete on sys.expdepact$ to MDSYS;
SQL>
SQL>
SQL> --
SQL> -- for GeoRaster
SQL> --
SQL> grant drop any trigger to mdsys;

Grant succeeded.

SQL> grant select on sys.dba_triggers to mdsys;

Grant succeeded.

SQL> grant select on sys.dba_synonyms to mdsys;

Grant succeeded.

SQL> grant select on sys.dba_types to mdsys;

Grant succeeded.

SQL> grant select on sys.dba_type_attrs to mdsys;

Grant succeeded.

SQL> grant select on sys.dba_all_tables to mdsys;

Grant succeeded.

SQL> grant select any table to mdsys;

Grant succeeded.

SQL> grant update any table to mdsys;

Grant succeeded.

SQL> grant alter any table to mdsys;

Grant succeeded.

SQL>
SQL>
SQL> --
SQL> -- for RDF
SQL> --
SQL> grant execute on sys.dbms_system to MDSYS;

Grant succeeded.

SQL> grant create any trigger to MDSYS;

Grant succeeded.

SQL> grant delete any table to MDSYS;

Grant succeeded.

SQL> grant flashback any table to MDSYS;

Grant succeeded.

SQL> --
SQL> -- for NDM
SQL> --
SQL> grant select on sys.dba_java_classes to MDSYS;

Grant succeeded.

SQL>
SQL> grant ADMINISTER DATABASE TRIGGER to MDSYS;

Grant succeeded.

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.3',
9 6,
10 'PSU',
11 'PSU 11.2.0.3.6');

1 row created.

SQL> COMMIT;

Commit complete.

SQL> SPOOL off
SQL> SET echo off
Check the following log file for errors:
/opt/oracle/cfgtoollogs/catbundle/catbundle_PSU_ROCK_APPLY_2013May15_10_01_08.log
SQL> !vi /opt/oracle/cfgtoollogs/catbundle/catbundle_PSU_ROCK_APPLY_2013May15_10_01_08.log
SQL> exec dbms_registry.set_session_namespace('SERVER')

PL/SQL procedure successfully completed.

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

Session altered.

SQL> @?/psu/scripts/bug9858539.sql
SQL> Rem
SQL> Rem $Header: rdbms/admin/bug9858539.sql /st_rdbms_11.2.0.3.0dbpsu/1 2012/04/19 06:42:27 mjangir Exp $
SQL> Rem
SQL> Rem bug9858539.sql
SQL> Rem
SQL> Rem Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
SQL> Rem
SQL> Rem NAME
SQL> Rem bug9858539.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 MODIFIED (MM/DD/YY)
SQL> Rem mjangir 04/18/12 - 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> Rem NAME
SQL> Rem bug9858539.sql - <one-line expansion of the name>
SQL> Rem NOTES
SQL> Rem <other useful comments, qualifications, etc.>
SQL> /* -------------------------------------------------------------------------
SQL> * DBMS_SWRF_REPORT_INTERNAL error code summary

SQL> *
SQL> * -20001 : error in the report main, at the top of the error stack
SQL> * -20002: internal error in ith_displayable_child routine when passed
SQL> * invalid arg tree_idx
SQL> * -20601: Invalid (dbid, version) for High Water Mark
SQL> */
SQL> create or replace package dbms_swrf_report_internal wrapped
2 a000000
3 1
133 gxsr0bQ7K9iJbFe4T0CKui8rSow3s5HUFK0YOQWbLOnvyslwlgPap0A/Em4iIgWzVc0LEVkX
134 EZ8aTAZcA/KwfsdtdrdWJYJ2Bv2qbmzDwpwy9fibmvlbalVnog==
135
136 /

Package created.

SQL> SHOW ERRORS;
No errors.
SQL> @?/rdbms/admin/prvtawr.plb
SQL> /* -------------------------------------------------------------------------
> * DBMS_SWRF_REPORT_INTERNAL PACKAGE BODY
SQL> *
SQL> * This package will handle the reporting for AWR. It will have the
SQL> * following interfaces:
SQL> * ------------------------------------------------------------------------- */
SQL> create or replace package body dbms_swrf_report_internal wrapped
2 a000000
3 1
4 abcd
1327 wKk7IQ3WXOeFrhDeACwwKPYweqOLM9RTJkM6KrZ3p8+l8hA35i00KEIMYX4lQn/V44J4ul0B
1328 tgil3ydlq67xesDf+re3JkYL9vHtiCjTF7ZlaD6cb+q3zjvt+s9nLEhL9xNPFUpmD6qCKkK3
1329 ka1oEYTwlxs7hcqGoJE+iYdHcoIUQG0UE5W3H7WGtR0rVWgD
1330
1331 /

Package body created.

SQL> show errors;
No errors.
SQL> /* --------------------------------------------
> * DBMS_WORKLOAD_REPOSITORY package body
SQL> * -------------------------------------------- */
SQL> CREATE OR REPLACE PACKAGE BODY dbms_workload_repository wrapped
2 a000000
3 1
4 abcd
5 abcd
6 abcd
7 abcd
8 abcd
9 abcd
120 iH1rtidMcPIOpljmFMHED9x/sogmrVG75YGMrY81xHZpcK362U0+b+laQveklV6BQIq1znhi
121 kDQP
122
123 /

Package body created.

SQL> SHOW ERRORS;
No errors.
SQL> @?/rdbms/admin/prvtawrs.plb
SQL> CREATE OR REPLACE PACKAGE BODY dbms_awr_report_layout wrapped
2 a000000
3 1
4 abcd
5 abcd
3115 7Shs+ikxqrHn2WfyvyKQxz+kzeTHI0IIu7WatSzEK8cx
3116
3117 /

Package body created.

SQL> SHOW ERRORS;
No errors.
SQL> @?/patch/scripts/bug12904308.sql
SQL> Rem
SQL> Rem $Header: rdbms/admin/bug12904308.sql /st_rdbms_11.2.0.3.0dbpsu/1 2012/07/18 04:46:58 vpriyans Exp $
4834 3115 7Shs+ikxqrHn2WfyvyKQxz+kzeTHI0IIu7WatSzEK8cx
4835 3116
4836 3117 /
4837
4838 Package body created.
4839
4840 SQL> SHOW ERRORS;
4841 No errors.
4842 SQL> @?/patch/scripts/bug12904308.sql

4858 SQL> Rem
1 SQL> exec dbms_registry.set_session_namespace('SERVER')
2
3 PL/SQL procedure successfully completed.
4
5 SQL> PROMPT Processing Oracle Database Packages and Types...
6 Processing Oracle Database Packages and Types...
7 SQL> ALTER SESSION SET current_schema = sys;
8
9 Session altered.
10
11 SQL> @?/psu/scripts/bug9858539.sql

31 SQL>
32 SQL> SET ECHO ON
33 SQL> SET FEEDBACK 1
34 SQL> SET NUMWIDTH 10
35 SQL> SET LINESIZE 80
36 SQL> SET TRIMSPOOL ON
37 SQL> SET TAB OFF
38 SQL> SET PAGESIZE 100
39 SQL>
40 SQL> -- load XSL stylesheets connect / as sysdba
41 SQL>
42 SQL> execute sys.dbms_metadata_util.load_stylesheets;
43
44 PL/SQL procedure successfully completed.
45
46 SQL> @?/rdbms/admin/prvsawr.plb
47 SQL> /* -------------------------------------------------------------------------
48 > * DBMS_SWRF_REPORT_INTERNAL PACKAGE
49 SQL> *
50 SQL> * This package will handle the reporting for AWR. The report main
51 SQL> * routine will be called by the dbms_workload_repository.awr_report
52 SQL> * function.
53 SQL> * ------------------------------------------------------------------------- */
54 SQL> /*
55 SQL> * -------------------------------------------------------------------------
56 SQL> * DBMS_SWRF_REPORT_INTERNAL error code summary
56 SQL> * DBMS_SWRF_REPORT_INTERNAL error code summary

89 SQL> * -20104: not allowed to specify the 'SYS' user

103 SQL> */
104 SQL> create or replace package dbms_swrf_report_internal wrapped
105 2 a000000
106 3 1
107 4 abcd
108 5 abcd
109 6 abcd
110 7 abcd
111 8 abcd
112 9 abcd
224 121 mMoNhJth12pm96+jP3zGeJKVAfeo8w95DaPOFcDi63iTicxaGE3Fq6Owb/DYV5auRjDF26fg
225 122 wRzr5e0Yd0b0nDO9XxmSIlOnIftjQtyOyFzOS88XB7Sf1qXUZYyun3hrr5hS/42Ur1goGGZ6

238 135
239 136 /
240
241 Package created.
242
243 SQL> SHOW ERRORS;
244 No errors.
245 SQL> @?/rdbms/admin/prvtawr.plb
246 SQL> /* -------------------------------------------------------------------------
247 > * DBMS_SWRF_REPORT_INTERNAL PACKAGE BODY
248 SQL> *
249 SQL> * This package will handle the reporting for AWR. It will have the
250 SQL> * following interfaces:
251 SQL> * ------------------------------------------------------------------------- */
252 SQL> create or replace package body dbms_swrf_report_internal wrapped
253 2 a000000
254 3 1
255 4 abcd
256 5 abcd
1583
1584 Package body created.
1585
1586 SQL> show errors;
1587 No errors.
1588 SQL> /* --------------------------------------------
1589 > * DBMS_WORKLOAD_REPOSITORY package body
1590 SQL> * -------------------------------------------- */
1591 SQL> CREATE OR REPLACE PACKAGE BODY dbms_workload_repository wrapped
1592 2 a000000
1593 3 1
1594 4 abcd
1595 5 abcd
1596 6 abcd
1597 7 abcd
1598 8 abcd
McPIOpljmFMHED9x/sogmrVG75YGMrY81xHZpcK362U0+b+laQveklV6BQIq1znhi
1711 121 kDQP
1712 122
1713 123 /
1714
1715 Package body created.
1716
1717 SQL> SHOW ERRORS;
1718 No errors.
1719 SQL> @?/rdbms/admin/prvtawrs.plb
1720 SQL> CREATE OR REPLACE PACKAGE BODY dbms_awr_report_layout wrapped
1721 2 a000000
1722 3 1
1723 4 abcd
1724 5 abcd
1725 6 abcd
1726 7 abcd
1727 8 abcd
1728 9 abcd
1729 10 abcd
1730 11 abcd
1731 12 abcd
1732 13 abcd
1733 14 abcd
1734 15 abcd

4835 3116
4836 3117 /
4837
4838 Package body created.
4839
4840 SQL> SHOW ERRORS;
4841 No errors.
4842 SQL> @?/patch/scripts/bug12904308.sql
4843 SQL> Rem
4844 SQL> Rem $Header: rdbms/admin/bug12904308.sql /st_rdbms_11.2.0.3.0dbpsu/1 2012/07/18 04:46:58 vpriyans Exp $
4845 SQL> Rem
4846 SQL> Rem bug12904308.sql
4847 SQL> Rem
4848 SQL> Rem Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
4849 SQL> Rem
4850 SQL> Rem NAME
4851 SQL> Rem bug12904308.sql - Audit CREATE/DROP DIRECTORY actions by default
4852 SQL> Rem
4853 SQL> Rem DESCRIPTION
4854 SQL> Rem This file enables auditing for CREATE/DROP DIRECTORY actions
4855 SQL> Rem
4856 SQL> Rem NOTES
4857 SQL> Rem <other useful comments, qualifications, etc.>
4858 SQL> Rem
5033
5034 1 row created.
5035
5036 SQL> insert into sys.impcalloutreg$ values('LT_EXPORT_PKG', 'WMSYS', 'WMSYS', 3, 1000, 0, 'WMSYS', 'WM$UDTRIG_INFO', 2, 'Works pace Manager') ;
5037
5038 1 row created.
5039
5040 SQL> insert into sys.impcalloutreg$ values('LT_EXPORT_PKG', 'WMSYS', 'WMSYS', 3, 1000, 0, 'WMSYS', 'WM$VERSION_HIERARCHY_TABLE ', 2, 'Workspace Manager') ;
5041
5042 1 row created.
5043
5044 SQL> insert into sys.impcalloutreg$ values('LT_EXPORT_PKG', 'WMSYS', 'WMSYS', 3, 1000, 0, 'WMSYS', 'WM$VERSION_TABLE', 2, 'Wor kspace Manager') ;
5045
5046 1 row created.
5047
5048 SQL> insert into sys.impcalloutreg$ values('LT_EXPORT_PKG', 'WMSYS', 'WMSYS', 3, 1000, 0, 'WMSYS', 'WM$VT_ERRORS_TABLE', 2, 'W orkspace Manager') ;
5049
5050 1 row created.
5051
5052 SQL> insert into sys.impcalloutreg$ values('LT_EXPORT_PKG', 'WMSYS', 'WMSYS', 3, 1000, 0, 'WMSYS', 'WM$WORKSPACES_TABLE', 2, ' Workspace Manager') ;
5053
5054 1 row created.
5055
5056 SQL> insert into sys.impcalloutreg$ values('LT_EXPORT_PKG', 'WMSYS', 'WMSYS', 3, 1000, 0, 'WMSYS', 'WM$WORKSPACE_PRIV_TABLE', 2, 'Workspace Manager') ;
5057
5058 1 row created.
5059
5060 SQL> insert into sys.impcalloutreg$ values('LT_EXPORT_PKG', 'WMSYS', 'WMSYS', 3, 1000, 0, 'WMSYS', 'WM$WORKSPACE_SAVEPOINTS_TA BLE', 2, 'Workspace Manager') ;
5061
5062 1 row created.
5063
5048 SQL> insert into sys.impcalloutreg$ values('LT_EXPORT_PKG', 'WMSYS', 'WMSYS', 3, 1000, 0, 'WMSYS', 'WM$VT_ERRORS_TABLE', 2, 'W 5030 1 row created.
5031
5032 SQL> insert into sys.impcalloutreg$ values('LT_EXPORT_PKG', 'WMSYS', 'WMSYS', 3, 1000, 0, 'WMSYS', 'WM$UDTRIG_DISPATCH_PROCS', 2, 'Workspace Manager' ) ;
5033
5034 1 row created.
5035
5036 SQL> insert into sys.impcalloutreg$ values('LT_EXPORT_PKG', 'WMSYS', 'WMSYS', 3, 1000, 0, 'WMSYS', 'WM$UDTRIG_INFO', 2, 'Workspace Manager') ;
5037
5038 1 row created.
5039
5040 SQL> insert into sys.impcalloutreg$ values('LT_EXPORT_PKG', 'WMSYS', 'WMSYS', 3, 1000, 0, 'WMSYS', 'WM$VERSION_HIERARCHY_TABLE', 2, 'Workspace Manage r') ;
5041
5042 1 row created.
5043
5044 SQL> insert into sys.impcalloutreg$ values('LT_EXPORT_PKG', 'WMSYS', 'WMSYS', 3, 1000, 0, 'WMSYS', 'WM$VERSION_TABLE', 2, 'Workspace Manager') ;
5045
5046 1 row created.
5047
5048 SQL> insert into sys.impcalloutreg$ values('LT_EXPORT_PKG', 'WMSYS', 'WMSYS', 3, 1000, 0, 'WMSYS', 'WM$VT_ERRORS_TABLE', 2, 'Workspace Manager') ;
5049
5050 1 row created.
5051
5052 SQL> insert into sys.impcalloutreg$ values('LT_EXPORT_PKG', 'WMSYS', 'WMSYS', 3, 1000, 0, 'WMSYS', 'WM$WORKSPACES_TABLE', 2, 'Workspace Manager') ;
5053
5054 1 row created.
5055
5056 SQL> insert into sys.impcalloutreg$ values('LT_EXPORT_PKG', 'WMSYS', 'WMSYS', 3, 1000, 0, 'WMSYS', 'WM$WORKSPACE_PRIV_TABLE', 2, 'Workspace Manager') ;
5057
5058 1 row created.
5059
5060 SQL> insert into sys.impcalloutreg$ values('LT_EXPORT_PKG', 'WMSYS', 'WMSYS', 3, 1000, 0, 'WMSYS', 'WM$WORKSPACE_SAVEPOINTS_TABLE', 2, 'Workspace Man ager') ;
5061
5062 1 row created.
5063
5064 SQL> commit ;
5065
5066 Commit complete.
5067
5068 SQL> grant alter session to wmsys ;
5069
5070 Grant succeeded.
5071
5072 SQL> PROMPT Processing Spatial...
QL> select substr(action_time,1,30) action_time,
2 substr(id,1,8) id,
3 substr(action,1,10) action,
4 substr(version,1,8) version,
5 substr(comments,1,20) comments
6 from registry$history;

ACTION_TIME ID ACTION VERSION COMMENTS
------------------------------ -------- ---------- -------- --------------------
26-MAR-13 02.30.44.418994 PM 0 APPLY 11.2.0.3 Patchset 11.2.0.2.0
15-MAY-13 10.02.09.872309 AM 6 APPLY 11.2.0.3 PSU 11.2.0.3.6

SQL> SELECT OBJECT_NAME FROM DBA_OBJECTS WHERE STATUS = 'INVALID';

OBJECT_NAME
--------------------------------------------------------------------------------
TR_STARTUP
ANNUAL_INCOME
ADD_DEPT
QUERY_EMPLOYEE

呵呵:数据库升级成功