歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux技術 >> linux下oracle11.2.0.1升級到11.2.0.4

linux下oracle11.2.0.1升級到11.2.0.4

日期:2017/3/3 12:55:06   编辑:Linux技術

linux下oracle11.2.0.1升級到11.2.0.4一、安裝新版本11.2.0.4到新目錄下/u02下(此處略去,無非是新建個目錄/u02,然後只裝軟件不裝庫,運行root時 覆蓋就可以)

操作系統是redhat linux 5.8

升級前版本是11.2.0.1

升級後版本是11.2.0.4

二、升級過程 (某些腳本只摘取頭和尾,整個日後截取完有80多M,注意日志中的錯誤提示或者警告)

1.使用源庫(11.2.0.1)進行升級腳本檢查

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

Oracle Database 11.2 Pre-Upgrade Information Tool 05-11-2016 02:26:57

.

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

Database:

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

--> name: SUPER

--> version: 11.2.0.1.0

--> compatible: 11.2.0.0.0

--> blocksize: 8192

--> timezone file: V11

.

Database already upgraded; to rerun upgrade use rdbms/admin/catupgrd.sql.

SQL>@/tmp/dbupgdiag.sql

VALID 11.2.0.4.0 00:02:44

Spatial

. VALID 11.2.0.4.0 00:03:12

Oracle Expression Filter

. VALID 11.2.0.4.0 00:00:09

Oracle Rules Manager

. VALID 11.2.0.4.0 00:00:06

Oracle Application Express

. VALID 3.2.1.00.10

Final Actions

. 00:00:01

Total Upgrade Time: 00:32:02

PL/SQL procedure successfully completed.

SQL>

SQL> SET SERVEROUTPUT OFF

SQL> SET VERIFY ON

SQL> commit;

Commit complete.

SQL>

SQL> shutdown immediate;

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL>

SQL>

SQL> DOC

DOC>#######################################################################

DOC>#######################################################################

DOC>

DOC> The above sql script is the final step of the upgrade. Please

DOC> review any errors in the spool log file. If there are any errors in

DOC> the spool file, consult the Oracle Database Upgrade Guide for

DOC> troubleshooting recommendations.

DOC>

DOC> Next restart for normal operation, and then run utlrp.sql to

DOC> recompile any invalid application objects.

DOC>

DOC> If the source database had an older time zone version prior to

DOC> upgrade, then please run the DBMS_DST package. DBMS_DST will upgrade

DOC> TIMESTAMP WITH TIME ZONE data to use the latest time zone file shipped

DOC> with Oracle.

DOC>

DOC>#######################################################################

DOC>#######################################################################

DOC>#

SQL>

SQL> Rem Set errorlogging off

SQL> SET ERRORLOGGING OFF;

SQL>

SQL> REM END OF CATUPGRD.SQL

SQL>

SQL> REM bug 12337546 - Exit current sqlplus session at end of catupgrd.sql.

SQL> REM This forces user to start a new sqlplus session in order

查詢錯誤發現錯誤

SQL> SELECT TO_NUMBER('MUST_BE_SAME_TIMEZONE_FILE_VERSION')

2 FROM registry$database

3 WHERE tz_version != (SELECT version from v$timezone_file);

SELECT TO_NUMBER('MUST_BE_SAME_TIMEZONE_FILE_VERSION')

*

ERROR at line 1:

ORA-01722: invalid number

是時區方面的錯誤,略過。沒有發現無效對象若有執行@utlrpt.sql

2.查詢當前版本時區,11.2.0.4時區應為14

SQL> SELECT version FROM v$timezone_file;

VERSION

----------

11

3.關閉數據庫啟用歸檔使用rman備份數據庫,關閉定時任務

SQL> shutdown immediate;

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> startup mount

ORACLE instance started.

Total System Global Area 630501376 bytes

Fixed Size 2215984 bytes

Variable Size 205524944 bytes

Database Buffers 419430400 bytes

Redo Buffers 3330048 bytes

Database mounted.

SQL> alter database archivelog;

Database altered.

SQL> alter database open;

Database altered

RMAN> backup database format '/backup/full_%U';

Starting backup at 11-MAY-16

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=35 device type=DISK

