oracle 資料庫從10.2.0.4升級到11.2.0.3
資料庫: 10.2.0.4
前期準備:在兩臺機器的相同目錄下安裝11.2.0.3的資料庫軟體,別安裝在以前的10G目錄下。
一、停雙機,掛儲存
service rgmanager stop
service cman stop
mount /dev/arc_vg01/arc_lv01 /oradata
mount /dev/oralnx_vg01/ora_lv01 /oradata/oralnx
mount /dev/oralnx_vg01/ora_lv02 /oradata/lbsdata
mount /dev/lbsdata_vg01/lbs_lv01 /oradata/lbsdata01
mount /dev/lbsdata_vg02/lbs_lv02 /oradata/lbsdata02
mount /dev/lbsdata_vg03/lbs_lv03 /oradata/lbsdata03
mount /dev/lbsdata_vg04/lbs_lv04 /oradata/lbsdata04
二、啟動資料庫
su - oracle
sqlplus / as sysdba
startup;
三、做測試前的準備
在11G的安裝目錄下,執行utlu112i.sql,進行升級前的檢查。
SQL> @/home/oracle/app/oracle/product/11.2.0/dbhome_1/rdbms/admin/utlu112i.sql
Oracle Database 11.2 Pre-Upgrade Information Tool 07-21-2014 14:10:21
Script Version: 11.2.0.3.0 Build: 001
.
**********************************************************************
Database:
**********************************************************************
--> name: ORALNX
--> version: 10.2.0.4.0
--> compatible: 10.2.0.3.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: 9551 MB
--> UNDOTBS1 tablespace is adequate for the upgrade.
.... minimum required size: 400 MB
--> SYSAUX tablespace is adequate for the upgrade.
.... minimum required size: 19398 MB
--> TEMP 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:
-- No update parameter changes are required.
.
--> If Target Oracle is 64-Bit, refer here for Update Parameters:
-- No update parameter changes are required.
.
**********************************************************************
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.4.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 JSHX has 5 INVALID objects.
.... USER LBS has 83 INVALID objects.
.... USER SPOT has 11 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.
WARNING: --> Your recycle bin contains 65 object(s).
.... It is REQUIRED that the recycle bin is empty prior to upgrading
.... your database. The command:
PURGE DBA_RECYCLEBIN
.... must be executed immediately prior to executing your 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.
**********************************************************************
四、收集字典統計資訊。EXECUTE dbms_stats.gather_dictionary_stats;
五、開始升級
在11G ORACLE_HOME/bin下執行DBUA。
下面的操作比較簡單,根據圖形介面的操作提示進行操作。在操作的過程中,我一直在監控日誌,中間有啟停資料庫的操作。由於資料量比較大,有3、4個T,但3個小時總算搞完了。
六、升級完後,進行資料庫檢查,發現一臺ORACLE_HOME下有spfile 檔案、密碼檔案已經TNS檔案,於是將這幾個檔案拷貝到另一臺。手動啟資料,如果正常的話,可以起雙機進行測試。
具體操作:停止資料庫。
umount /oradata/oralnx
umount /oradata/lbsdata
umount /oradata/lbsdata01
umount /oradata/lbsdata02
umount /oradata/lbsdata03
umount /oradata/lbsdata04
umount /oradata
啟雙機,注意先在一臺上啟,啟完後再在另一臺上啟。
service cman start
service rgmanager start
附錄:通過指令碼升級10.2.0.4到11.2.0.3
1、安裝11.2.0.3的patchset(安裝在新的ORACLE_HOME下)
2、升級前的預檢查
sqlplus / as sysdba
SQL>spool upgrade_info.log
SQL>@$ORACLE_HOME/rdbms/admin/utlu112i.sql
SQL>spool off
檢查upgrade_info.log 日誌資訊,將相關警告及錯誤一一解決
3、手動升級資料庫
SQL>shutdown immediate
SQL>startup upgrade
SQL>spool upgrade.log
SQL>@catupgrd.sql
SQL>startup
SQL>@utlu112s.sql
SQL>@catuppst.sql
SQL>@utlrp.sql
SQL>select count(*) from dba_invalid_objects;
SQL>select distinct object_name from dba_invalid_objects;
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/22969361/viewspace-1224553/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- oracle資料庫11.2.0.3升級到11.2.0.4Oracle資料庫
- oracle rac 11.2.0.3 升級到11.2.0.4Oracle
- 從Oracle資料庫故障到AIX記憶體管理Oracle資料庫AI記憶體
- 坑爹的Oracle 11.2.0.3Oracle
- DataX將MySql資料庫資料同步到Oracle資料庫MySql資料庫Oracle
- DataX將Oracle資料庫資料同步到達夢資料庫Oracle資料庫
- 配置ORACLE資料庫到達夢資料庫的異構DBLINKOracle資料庫
- 靜默方式安裝、升級oracle(三): 升級資料庫軟體及資料庫Oracle資料庫
- 從Oracle的資料庫世界路過APOracle資料庫
- 從資料庫到雲Oracle持續創新成就市場領導力資料庫Oracle
- java 從EXCEL匯入到資料庫JavaExcel資料庫
- 從Oracle資料庫管理員的角度看PostgreSQLOracle資料庫SQL
- Oracle資料庫升級或資料遷移的方法探討Oracle資料庫
- Realm資料庫 從入門到“放棄”資料庫
- oracle資料庫升級的時候oracle universal installer has detected........Oracle資料庫
- 「Oracle」Oracle 資料庫安裝Oracle資料庫
- 【UP_ORACLE】Oracle 19c之從19.3升級到19.9Oracle
- 從 Oracle 日誌解析學習資料庫核心原理Oracle資料庫
- GeoRapter工具將shapefile資料匯入到Oracle空間資料庫中APTOracle資料庫
- 靜默升級oracle 11g (從11.2.0.1升級到11.2.0.4)Oracle
- Oracle資料庫配置Oracle資料庫
- 從資料庫到前端,使用 enum 代替 constant number資料庫前端
- 資料庫連線分析(1)-從JDBC到MyBatis資料庫JDBCMyBatis
- Oracle 12.2新特性: PDB級閃回資料庫(Flashback PDB)Oracle資料庫
- 靜默方式安裝、升級oracle(二): 建立資料庫Oracle資料庫
- oracle資料庫與oracle例項Oracle資料庫
- 「Oracle」Oracle 資料庫基本概念Oracle資料庫
- 「Oracle」Oracle資料庫基本概念Oracle資料庫
- Oracle資料庫-----資料庫的基本概念Oracle資料庫
- oracle 備份資料庫,匯出資料庫Oracle資料庫
- 將Oracle 12c資料庫註冊到Oracle 19c Grid InfrastructureOracle資料庫ASTStruct
- Oracle 字符集從GBK升級到Utf8Oracle
- Oracle資料庫閃回Oracle資料庫
- oracle資料庫卡頓Oracle資料庫
- 4.2. Oracle資料庫Oracle資料庫
- Laravel 使用 Oracle 資料庫LaravelOracle資料庫
- Oracle 11.2.0.3 ORA-12012 ORA-29280 ORA-06512Oracle
- sqlserver讀取oracle資料庫資料SQLServerOracle資料庫
- oracle資料庫資料字典應用Oracle資料庫