同機上升級oracle10.2.0.5到11.2.0.4
在同一臺機器上將oracle10.2.0.4升級到11.2.0.5。以下是升級過程
1、在本機上首先安裝oracle11.2.0.4的資料庫環境
安裝過程就不用多說了,建好目錄,上傳相關的包等,正常進行安裝即可!
2、將11g ORACLE_HOME/rdbms/admin/utlu112i.sql複製到oracle10g相應的目錄中
[oracle@scmtest ~]$ cp /u01/app/oracle/product/11.2.0/db_1/rdbms/admin/utlu112i.sql / u01/app/oracle/product/10.2.0/db1/rdbms/admin/
[oracle@scmtest ~]$ export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db1
[oracle@scmtest ~]$ cd /u01/app/oracle/product/10.2.0/db1/bin
./sqlplus "/as sysdba"
SQL> spool /u02/upgrade.log;
SQL> @/u01/app/oracle/product/10.2.0/db1/rdbms/admin/utlu112i.sql;
得到一個檢查結果:
SQL> @?/rdbms/admin/utlu112i.sql;
Oracle Database 11.2 Pre-Upgrade Information Tool 11-12-2013 08:24:15
Script Version: 11.2.0.4.0 Build: 001
.
**********************************************************************
Database:
**********************************************************************
--> name: YLINDB
--> version: 10.2.0.5.0
--> compatible: 10.2.0.5.0
--> blocksize: 8192
--> platform: Linux x86 64-bit
--> timezone file: V4
.
**********************************************************************
Tablespaces: [make adjustments in the current environment]
**********************************************************************
--> SYSTEM tablespace is adequate for the upgrade.
.... minimum required size: 1036 MB
--> UNDOTBS1 tablespace is adequate for the upgrade.
.... minimum required size: 400 MB
--> SYSAUX tablespace is adequate for the upgrade.
.... minimum required size: 1142 MB
--> TEMP1 tablespace is adequate for the upgrade.
.... minimum required size: 60 MB
.
**********************************************************************
Flashback: OFF
**********************************************************************
**********************************************************************
Update Parameters: [Update Oracle Database 11.2 init.ora or spfile]
Note: Pre-upgrade tool was run on a lower version 64-bit database.
**********************************************************************
--> If Target Oracle is 32-Bit, refer here for Update Parameters:
WARNING: --> "java_pool_size" needs to be increased to at least 64 MB
.
--> If Target Oracle is 64-Bit, refer here for Update Parameters:
WARNING: --> "java_pool_size" needs to be increased to at least 128 MB
.
**********************************************************************
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]
**********************************************************************
--> 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] VALID
--> OLAP Catalog [upgrade] VALID
--> EM Repository [upgrade] VALID
--> Oracle Text [upgrade] VALID
--> Oracle XML Database [upgrade] VALID
--> Oracle Java Packages [upgrade] VALID
--> Oracle interMedia [upgrade] VALID
--> Spatial [upgrade] VALID
--> Data Mining [upgrade] VALID
--> Expression Filter [upgrade] VALID
--> Rule Manager [upgrade] VALID
--> Oracle OLAP API [upgrade] VALID
.
**********************************************************************
Miscellaneous Warnings
**********************************************************************
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 10.2.0.5.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 MDSYS has 18 INVALID objects.
.... USER DMSYS has 2 INVALID objects.
.... USER PUBLIC has 341 INVALID objects.
.... USER CTXSYS has 1 INVALID objects.
.... USER ORACLE_OCM has 2 INVALID objects.
.... USER EXFSYS has 8 INVALID objects.
.... USER DBSNMP has 4 INVALID objects.
.... USER SYSMAN has 3 INVALID objects.
.... USER XDB has 3 INVALID objects.
.... USER SYS has 411 INVALID objects.
.... USER WMSYS has 25 INVALID objects.
WARNING: --> EM Database Control Repository exists in the database.
.... Direct downgrade of EM Database Control is not supported. Refer to the
.... Upgrade Guide for instructions to save the EM data prior to upgrade.
.
**********************************************************************
Recommendations
**********************************************************************
Oracle recommends gathering dictionary statistics prior to
upgrading the database.
To gather dictionary statistics execute the following command
while connected as SYSDBA:
EXECUTE dbms_stats.gather_dictionary_stats;
**********************************************************************
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.
**********************************************************************
根據結果調整引數,記憶體資源。
主要調整:java_pool_size,列出來的幾個表空間的大小是否滿足要求
3、建立11g引數檔案
[oracle@scmtest ~]$ export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db1
[oracle@scmtest ~]$ cd /u01/app/oracle/product/10.2.0/db1/bin
[oracle@scmtest ~]$ ./sqlplus "/as sysdba"
SQL> create pfile='/u02/upgrade11g.ora' from spfile;
修改引數檔案:
java_pool_size >=128m
background_dump_dest =>diagnostic_dest
user_dump_dest =>diagnostic_dest
這裡必須修改,否則到後面啟動時報引數錯誤
[oracle@scmtest ~]$ export ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
[oracle@scmtest ~]$ cd /u01/app/oracle/product/11.2.0/db_1/bin
[oracle@scmtest ~]$ ./sqlplus "/as sysdba"
SQL> create spfile from pfile = ='/u02/upgrade11g.ora' ;
4、以upgrade啟動資料庫(11g ORACLE_HOME)
sqlplus "/as sysdba"
SQL> STARTUP UPGRADE
5、開始升級
SQL> SPOOL /u02/upgrade.log
SQL> @catupgrd.sql
這裡執行時間很長,執行結束後,會自動關閉資料庫,並退出sqlplus
The catupgrd.sql script determines which upgrade scripts must be run, runs them, and then shuts down the database. You must run the script in the Oracle Database 11g Release 2 (11.2) environment.
The upgrade script creates and alters certain data dictionary tables. It also upgrades or installs the following database components in the new Oracle Database 11g Release 2 (11.2) database:
6、重新啟動資料庫,檢視升級結果
SQL> STARTUP
SQL> @?/rdbms/admin/utlu112s.sql
檢查升級結果
7、執行catuppst.sql,執行升級
SQL> @?/rdbms/admin/catuppst.sql
This may generate the following informational messages:
Generating apply and rollback scripts...
Check the following file for errors:
Apply script: .*
Rollback script: .*
Executing script file...
Updating registry...
Check the following log file for errors:
Generating apply and rollback scripts...
Check the following file for errors:
.../cfgtoollogs/catbundle/catbundle_PSU_*.log
Apply script:
.../rdbms/admin/catbundle_PSU_*_APPLY.sql
Rollback script:
.../rdbms/admin/catbundle_PSU_*_ROLLBACK.sql
Executing script file...
Updating registry...
Check the following log file for errors:
.../cfgtoollogs/catbundle/catbundle_PSU_*.log
執行以下指令碼,對失效物件進行再編譯
SQL> @?/rdbms/admin/utlrp.sql
檢查是否還存在失效物件
SQL> SELECT count(*) FROM dba_invalid_objects;
SQL> SELECT distinct object_name FROM dba_invalid_objects;
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/30208428/viewspace-2121373/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- RMAN跨版本恢復--從Oracle10.2.0.5恢復到Oracle11.2.0.4Oracle
- 圖形化升級單機oracle 11.2.0.1 到 11.2.0.4Oracle
- 圖形化升級單機oracle 11.2.0.4 到 12.2.0.1Oracle
- Oracle 11.2.0.4升級到12.2.0.1Oracle
- oracle rac 11.2.0.3 升級到11.2.0.4Oracle
- oracle for windows 11.2.0.1升級到11.2.0.4OracleWindows
- 單機升級11.2.0.4到12.1.0.2的實戰__catupgrd.sqlSQL
- 單機升級11.2.0.1到11.2.0.4的實戰__DBUA視窗
- oracle資料庫升級11.2.0.3升級到11.2.0.4Oracle資料庫
- oracle資料庫11.2.0.3升級到11.2.0.4Oracle資料庫
- RAC升級11.2.0.1到11.2.0.4的實戰
- 11.2.0.3 database異機升級至11.2.0.4Database
- 靜默升級oracle 11g (從11.2.0.1升級到11.2.0.4)Oracle
- Oracle RAC 10.2.0.5升級到11.2.0.4遇到的問題Oracle
- Oracle資料庫異機升級(10.2.0.5 --> 11.2.0.4)Oracle資料庫
- 線上升級Redis紀實Redis
- 如何升級Oracle Grid Infrastructure和RAC從11.2.0.3到11.2.0.4?OracleASTStruct
- 探索Oracle之資料庫升級二 11.2.0.3升級到11.2.0.4完整步驟Oracle資料庫
- 使用DBUA升級 Oracle 11.2.0.4到Oracle 19C的問題記錄Oracle
- 單例項環境下Oracle 11.2.0.3升級到11.2.0.4的過程單例Oracle
- dbua升級oracle 10.2.0.1 0 到11.2.0.4 失敗後還原過程Oracle
- Oracle 10.2.0.5升級至11.2.0.4Oracle
- Oracle 11.2.0.4 從單例項,使用RMAN 異機恢復到RACOracle單例
- 通過rman為客戶實現linux下oracle11.2.0.4到windows下oracle同版本資料庫的異機恢復。LinuxOracleWindows資料庫
- Oracle10.2.0.1RAC 升級 Oracle10.2.0.5案例分享 -DATABASE篇OracleDatabase
- Oracle10.2.0.1RAC 升級 Oracle10.2.0.5案例分享 -CRS篇Oracle
- oracle11.2.0.3升級到11.2.0.4出現查詢效能問題,分析處理Oracle
- mongodb單機從3.2升級到4.0.4升級MongoDB
- SequoiaDB版本線上升級介紹說明
- 升級到 11.2.0.3/11.2.0.4 GI/ASM 前需要考慮的事情 (文件 ID 1623280.1)ASM
- jq獲取上級、同級、下級元素
- Oracle:Oracle RAC 11.2.0.4 升級為 19cOracle
- centos7 離線升級/線上升級作業系統核心CentOS作業系統
- 中國一半使用者還沒有免費升級到win10系統:馬上升級還來得及Win10
- Linux/Unix 平臺上升級到 11gR2 Grid Infrastructure(GI) 出錯的處理方法LinuxASTStruct
- 惠普本週釋出全球同級別最小鐳射印表機
- 【Mysql】傳統複製線上升級為GTID模式MySql模式
- JavaScript獲取同級元素JavaScript