channel ORA_DISK_1: starting full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

input datafile file number=00001 name=/oradata/super/system01.dbf

input datafile file number=00002 name=/oradata/super/sysaux01.dbf

input datafile file number=00003 name=/oradata/super/undotbs01.dbf

input datafile file number=00004 name=/oradata/super/users01.dbf

channel ORA_DISK_1: starting piece 1 at 11-MAY-16

channel ORA_DISK_1: finished piece 1 at 11-MAY-16

piece handle=/backup/full_03r59mqe_1_1 tag=TAG20160511T030030 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:01:15

channel ORA_DISK_1: starting full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

including current control file in backup set

including current SPFILE in backup set

channel ORA_DISK_1: starting piece 1 at 11-MAY-16

channel ORA_DISK_1: finished piece 1 at 11-MAY-16

piece handle=/backup/full_04r59msq_1_1 tag=TAG20160511T030030 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01

Finished backup at 11-MAY-16

4.准備使用新的(11.2.0.4)ORACLE_HOME登陸

1)拷貝spfile.ora init.ora(本實驗使用pfile) 密碼文件,listener.ora,tnsnames.ora,sqlnet.ora文件到新的ORACLE_HOME相應目錄相應目錄

,修改oracle環境變量,由/u01改為/u02

2)查看compatible兼容性設置

SQL> show parameter compatible

NAME TYPE VALUE

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

compatible string 11.2.0.0.0

3)vi /etc/oratab 修改oracle使用的oracle_home

4)如果開啟em的話拷貝相應目錄到新的目錄下 ,本環境沒有開啟

Database Vault也沒有開啟(禁用參考Enabling and Disabling Oracle Database Vault in UNIX (文檔 ID 453903.1))

ORACLE_HOME/<hostname_dbname>

ORACLE_HOME/oc4j/j2ee/OC4J_DBConsole_<hostname_dbname>

5)生成pfile文件,編輯所需目錄,根據upgrade腳本的提示修改java_pool_size和java_pool_size設置大於250M,否則jvm升級失敗

SQL> create pfile='/tmp/pfile.ora' from spfile;

File created.

6)關閉數據庫,使用11.2.0.4sqlplus登陸

[oracle@fliter ~]$ exit

logout

[root@fliter ~]# su - oracle

