1.在9ihome下运行检查工具
SQL> spool aa.log
SQL> @/opt/oracle/product/11g/rdbms/admin/utlu112i.sql
SQL> spool aa.log
SQL> @/opt/oracle/product/11g/rdbms/admin/utlu112i.sql
-bash-3.2$ cat aa.log
SQL> @/opt/oracle/product/11g/rdbms/admin/utlu112i.sql
Oracle Database 11.2 Pre-Upgrade Information Tool 03-13-2013 14:32:24
Script. Version: 11.2.0.3.0 Build: 001
.
**********************************************************************
Database:
**********************************************************************
--> name: DB01
--> version: 9.2.0.8.0
--> compatible: 9.2.0.0.0
--> blocksize: 8192
--> timezone file: V1
.
**********************************************************************
Logfiles: [make adjustments in the current environment]
**********************************************************************
--> The existing log files are adequate. No changes are required.
.
**********************************************************************
Tablespaces: [make adjustments in the current environment]
**********************************************************************
--> SYSTEM tablespace is adequate for the upgrade.
.... minimum required size: 442 MB
--> UNDOTBS1 tablespace is adequate for the upgrade.
.... minimum required size: 400 MB
--> TEMP tablespace is adequate for the upgrade.
.... minimum required size: 60 MB
--> CWMLITE tablespace is adequate for the upgrade.
.... minimum required size: 16 MB
--> DRSYS tablespace is adequate for the upgrade.
.... minimum required size: 29 MB
--> EXAMPLE tablespace is adequate for the upgrade.
.... minimum required size: 24 MB
--> ODM tablespace is adequate for the upgrade.
.... minimum required size: 7 MB
--> XDB tablespace is adequate for the upgrade.
.... minimum required size: 57 MB
.
**********************************************************************
Update Parameters: [Update Oracle Database 11.2 init.ora or spfile]
Note: Pre-upgrade tool was run on a lower version 32-bit database.
**********************************************************************
--> If Target Oracle is 32-Bit, refer here for Update Parameters:
WARNING: --> "compatible" must be set to at least 10.1.0
WARNING: --> "shared_pool_size" needs to be increased to at least 295 MB
WARNING: --> "db_cache_size" needs to be increased to at least 50331648 bytes
.
--> If Target Oracle is 64-Bit, refer here for Update Parameters:
WARNING: --> "compatible" must be set to at least 10.1.0
WARNING: --> "shared_pool_size" needs to be increased to at least 531 MB
WARNING: --> "java_pool_size" needs to be increased to at least 128 MB
WARNING: --> "db_cache_size" needs to be increased to at least 50331648 bytes
.
**********************************************************************
Renamed Parameters: [Update Oracle Database 11.2 init.ora or spfile]
**********************************************************************
-- No renamed parameters found. No changes are required.
.
**********************************************************************
Obsolete/Deprecated Parameters: [Update Oracle Database 11.2 init.ora or spfile]
**********************************************************************
--> hash_join_enabled 10.1 OBSOLETE
--> background_dump_dest 11.1 DEPRECATED replaced by "diagnostic_dest"
--> user_dump_dest 11.1 DEPRECATED replaced by "diagnostic_dest"
.
**********************************************************************
Components: [The following database components will be upgraded or installed]
**********************************************************************
--> Oracle Catalog Views [upgrade] VALID
--> Oracle Packages and Types [upgrade] VALID
--> JServer JAVA Virtual Machine [upgrade] VALID
--> Oracle XDK for Java [upgrade] VALID
--> Oracle Workspace Manager [upgrade] VALID
--> OLAP Analytic Workspace [upgrade] LOADED
--> OLAP Catalog [upgrade] VALID
--> Oracle Text [upgrade] VALID
--> Oracle XML Database [upgrade] VALID
--> Oracle Java Packages [upgrade] VALID
--> Oracle interMedia [upgrade] VALID
--> Spatial [upgrade] LOADED
--> Data Mining [upgrade] LOADED
--> Oracle Ultra Search [upgrade] VALID
--> Oracle OLAP API [upgrade] LOADED
.
**********************************************************************
Miscellaneous Warnings
**********************************************************************
WARNING: --> The database has not been patched to release 9.2.0.8.0.
... Run catpatch.sql prior to upgrading.
WARNING: --> Passwords exist in some database links.
.... Passwords will be encrypted during the upgrade.
.... Downgrade of database links with passwords is not supported.
WARNING: --> Deprecated CONNECT role granted to some user/roles.
.... CONNECT role after upgrade has only CREATE SESSION privilege.
WARNING: --> Database is using a timezone file older than version 14.
.... After the release migration, it is recommended that DBMS_DST package
.... be used to upgrade the 9.2.0.8.0 database timezone version
.... to the latest version which comes with the new release.
WARNING: --> Database contains INVALID objects prior to upgrade.
.... The list of invalid SYS/SYSTEM objects was written to
.... registry$sys_inv_objs.
.... The list of non-SYS/SYSTEM objects was written to
.... registry$nonsys_inv_objs.
.... Use utluiobj.sql after the upgrade to identify any new invalid
.... objects due to the upgrade.
.... USER EPT has 6 INVALID objects.
.
**********************************************************************
Recommendations
**********************************************************************
Oracle recommends gathering dictionary statistics prior to
upgrading the database.
To gather dictionary statistics execute the following commands
while connected as SYSDBA:
EXECUTE dbms_stats.gather_schema_stats('DBSNMP',options=>'GATHER'
,estimate_percent=>DBMS_STATS.AUTO_SAMPLE_SIZE
,method_opt=>'FOR ALL COLUMNS SIZE AUTO'
,cascade=>TRUE);
EXECUTE dbms_stats.gather_schema_stats('OUTLN',options=>'GATHER'
,estimate_percent=>DBMS_STATS.AUTO_SAMPLE_SIZE
,method_opt=>'FOR ALL COLUMNS SIZE AUTO'
,cascade=>TRUE);
EXECUTE dbms_stats.gather_schema_stats('ORDPLUGINS',options=>'GATHER'
,estimate_percent=>DBMS_STATS.AUTO_SAMPLE_SIZE
,method_opt=>'FOR ALL COLUMNS SIZE AUTO'
,cascade=>TRUE);
EXECUTE dbms_stats.gather_schema_stats('ORDSYS',options=>'GATHER'
,estimate_percent=>DBMS_STATS.AUTO_SAMPLE_SIZE
,method_opt=>'FOR ALL COLUMNS SIZE AUTO'
,cascade=>TRUE);
EXECUTE dbms_stats.gather_schema_stats('WKSYS',options=>'GATHER'
,estimate_percent=>DBMS_STATS.AUTO_SAMPLE_SIZE
,method_opt=>'FOR ALL COLUMNS SIZE AUTO'
,cascade=>TRUE);
EXECUTE dbms_stats.gather_schema_stats('XDB',options=>'GATHER'
,estimate_percent=>DBMS_STATS.AUTO_SAMPLE_SIZE
,method_opt=>'FOR ALL COLUMNS SIZE AUTO'
,cascade=>TRUE);
EXECUTE dbms_stats.gather_schema_stats('CTXSYS',options=>'GATHER'
,estimate_percent=>DBMS_STATS.AUTO_SAMPLE_SIZE
,method_opt=>'FOR ALL COLUMNS SIZE AUTO'
,cascade=>TRUE);
EXECUTE dbms_stats.gather_schema_stats('MDSYS',options=>'GATHER'
,estimate_percent=>DBMS_STATS.AUTO_SAMPLE_SIZE
,method_opt=>'FOR ALL COLUMNS SIZE AUTO'
,cascade=>TRUE);
EXECUTE dbms_stats.gather_schema_stats('WMSYS',options=>'GATHER'
,estimate_percent=>DBMS_STATS.AUTO_SAMPLE_SIZE
,method_opt=>'FOR ALL COLUMNS SIZE AUTO'
,cascade=>TRUE);
EXECUTE dbms_stats.gather_schema_stats('SYSTEM',options=>'GATHER'
,estimate_percent=>DBMS_STATS.AUTO_SAMPLE_SIZE
,method_opt=>'FOR ALL COLUMNS SIZE AUTO'
,cascade=>TRUE);
EXECUTE dbms_stats.gather_schema_stats('SYS',options=>'GATHER'
,estimate_percent=>DBMS_STATS.AUTO_SAMPLE_SIZE
,method_opt=>'FOR ALL COLUMNS SIZE AUTO'
,cascade=>TRUE);
**********************************************************************
Oracle recommends reviewing any defined events prior to upgrading.
To view existing non-default events execute the following commands
while connected AS SYSDBA:
Events:
SELECT (translate(value,chr(13)||chr(10),' ')) FROM sys.v$parameter2
WHERE UPPER(name) ='EVENT' AND isdefault='FALSE'
Trace Events:
SELECT (translate(value,chr(13)||chr(10),' ')) from sys.v$parameter2
WHERE UPPER(name) = '_TRACE_EVENTS' AND isdefault='FALSE'
Changes will need to be made in the init.ora or spfile.
**********************************************************************
**********************************************************************
SYSAUX Tablespace:
[Create tablespace in the Oracle Database 11.2 environment]
**********************************************************************
--> New "SYSAUX" tablespace
.... minimum required size for database upgrade: 500 MB
.
SQL> exit
-bash-3.2$
SQL> @/opt/oracle/product/11g/rdbms/admin/utlu112i.sql
Oracle Database 11.2 Pre-Upgrade Information Tool 03-13-2013 14:32:24
Script. Version: 11.2.0.3.0 Build: 001
.
**********************************************************************
Database:
**********************************************************************
--> name: DB01
--> version: 9.2.0.8.0
--> compatible: 9.2.0.0.0
--> blocksize: 8192
--> timezone file: V1
.
**********************************************************************
Logfiles: [make adjustments in the current environment]
**********************************************************************
--> The existing log files are adequate. No changes are required.
.
**********************************************************************
Tablespaces: [make adjustments in the current environment]
**********************************************************************
--> SYSTEM tablespace is adequate for the upgrade.
.... minimum required size: 442 MB
--> UNDOTBS1 tablespace is adequate for the upgrade.
.... minimum required size: 400 MB
--> TEMP tablespace is adequate for the upgrade.
.... minimum required size: 60 MB
--> CWMLITE tablespace is adequate for the upgrade.
.... minimum required size: 16 MB
--> DRSYS tablespace is adequate for the upgrade.
.... minimum required size: 29 MB
--> EXAMPLE tablespace is adequate for the upgrade.
.... minimum required size: 24 MB
--> ODM tablespace is adequate for the upgrade.
.... minimum required size: 7 MB
--> XDB tablespace is adequate for the upgrade.
.... minimum required size: 57 MB
.
**********************************************************************
Update Parameters: [Update Oracle Database 11.2 init.ora or spfile]
Note: Pre-upgrade tool was run on a lower version 32-bit database.
**********************************************************************
--> If Target Oracle is 32-Bit, refer here for Update Parameters:
WARNING: --> "compatible" must be set to at least 10.1.0
WARNING: --> "shared_pool_size" needs to be increased to at least 295 MB
WARNING: --> "db_cache_size" needs to be increased to at least 50331648 bytes
.
--> If Target Oracle is 64-Bit, refer here for Update Parameters:
WARNING: --> "compatible" must be set to at least 10.1.0
WARNING: --> "shared_pool_size" needs to be increased to at least 531 MB
WARNING: --> "java_pool_size" needs to be increased to at least 128 MB
WARNING: --> "db_cache_size" needs to be increased to at least 50331648 bytes
.
**********************************************************************
Renamed Parameters: [Update Oracle Database 11.2 init.ora or spfile]
**********************************************************************
-- No renamed parameters found. No changes are required.
.
**********************************************************************
Obsolete/Deprecated Parameters: [Update Oracle Database 11.2 init.ora or spfile]
**********************************************************************
--> hash_join_enabled 10.1 OBSOLETE
--> background_dump_dest 11.1 DEPRECATED replaced by "diagnostic_dest"
--> user_dump_dest 11.1 DEPRECATED replaced by "diagnostic_dest"
.
**********************************************************************
Components: [The following database components will be upgraded or installed]
**********************************************************************
--> Oracle Catalog Views [upgrade] VALID
--> Oracle Packages and Types [upgrade] VALID
--> JServer JAVA Virtual Machine [upgrade] VALID
--> Oracle XDK for Java [upgrade] VALID
--> Oracle Workspace Manager [upgrade] VALID
--> OLAP Analytic Workspace [upgrade] LOADED
--> OLAP Catalog [upgrade] VALID
--> Oracle Text [upgrade] VALID
--> Oracle XML Database [upgrade] VALID
--> Oracle Java Packages [upgrade] VALID
--> Oracle interMedia [upgrade] VALID
--> Spatial [upgrade] LOADED
--> Data Mining [upgrade] LOADED
--> Oracle Ultra Search [upgrade] VALID
--> Oracle OLAP API [upgrade] LOADED
.
**********************************************************************
Miscellaneous Warnings
**********************************************************************
WARNING: --> The database has not been patched to release 9.2.0.8.0.
... Run catpatch.sql prior to upgrading.
WARNING: --> Passwords exist in some database links.
.... Passwords will be encrypted during the upgrade.
.... Downgrade of database links with passwords is not supported.
WARNING: --> Deprecated CONNECT role granted to some user/roles.
.... CONNECT role after upgrade has only CREATE SESSION privilege.
WARNING: --> Database is using a timezone file older than version 14.
.... After the release migration, it is recommended that DBMS_DST package
.... be used to upgrade the 9.2.0.8.0 database timezone version
.... to the latest version which comes with the new release.
WARNING: --> Database contains INVALID objects prior to upgrade.
.... The list of invalid SYS/SYSTEM objects was written to
.... registry$sys_inv_objs.
.... The list of non-SYS/SYSTEM objects was written to
.... registry$nonsys_inv_objs.
.... Use utluiobj.sql after the upgrade to identify any new invalid
.... objects due to the upgrade.
.... USER EPT has 6 INVALID objects.
.
**********************************************************************
Recommendations
**********************************************************************
Oracle recommends gathering dictionary statistics prior to
upgrading the database.
To gather dictionary statistics execute the following commands
while connected as SYSDBA:
EXECUTE dbms_stats.gather_schema_stats('DBSNMP',options=>'GATHER'
,estimate_percent=>DBMS_STATS.AUTO_SAMPLE_SIZE
,method_opt=>'FOR ALL COLUMNS SIZE AUTO'
,cascade=>TRUE);
EXECUTE dbms_stats.gather_schema_stats('OUTLN',options=>'GATHER'
,estimate_percent=>DBMS_STATS.AUTO_SAMPLE_SIZE
,method_opt=>'FOR ALL COLUMNS SIZE AUTO'
,cascade=>TRUE);
EXECUTE dbms_stats.gather_schema_stats('ORDPLUGINS',options=>'GATHER'
,estimate_percent=>DBMS_STATS.AUTO_SAMPLE_SIZE
,method_opt=>'FOR ALL COLUMNS SIZE AUTO'
,cascade=>TRUE);
EXECUTE dbms_stats.gather_schema_stats('ORDSYS',options=>'GATHER'
,estimate_percent=>DBMS_STATS.AUTO_SAMPLE_SIZE
,method_opt=>'FOR ALL COLUMNS SIZE AUTO'
,cascade=>TRUE);
EXECUTE dbms_stats.gather_schema_stats('WKSYS',options=>'GATHER'
,estimate_percent=>DBMS_STATS.AUTO_SAMPLE_SIZE
,method_opt=>'FOR ALL COLUMNS SIZE AUTO'
,cascade=>TRUE);
EXECUTE dbms_stats.gather_schema_stats('XDB',options=>'GATHER'
,estimate_percent=>DBMS_STATS.AUTO_SAMPLE_SIZE
,method_opt=>'FOR ALL COLUMNS SIZE AUTO'
,cascade=>TRUE);
EXECUTE dbms_stats.gather_schema_stats('CTXSYS',options=>'GATHER'
,estimate_percent=>DBMS_STATS.AUTO_SAMPLE_SIZE
,method_opt=>'FOR ALL COLUMNS SIZE AUTO'
,cascade=>TRUE);
EXECUTE dbms_stats.gather_schema_stats('MDSYS',options=>'GATHER'
,estimate_percent=>DBMS_STATS.AUTO_SAMPLE_SIZE
,method_opt=>'FOR ALL COLUMNS SIZE AUTO'
,cascade=>TRUE);
EXECUTE dbms_stats.gather_schema_stats('WMSYS',options=>'GATHER'
,estimate_percent=>DBMS_STATS.AUTO_SAMPLE_SIZE
,method_opt=>'FOR ALL COLUMNS SIZE AUTO'
,cascade=>TRUE);
EXECUTE dbms_stats.gather_schema_stats('SYSTEM',options=>'GATHER'
,estimate_percent=>DBMS_STATS.AUTO_SAMPLE_SIZE
,method_opt=>'FOR ALL COLUMNS SIZE AUTO'
,cascade=>TRUE);
EXECUTE dbms_stats.gather_schema_stats('SYS',options=>'GATHER'
,estimate_percent=>DBMS_STATS.AUTO_SAMPLE_SIZE
,method_opt=>'FOR ALL COLUMNS SIZE AUTO'
,cascade=>TRUE);
**********************************************************************
Oracle recommends reviewing any defined events prior to upgrading.
To view existing non-default events execute the following commands
while connected AS SYSDBA:
Events:
SELECT (translate(value,chr(13)||chr(10),' ')) FROM sys.v$parameter2
WHERE UPPER(name) ='EVENT' AND isdefault='FALSE'
Trace Events:
SELECT (translate(value,chr(13)||chr(10),' ')) from sys.v$parameter2
WHERE UPPER(name) = '_TRACE_EVENTS' AND isdefault='FALSE'
Changes will need to be made in the init.ora or spfile.
**********************************************************************
**********************************************************************
SYSAUX Tablespace:
[Create tablespace in the Oracle Database 11.2 environment]
**********************************************************************
--> New "SYSAUX" tablespace
.... minimum required size for database upgrade: 500 MB
.
SQL> exit
-bash-3.2$
2.根据检查结果进行相应修改
a.修改系统参数
SQL> alter system set compatible='10.0.1' scope=spfile;
SQL> alter system set compatible='10.0.1' scope=spfile;
System altered.
SQL> alter system set sga_max_size=1600m scope=spfile;
SQL> alter system set sga_max_size=1600m scope=spfile;
System altered.
SQL> alter system set db_cache_size=800m scope=spfile;
System altered.
SQL> alter system set shared_pool_size=500m scope=spfile;
System altered.
b.对赋予了connect角色的用户赋予权限
grant CREATE VIEW to ept;
grant CREATE TABLE to ept;
grant ALTER SESSION to ept;
grant CREATE CLUSTER to ept;
grant CREATE SESSION to ept;
grant CREATE SYNONYM to ept;
grant CREATE SEQUENCE to ept;
grant CREATE DATABASE LINK to ept;
d.进行9208的补丁程序
SQL> spool cc.log
SQL> @/opt/oracle/product/9ir2/rdbms/admin/catpatch.sql
SQL> spool cc.log
SQL> @/opt/oracle/product/9ir2/rdbms/admin/catpatch.sql
d.生成参数文件,关闭数据库
SQL>create pfile='/opt/oracle/initDB01.ora' from spfile;
SQL>create pfile='/opt/oracle/initDB01.ora' from spfile;
去除参数
hash_join_enabled
hash_join_enabled
3.从9ihome拷贝密码文件到11ghome,修改oratab
-bash-3.2$ cat oratab
#
-bash-3.2$ cat oratab
#
# This file is used by ORACLE utilities. It is created by root.sh
# and updated by the Database Configuration Assistant when creating
# a database.
# and updated by the Database Configuration Assistant when creating
# a database.
# A colon, ':', is used as the field terminator. A new line terminates
# the entry. Lines beginning with a pound sign, '#', are comments.
#
# Entries are of the form.:
# $ORACLE_SID:$ORACLE_HOME::
#
# The first and second fields are the system identifier and home
# directory of the database respectively. The third filed indicates
# to the dbstart utility that the database should , "Y", or should not,
# "N", be brought up at system boot time.
#
# Multiple entries with the same $ORACLE_SID are not allowed.
#
#
# *:/opt/oracle/product/9ir2:N
*:/opt/oracle/product/9ir2:N
#DB01:/opt/oracle/product/9ir2:N
DB01:/opt/oracle/product/11g:N
# the entry. Lines beginning with a pound sign, '#', are comments.
#
# Entries are of the form.:
# $ORACLE_SID:$ORACLE_HOME:
#
# The first and second fields are the system identifier and home
# directory of the database respectively. The third filed indicates
# to the dbstart utility that the database should , "Y", or should not,
# "N", be brought up at system boot time.
#
# Multiple entries with the same $ORACLE_SID are not allowed.
#
#
# *:/opt/oracle/product/9ir2:N
*:/opt/oracle/product/9ir2:N
#DB01:/opt/oracle/product/9ir2:N
DB01:/opt/oracle/product/11g:N
4.在11g下启动数据库,运行catupgrd.sql
-bash-3.2$ sqlplus /nolog
-bash-3.2$ sqlplus /nolog
SQL*Plus: Release 11.2.0.3.0 Production on Mon Mar 18 09:45:32 2013
Copyright (c) 1982, 2011, Oracle. All rights reserved.
SQL> connect / as sysdba
Connected to an idle instance.
SQL> startup upgrade pfile='/opt/oracle/initDB01.ora'
ORA-32006: BACKGROUND_DUMP_DEST initialization parameter has been deprecated
ORA-32006: USER_DUMP_DEST initialization parameter has been deprecated
ORACLE instance started.
Connected to an idle instance.
SQL> startup upgrade pfile='/opt/oracle/initDB01.ora'
ORA-32006: BACKGROUND_DUMP_DEST initialization parameter has been deprecated
ORA-32006: USER_DUMP_DEST initialization parameter has been deprecated
ORACLE instance started.
Total System Global Area 1673965568 bytes
Fixed Size 1345352 bytes
Variable Size 822085816 bytes
Database Buffers 838860800 bytes
Redo Buffers 11673600 bytes
Database mounted.
Database opened.
SQL>
Fixed Size 1345352 bytes
Variable Size 822085816 bytes
Database Buffers 838860800 bytes
Redo Buffers 11673600 bytes
Database mounted.
Database opened.
SQL>
CREATE TABLESPACE sysaux DATAFILE '/opt/oracle/oradata/DB01/sysaux01.dbf'
SIZE 500M REUSE
EXTENT MANAGEMENT LOCAL
SEGMENT SPACE MANAGEMENT AUTO
ONLINE;
spool upgrade.sql
@/opt/oracle/product/11g/rdbms/admin/catupgrd.sql
SIZE 500M REUSE
EXTENT MANAGEMENT LOCAL
SEGMENT SPACE MANAGEMENT AUTO
ONLINE;
spool upgrade.sql
@/opt/oracle/product/11g/rdbms/admin/catupgrd.sql
5.修改参数文件,丢弃两个参数,重新启动数据库,运行脚本utlu112s.sql
BACKGROUND_DUMP_DEST
USER_DUMP_DEST
BACKGROUND_DUMP_DEST
USER_DUMP_DEST
SQL>startup pfile='/opt/oracle/initDB01.ora'
spool ss.log
SQL> @/opt/oracle/product/11g/rdbms/admin/utlu112s.sql
spool ss.log
SQL> @/opt/oracle/product/11g/rdbms/admin/utlu112s.sql
cat ss.log
有省略
.
Oracle Database 11.2 Post-Upgrade Status Tool 03-18-2013 10:23:40
.
Component Current Version Elapsed Time
Name Status Number HH:MM:SS
.
Oracle Server
. VALID 11.2.0.3.0 00:08:39
JServer JAVA Virtual Machine
. VALID 11.2.0.3.0 00:01:23
Oracle Workspace Manager
. VALID 11.2.0.3.0 00:00:32
OLAP Analytic Workspace
. VALID 11.2.0.3.0 00:00:22
OLAP Catalog
. VALID 11.2.0.3.0 00:00:45
Oracle OLAP API
. VALID 11.2.0.3.0 00:00:12
Oracle XDK
. VALID 11.2.0.3.0 00:01:28
Oracle Text
. VALID 11.2.0.3.0 00:00:36
Oracle XML Database
. VALID 11.2.0.3.0 00:02:46
Oracle Database Java Packages
. VALID 11.2.0.3.0 00:00:09
Oracle Multimedia
. VALID 11.2.0.3.0 00:02:13
Spatial
. VALID 11.2.0.3.0 00:03:55
Gathering Statistics
. 00:01:20
Total Upgrade Time: 00:24:31
有省略
.
Oracle Database 11.2 Post-Upgrade Status Tool 03-18-2013 10:23:40
.
Component Current Version Elapsed Time
Name Status Number HH:MM:SS
.
Oracle Server
. VALID 11.2.0.3.0 00:08:39
JServer JAVA Virtual Machine
. VALID 11.2.0.3.0 00:01:23
Oracle Workspace Manager
. VALID 11.2.0.3.0 00:00:32
OLAP Analytic Workspace
. VALID 11.2.0.3.0 00:00:22
OLAP Catalog
. VALID 11.2.0.3.0 00:00:45
Oracle OLAP API
. VALID 11.2.0.3.0 00:00:12
Oracle XDK
. VALID 11.2.0.3.0 00:01:28
Oracle Text
. VALID 11.2.0.3.0 00:00:36
Oracle XML Database
. VALID 11.2.0.3.0 00:02:46
Oracle Database Java Packages
. VALID 11.2.0.3.0 00:00:09
Oracle Multimedia
. VALID 11.2.0.3.0 00:02:13
Spatial
. VALID 11.2.0.3.0 00:03:55
Gathering Statistics
. 00:01:20
Total Upgrade Time: 00:24:31
PL/SQL procedure successfully completed.
SQL>
SQL> SET SERVEROUTPUT OFF
SQL> SET VERIFY ON
SQL> SET SERVEROUTPUT OFF
SQL> SET VERIFY ON
6.运行catuppst.sql脚本
@/opt/oracle/product/11g/rdbms/admin/catuppst.sql
@/opt/oracle/product/11g/rdbms/admin/catuppst.sql
下面是部分日志
Generating apply and rollback scripts...
Check the following file for errors:
/opt/oracle/cfgtoollogs/catbundle/catbundle_PSU_DB01_GENERATE_2013Mar18_10_28_54.log
Apply script. /opt/oracle/product/11g/rdbms/admin/catbundle_PSU_DB01_APPLY.sql
Rollback script. /opt/oracle/product/11g/rdbms/admin/catbundle_PSU_DB01_ROLLBACK.sql
Generating apply and rollback scripts...
Check the following file for errors:
/opt/oracle/cfgtoollogs/catbundle/catbundle_PSU_DB01_GENERATE_2013Mar18_10_28_54.log
Apply script. /opt/oracle/product/11g/rdbms/admin/catbundle_PSU_DB01_APPLY.sql
Rollback script. /opt/oracle/product/11g/rdbms/admin/catbundle_PSU_DB01_ROLLBACK.sql
PL/SQL procedure successfully completed.
Executing script. file...
SQL> SPOOL off
SQL> SET echo off
Check the following log file for errors:
/opt/oracle/cfgtoollogs/catbundle/catbundle_PSU_DB01_APPLY_2013Mar18_10_28_54.log
SQL> SET echo off
Check the following log file for errors:
/opt/oracle/cfgtoollogs/catbundle/catbundle_PSU_DB01_APPLY_2013Mar18_10_28_54.log
检查两个.log文件都没有错误信息,脚本的命令都成功执行
7.运行下面脚本修复invalid对象
@/opt/oracle/product/11g/rdbms/admin/utlrp.sql
@/opt/oracle/product/11g/rdbms/admin/utlrp.sql
SQL> SELECT count(*) FROM dba_invalid_objects;
COUNT(*)
----------
2
----------
2
SQL> SELECT distinct object_name FROM dba_invalid_objects;
OBJECT_NAME
--------------------------------------------------------------------------------------------------------------------------------
PR_DECL_ORGINFO_SYNC
PR_STEPHEN_DEAL_BLOCK
--------------------------------------------------------------------------------------------------------------------------------
PR_DECL_ORGINFO_SYNC
PR_STEPHEN_DEAL_BLOCK
SQL>
8.对timezone进行处理
SQL> startup upgrade pfile='/opt/oracle/initDB01.ora'
SQL> Execute DBMS_DST.BEGIN_UPGRADE(14,true);
SQL> startup upgrade pfile='/opt/oracle/initDB01.ora'
SQL> Execute DBMS_DST.BEGIN_UPGRADE(14,true);
PL/SQL procedure successfully completed.
SQL> select count(*)
from sys.dst$error_table;
from sys.dst$error_table;
COUNT(*)
----------
0
----------
0
SQL>
SQL> select count(*)
from sys.dst$trigger_table;
from sys.dst$trigger_table;
COUNT(*)
----------
0
----------
0
SQL> VAR numfail number
SQL> BEGIN
2 DBMS_DST.UPGRADE_DATABASE(:numfail,
3 parallel => TRUE,
4 log_errors => TRUE,
5 log_errors_table => 'SYS.DST$ERROR_TABLE',
6 log_triggers_table => 'SYS.DST$TRIGGER_TABLE',
7 error_on_overlap_time => TRUE,
8 error_on_nonexisting_time => TRUE);
9 DBMS_OUTPUT.PUT_LINE('Failures:'|| :numfail);
10 END;
11 /
SQL> BEGIN
2 DBMS_DST.UPGRADE_DATABASE(:numfail,
3 parallel => TRUE,
4 log_errors => TRUE,
5 log_errors_table => 'SYS.DST$ERROR_TABLE',
6 log_triggers_table => 'SYS.DST$TRIGGER_TABLE',
7 error_on_overlap_time => TRUE,
8 error_on_nonexisting_time => TRUE);
9 DBMS_OUTPUT.PUT_LINE('Failures:'|| :numfail);
10 END;
11 /
PL/SQL procedure successfully completed.
SQL>
SQL> BEGIN
2 DBMS_DST.END_UPGRADE(:numfail);
3 END;
4 /
2 DBMS_DST.END_UPGRADE(:numfail);
3 END;
4 /
PL/SQL procedure successfully completed.