[oracle@fliter ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Wed May 11 03:14:40 2016

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

Connected to an idle instance.

SQL> startup nomount pfile='/tmp/pfile.ora';

ORACLE instance started.

Total System Global Area 630501376 bytes

Fixed Size 2255872 bytes

Variable Size 234882048 bytes

Database Buffers 390070272 bytes

Redo Buffers 3293184 bytes

SQL> create spfile from pfile='/tmp/pfile.ora';

File created.

SQL> shutdown immediate;

ORA-01109: database not open

5.開始升級

Database dismounted.

ORACLE instance shut down.

SQL> startup upgrade

ORACLE instance started.

Total System Global Area 630501376 bytes

Fixed Size 2255872 bytes

Variable Size 234882048 bytes

Database Buffers 390070272 bytes

Redo Buffers 3293184 bytes

Database mounted.

Database opened.

SQL> spool /tmp/upgrade.log

SQL> set echo on

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

SQL> Rem

SQL> Rem $Header: rdbms/admin/catupgrd.sql /st_rdbms_11.2.0/3 2011/05/18 15:07:25 cmlim Exp $

SQL> Rem

SQL> Rem catupgrd.sql

SQL> Rem

。。。

。。。

Oracle Database 11.2 Post-Upgrade Status Tool 05-11-2016 04:12:46

.

Component Current Version Elapsed Time

Name Status Number HH:MM:SS

.

Oracle Server

. VALID 11.2.0.4.0 00:11:00

JServer JAVA Virtual Machine

. VALID 11.2.0.4.0 00:05:55

Oracle Workspace Manager

. VALID 11.2.0.4.0 00:00:29

OLAP Analytic Workspace

. VALID 11.2.0.4.0 00:00:40

OLAP Catalog

. VALID 11.2.0.4.0 00:00:33

Oracle OLAP API

. VALID 11.2.0.4.0 00:00:27

Oracle Enterprise Manager

. VALID 11.2.0.4.0 00:02:37

Oracle XDK

. VALID 11.2.0.4.0 00:00:30

Oracle Text

. VALID 11.2.0.4.0 00:00:33

Oracle XML Database

. VALID 11.2.0.4.0 00:02:38

Oracle Database Java Packages

. VALID 11.2.0.4.0 00:00:18

Oracle Multimedia

. VALID 11.2.0.4.0 00:02:44

Spatial

. VALID 11.2.0.4.0 00:03:12

Oracle Expression Filter

. VALID 11.2.0.4.0 00:00:09

Oracle Rules Manager

. VALID 11.2.0.4.0 00:00:06

Oracle Application Express

. VALID 3.2.1.00.10

Final Actions

. 00:00:01

Total Upgrade Time: 00:32:02

PL/SQL procedure successfully completed.

SQL> spool off

SQL> SET SERVEROUTPUT OFF

SQL> SET VERIFY ON

SQL> commit;

Commit complete.

SQL>

SQL> shutdown immediate;

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL>

SQL>

SQL> DOC

DOC>#######################################################################

DOC>#######################################################################

DOC>

DOC> The above sql script is the final step of the upgrade. Please

DOC> review any errors in the spool log file. If there are any errors in

DOC> the spool file, consult the Oracle Database Upgrade Guide for

DOC> troubleshooting recommendations.

DOC>

DOC> Next restart for normal operation, and then run utlrp.sql to

DOC> recompile any invalid application objects.

DOC>

DOC> If the source database had an older time zone version prior to

DOC> upgrade, then please run the DBMS_DST package. DBMS_DST will upgrade

DOC> TIMESTAMP WITH TIME ZONE data to use the latest time zone file shipped

DOC> with Oracle.

DOC>

DOC>#######################################################################

DOC>#######################################################################

DOC>#

SQL>

SQL> Rem Set errorlogging off

SQL> SET ERRORLOGGING OFF;

SQL>

SQL> REM END OF CATUPGRD.SQL

SQL>

SQL> REM bug 12337546 - Exit current sqlplus session at end of catupgrd.sql.

SQL> REM This forces user to start a new sqlplus session in order

SQL> REM to connect to the upgraded db.

SQL> spool off

SQL> shutdown immediate;

Database closed.

Database dismounted.

ORACLE instance shut down.

2)繼續剩下的升級

SQL> @$ORACLE_HOME/rdbms/admin/catuppst.sql

TIMESTAMP

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

COMP_TIMESTAMP POSTUP_BGN 2016-05-11 04:41:37

PL/SQL procedure successfully completed.

This script will migrate the Baseline data on a pre-11g database

to the 11g database.

... ...

... Completed Moving the Baseline Data ...

... ...

... If there are no Move BL Data messages ...

... above, then there are no renamed ...

... baseline tables in the system. ...

... ...

... ...

... Completed the Dropping of the ...

... Renamed Baseline Tables ...

... ...

... If there are no Drop Table messages ...

... above, then there are no renamed ...

... baseline tables in the system. ...

... ...

PL/SQL procedure successfully completed.

......

......

Generating apply and rollback scripts...

Check the following file for errors:

/u02/app/oracle/cfgtoollogs/catbundle/catbundle_PSU_SUPER_GENERATE_2016May11_04_41_43.log

Apply script: /u02/app/oracle/product/11.2.0/dbhome_1/rdbms/admin/catbundle_PSU_SUPER_APPLY.sql

Rollback script: /u02/app/oracle/product/11.2.0/dbhome_1/rdbms/admin/catbundle_PSU_SUPER_ROLLBACK.sql

PL/SQL procedure successfully completed.

Executing script file...

3)編譯無效對象

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

DOC> The following query reports the number of errors caught during

DOC> recompilation. If this number is non-zero, please query the error

DOC> messages in the table UTL_RECOMP_ERRORS to see if any of these errors

DOC> are due to misconfiguration or resource constraints that must be

DOC> fixed before objects can compile successfully.

DOC>#

ERRORS DURING RECOMPILATION

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

0

Function created.

PL/SQL procedure successfully completed.

Function dropped.

PL/SQL procedure successfully completed.

4)收集升級信息

SQL> @/tmp/dbupgdiag.sql

Enter location for Spooled output:

11_May_2016_0448 .log

super_

SP2-0606: Cannot create SPOOL file "0/db_upg_diag_super_11_May_2016_0448.log"

*** Start of LogFile ***

Oracle Database Upgrade Diagnostic Utility 05-11-2016 04:48:27

===============

Hostname

===============

fliter

===============

===========================================================================================

count of records in the system.aud$ when dbid is null, Std Auditing with OLS or DV installed

============================================================================================

select count(*) from system.aud$ where dbid is null

*

ERROR at line 1:

ORA-00942: table or view does not exist

DOC>#################################################################

DOC>

DOC> If the JAVAVM component is not installed in the database (for

DOC> example, after creating the database with custom scripts), the

DOC> next query will report the following error:

DOC>

DOC> select dbms_java.longname('foo') "JAVAVM TESTING" from dual

DOC> *

DOC> ERROR at line 1:

DOC> ORA-00904: "DBMS_JAVA"."LONGNAME": invalid identifier

DOC>

DOC> If the JAVAVM component is installed, the query should succeed

DOC> with 'foo' as result.

DOC>

DOC>#################################################################

DOC>#

JAVAVM TESTING

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

foo

===================================

Oracle Multimedia/InterMedia status

===================================

.

Oracle Multimedia/interMedia is installed and listed with the following version: 11.2.0.4.0 and status: VALID

.

Checking for installed Database Schemas...

ORDSYS user exists.

ORDPLUGINS user exists.

MDSYS user exists.

SI_INFORMTN_SCHEMA user exists.

ORDDATA user exists.

.

Checking for Prerequisite Components...

JAVAVM installed and listed as valid

XDK installed and listed as valid

XDB installed and listed as valid

Validating Oracle Multimedia/interMedia...(no output if component status is valid)

PL/SQL procedure successfully completed.

*** End of LogFile ***

6.更改時區

1)升級時區前檢查

SQL> purge dba_recyclebin;

DBA Recyclebin purged.

SQL> alter session set "_with_subquery"=materialize;

Session altered.

SQL> alter session set "_simple_view_merging"=TRUE;

Session altered.

SQL> EXEC DBMS_APPLICATION_INFO.SET_CLIENT_INFO('upg_tzv');

PL/SQL procedure successfully completed.

SQL> EXEC DBMS_DST.BEGIN_PREPARE(14);

A prepare window has been successfully started.

PL/SQL procedure successfully completed.

SQL> select version from v$timezone_file;

VERSION

----------

11

1 row selected.

SQL> SELECT PROPERTY_NAME, SUBSTR(property_value, 1, 30) value

2 FROM DATABASE_PROPERTIES

3 WHERE PROPERTY_NAME LIKE 'DST_%'

4 ORDER BY PROPERTY_NAME;

PROPERTY_NAME VALUE

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

DST_PRIMARY_TT_VERSION 11

DST_SECONDARY_TT_VERSION 14

DST_UPGRADE_STATE PREPARE

3 rows selected.

SQL> TRUNCATE TABLE SYS.DST$TRIGGER_TABLE;

TRUNCATE TABLE sys.dst$affected_tables;

TRUNCATE TABLE sys.dst$error_table;

Table truncated.

SQL>

Table truncated.

SQL>

Table truncated.

SQL> set serveroutput on

SQL> BEGIN

2 DBMS_DST.FIND_AFFECTED_TABLES

3 (affected_tables => 'sys.dst$affected_tables',

4 log_errors => TRUE,

5 log_errors_table => 'sys.dst$error_table');

6 END;

7 /

PL/SQL procedure successfully completed.

SQL> SELECT * FROM sys.dst$affected_tables;

no rows selected

SQL> SELECT * FROM sys.dst$error_table;

no rows selected

SQL> SELECT * FROM sys.dst$error_table where ERROR_NUMBER= '1883';

no rows selected

SQL>

SQL> SELECT * FROM sys.dst$error_table where ERROR_NUMBER= '1878';

no rows selected

SQL> SELECT * FROM sys.dst$error_table where ERROR_NUMBER not in ('1878','1883');

no rows selected

SQL>

SQL> EXEC DBMS_DST.END_PREPARE;

A prepare window has been successfully ended.

PL/SQL procedure successfully completed.

SQL> SELECT PROPERTY_NAME, SUBSTR(property_value, 1, 30) value

2 FROM DATABASE_PROPERTIES

3 WHERE PROPERTY_NAME LIKE 'DST_%'

4 ORDER BY PROPERTY_NAME;

PROPERTY_NAME VALUE

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

DST_PRIMARY_TT_VERSION 11

DST_SECONDARY_TT_VERSION 0

DST_UPGRADE_STATE NONE

3 rows selected.

2)升級時區

SQL> startup upgrade;

ORACLE instance started.

Total System Global Area 630501376 bytes

Fixed Size 2255872 bytes

Variable Size 234882048 bytes

Database Buffers 390070272 bytes

Redo Buffers 3293184 bytes

Database mounted.

Database opened.

SQL> SQL> set serveroutput on

SQL> SELECT PROPERTY_NAME, SUBSTR(property_value, 1, 30) value

2 FROM DATABASE_PROPERTIES

3 WHERE PROPERTY_NAME LIKE 'DST_%'

4 ORDER BY PROPERTY_NAME;

PROPERTY_NAME VALUE

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

DST_PRIMARY_TT_VERSION 11

DST_SECONDARY_TT_VERSION 0

DST_UPGRADE_STATE NONE

3 rows selected.

SQL> TRUNCATE TABLE SYS.DST$TRIGGER_TABLE;

TRUNCATE TABLE sys.dst$affected_tables;

TRUNCATE TABLE sys.dst$error_table;

Table truncated.

SQL>

Table truncated.

SQL>

Table truncated.

SQL> alter session set "_with_subquery"=materialize;

Session altered.

SQL> alter session set "_simple_view_merging"=TRUE;

Session altered.

SQL>

SQL> EXEC DBMS_APPLICATION_INFO.SET_CLIENT_INFO('upg_tzv');

PL/SQL procedure successfully completed.

SQL> EXEC DBMS_DST.BEGIN_UPGRADE(<the new DST version number>);

BEGIN DBMS_DST.BEGIN_UPGRADE(<the new DST version number>); END;

*

ERROR at line 1:

ORA-06550: line 1, column 30:

PLS-00103: Encountered the symbol "<" when expecting one of the following:

( ) - + case mod new not null <an identifier>

<a double-quoted delimited-identifier> <a bind variable>

table continue avg count current exists max min prior sql

stddev sum variance execute multiset the both leading

trailing forall merge year month day hour minute second

timezone_hour timezone_minute timezone_region timezone_abbr

time timestamp interval date

<a string literal with character set specification>

SQL> EXEC DBMS_DST.BEGIN_UPGRADE(14);

An upgrade window has been successfully started.

PL/SQL procedure successfully completed.

SQL> SELECT * FROM sys.dst$error_table;

no rows selected

SQL> SELECT PROPERTY_NAME, SUBSTR(property_value, 1, 30) value

2 FROM DATABASE_PROPERTIES

3 WHERE PROPERTY_NAME LIKE 'DST_%'

4 ORDER BY PROPERTY_NAME;

PROPERTY_NAME VALUE

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

DST_PRIMARY_TT_VERSION 14

DST_SECONDARY_TT_VERSION 11

DST_UPGRADE_STATE UPGRADE

3 rows selected.

SQL> select OWNER, TABLE_NAME, UPGRADE_IN_PROGRESS from ALL_TSTZ_TABLES where UPGRADE_IN_PROGRESS='YES';

OWNER TABLE_NAME UPG

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

SYSMAN AQ$_MGMT_LOADER_QTABLE_L YES

SYSMAN AQ$_MGMT_LOADER_QTABLE_S YES

SYSMAN AQ$_MGMT_NOTIFY_QTABLE_L YES

SYSMAN AQ$_MGMT_NOTIFY_QTABLE_S YES

SYSMAN MGMT_PROV_ASSIGNMENT YES

SYSMAN MGMT_PROV_BOOTSERVER YES

SYSMAN MGMT_PROV_CLUSTER_NODES YES

SYSMAN MGMT_PROV_DEFAULT_IMAGE YES

SYSMAN MGMT_PROV_IP_RANGE YES

SYSMAN MGMT_PROV_NET_CONFIG YES

SYSMAN MGMT_PROV_OPERATION YES

SYSMAN MGMT_PROV_RPM_REP YES

SYSMAN MGMT_PROV_STAGING_DIRS YES

SYSMAN MGMT_PROV_SUITE_INST_MEMBERS YES

14 rows selected.

3)更改某些使用時區的模塊

SQL> shutdown immediate;

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> startup

ORACLE instance started.

Total System Global Area 630501376 bytes

Fixed Size 2255872 bytes

Variable Size 234882048 bytes

Database Buffers 390070272 bytes

Redo Buffers 3293184 bytes

Database mounted.

Database opened.

SQL> alter session set "_with_subquery"=materialize;

Session altered.

SQL> alter session set "_simple_view_merging"=TRUE;

Session altered.

SQL> SELECT version FROM v$timezone_file;

VERSION

----------

14

1 row selected.

SQL> EXEC DBMS_APPLICATION_INFO.SET_CLIENT_INFO('upg_tzv');

PL/SQL procedure successfully completed.

SQL> set serveroutput on

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 => FALSE,

8 error_on_nonexisting_time => FALSE);

9 DBMS_OUTPUT.PUT_LINE('Failures:'|| :numfail);

10 END;

11 /

Table list: "SYSMAN"."MGMT_PROV_SUITE_INST_MEMBERS"

Number of failures: 0

Table list: "SYSMAN"."MGMT_PROV_STAGING_DIRS"

Number of failures: 0

Table list: "SYSMAN"."MGMT_PROV_RPM_REP"

Number of failures: 0

Table list: "SYSMAN"."MGMT_PROV_OPERATION"

Number of failures: 0

Table list: "SYSMAN"."MGMT_PROV_NET_CONFIG"

Number of failures: 0

Table list: "SYSMAN"."MGMT_PROV_IP_RANGE"

Number of failures: 0

Table list: "SYSMAN"."MGMT_PROV_DEFAULT_IMAGE"

Number of failures: 0

Table list: "SYSMAN"."MGMT_PROV_CLUSTER_NODES"

Number of failures: 0

Table list: "SYSMAN"."MGMT_PROV_BOOTSERVER"

Number of failures: 0

Table list: "SYSMAN"."MGMT_PROV_ASSIGNMENT"

Number of failures: 0

Table list: "SYSMAN"."AQ$_MGMT_NOTIFY_QTABLE_S"

Number of failures: 0

Table list: "SYSMAN"."AQ$_MGMT_NOTIFY_QTABLE_L"

Number of failures: 0

Table list: "SYSMAN"."AQ$_MGMT_LOADER_QTABLE_S"

Number of failures: 0

Table list: "SYSMAN"."AQ$_MGMT_LOADER_QTABLE_L"

Number of failures: 0

Failures:0

PL/SQL procedure successfully completed.

SQL> SELECT * FROM sys.dst$error_table;

no rows selected

SQL> VAR fail number

SQL> BEGIN

2 DBMS_DST.END_UPGRADE(:fail);

3 DBMS_OUTPUT.PUT_LINE('Failures:'|| :fail);

4 END;

5 /

An upgrade window has been successfully ended.

Failures:0

PL/SQL procedure successfully completed.

SQL> SELECT PROPERTY_NAME, SUBSTR(property_value, 1, 30) value

2 FROM DATABASE_PROPERTIES

3 WHERE PROPERTY_NAME LIKE 'DST_%'

4 ORDER BY PROPERTY_NAME;

PROPERTY_NAME VALUE

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

DST_PRIMARY_TT_VERSION 14

DST_SECONDARY_TT_VERSION 0

DST_UPGRADE_STATE NONE

3 rows selected.

SQL> SELECT * FROM v$timezone_file;

FILENAME VERSION

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

timezlrg_14.dat 14

1 row selected.

4)升級恢復目錄未使用,未開啟database vault

5)重新收集統計信息

exec dbms_stats.gather_database_stats(estimate_percent=>10,degree=>8,cascade=>true,granularity=>'ALL');

Copyright © Linux教程網 All Rights Reserved