圖形化升級單機oracle 11.2.0.1 到 11.2.0.4
1. 講補丁包上傳到 oracle server ,解壓、安裝
[root@11g ~]#unzip p13390677_112040_Linux-x86-64_1of7.zip -d /tmp && unzip p13390677_112040_Linux-x86-64_2of7.zip -d /tmp
2. 檢查當前版本
SQL> select * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
SQL> set linesize 150
SQL> set pagesize 9999
SQL> col comp_name format a40
SQL> SELECT COMP_NAME, VERSION, STATUS FROM SYS.DBA_REGISTRY;
COMP_NAME VERSION STATUS
---------------------------------------- ------------------------------ --------
OWB 11.2.0.1.0 VALID
Oracle Application Express 3.2.1.00.10 VALID
Oracle Enterprise Manager 11.2.0.1.0 VALID
OLAP Catalog 11.2.0.1.0 VALID
Spatial 11.2.0.1.0 VALID
Oracle Multimedia 11.2.0.1.0 VALID
Oracle XML Database 11.2.0.1.0 VALID
Oracle Text 11.2.0.1.0 VALID
Oracle Expression Filter 11.2.0.1.0 VALID
Oracle Rules Manager 11.2.0.1.0 VALID
Oracle Workspace Manager 11.2.0.1.0 VALID
Oracle Database Catalog Views 11.2.0.1.0 VALID
Oracle Database Packages and Types 11.2.0.1.0 VALID
JServer JAVA Virtual Machine 11.2.0.1.0 VALID
Oracle XDK 11.2.0.1.0 VALID
Oracle Database Java Packages 11.2.0.1.0 VALID
OLAP Analytic Workspace 11.2.0.1.0 VALID
Oracle OLAP API 11.2.0.1.0 VALID
18 rows selected.
3. 檢查磁碟空間(system 必須要最少 10m)
SQL> select a.tablespace_name, round(a.total_size) "total_size(mb)",
round(a.total_size) - round(b.free_size,3) "unsed_size(mb)",
round(b.free_size,3) "free_size(mb)",
round(b.free_size/total_size *100,2) ||'%' free_rate
from
(select tablespace_name,sum(bytes) /1024/1024 total_size
from dba_data_files
group by tablespace_name) a,
(select tablespace_name,sum(bytes)/1024/1024 free_size
from dba_free_space
group by tablespace_name) b
where a.tablespace_name=b.tablespace_name(+);
4.為資料庫做冷備份
RMAN>run {
shutdown immediate;
startup mount;
allocate channel c1 type disk;
allocate channel c2 type disk;
backup full tag='db_full_bak' database format '/home/oracle/rmanbak/full_cold_%d_%s.bak';
alter database open;
}
RMAN> list backup;
資料庫正常關閉後,還需要備份Oracle主目錄,目的還是為了升級失敗時,能夠還原出資料庫軟體到升級前的版本。
重點是如下目錄:
ORACLE_HOME/dbs
ORACLE_HOME/network/admin
ORACLE_HOME/hostname_dbname
ORACLE_HOME/oc4j/j2ee/OC4J_DBConsole_hostname_dbname
[oracle@11g ~]$ env|grep ORA
ORACLE_SID=orcl
ORACLE_BASE=/home/oracle/app
ORACLE_HOME=/home/oracle/app/oracle/product/11.2.0/dbhome_1
[oracle@11g ~]$ tar cvf oracle.ora /home/oracle
5. 關閉資料庫例項及相關程式 (靜態監聽、動態監聽、EOM、相關服務)
--停止資料庫外部程式
[root@11g ~]#ps -ef|grep -v grep |grep LOCAL=NO|awk '{print $2}'|xargs kill -9
SQL> shutdown immediate;
[oracle@11g rmanbak]$ cat /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
[oracle@11g rmanbak]$ lsnrctl stop
[oracle@11g rmanbak]$ lsnrctl status
[oracle@11g rmanbak]$ ps -ef |grep ora_|grep -v grep
[oracle@11g rmanbak]$ netstat -an |grep 1521
[oracle@11g rmanbak]$ netstat -an |grep 1158
6. 開始升級操作
[oracle@11g ~]$ cd /tmp/database
[oracle@11g database]$ ./runInstaller
6.1 不勾選 , 點選 next
6.2 選擇 skip software updates
6.3 選擇 upgrade an existing database
6.4 選擇語言
6.5 選擇 enterprise edition
6.6 注意這裡的安裝位置,我之前的安裝目錄是11.2.0,我新目錄是11.2.0.4 即將oracle 安裝到其他位置,這樣可以減少當機時間,也是oracle 推薦的方法。
6.7 執行到76%的時候彈出如下視窗: 用 root 使用者跑這個指令碼
下面就是一個配置監聽的過程
隨後就是 會自動呼叫DBUA 來升級我們的例項(1---7步)
7. 修改環境變數
然後,再修改oracle使用者的.bash_profile
ORACLE_HOME=$ORACLE_BASE/product/11.2.0.4/db_1
然後source ~/.bash_profile
檢視 cat /etc/oratab 【內容應該是新目錄】
8. 登入檢視,升級後版本
[oracle@11g ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Mon Feb 16 05:54:26 2015
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> set linesize 150
SQL> set pagesize 9999
SQL> col comp_name format a40
SQL> SELECT COMP_NAME, VERSION, STATUS FROM SYS.DBA_REGISTRY;
COMP_NAME VERSION STATUS
---------------------------------------- ------------------------------ ------------------
OWB 11.2.0.1.0 VALID
Oracle Application Express 3.2.1.00.10 VALID
Oracle Enterprise Manager 11.2.0.4.0 VALID
OLAP Catalog 11.2.0.4.0 VALID
Spatial 11.2.0.4.0 VALID
Oracle Multimedia 11.2.0.4.0 VALID
Oracle XML Database 11.2.0.4.0 VALID
Oracle Text 11.2.0.4.0 VALID
Oracle Expression Filter 11.2.0.4.0 VALID
Oracle Rules Manager 11.2.0.4.0 VALID
Oracle Workspace Manager 11.2.0.4.0 VALID
Oracle Database Catalog Views 11.2.0.4.0 VALID
Oracle Database Packages and Types 11.2.0.4.0 VALID
JServer JAVA Virtual Machine 11.2.0.4.0 VALID
Oracle XDK 11.2.0.4.0 VALID
Oracle Database Java Packages 11.2.0.4.0 VALID
OLAP Analytic Workspace 11.2.0.4.0 VALID
Oracle OLAP API 11.2.0.4.0 VALID
18 rows selected.
SQL> select count(*) from dba_objects where status<>'VALID';
COUNT(*)
----------
0
SQL> select * from utl_recomp_errors;
no rows selected
-- 最後修改 compatible 引數 ,切記這個引數已修改,此次升級操作就無法回退,一定要在應用經過測試之後修改。
SQL> show parameter comp
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
cell_offload_compaction string ADAPTIVE
compatible string 11.2.0
nls_comp string BINARY
plsql_v2_compatibility boolean FALSE
SQL> alter system set compatible='11.2.0.4.0' scope=spfile;
System altered.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup;
ORACLE instance started.
Total System Global Area 1068937216 bytes
Fixed Size 2260088 bytes
Variable Size 671089544 bytes
Database Buffers 390070272 bytes
Redo Buffers 5517312 bytes
Database mounted.
Database opened.
SQL> show parameter comp
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
cell_offload_compaction string ADAPTIVE
compatible string 11.2.0.4.0
nls_comp string BINARY
plsql_v2_compatibility boolean FALSE
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/31383567/viewspace-2135625/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 圖形化升級單機oracle 11.2.0.4 到 12.2.0.1Oracle
- oracle for windows 11.2.0.1升級到11.2.0.4OracleWindows
- 單機升級11.2.0.1到11.2.0.4的實戰__DBUA視窗
- 靜默升級oracle 11g (從11.2.0.1升級到11.2.0.4)Oracle
- RAC升級11.2.0.1到11.2.0.4的實戰
- Oracle 11.2.0.1 升級到11.2.0.3Oracle
- ORACLE 11.2.0.1升級到11.2.0.3Oracle
- Oracle 11.2.0.1升級到11.2.0.3Oracle
- 單機升級11.2.0.1到12.1.0.2的實戰_11.2.0.1不能直接升級到到12.1.0.2
- ORACLE11.2.0.1升級到11.2.0.3Oracle
- Oracle 11.2.0.4升級到12.2.0.1Oracle
- Oracle 11.2.0.1升級到11.2.0.4.171017Oracle
- oracle版本升級:從11.2.0.1到11.2.0.3Oracle
- oracle rac 11.2.0.3 升級到11.2.0.4Oracle
- oracle資料庫升級11.2.0.3升級到11.2.0.4Oracle資料庫
- oracle從10.2.0.4升級到11.2.0.1的三種升級方法Oracle
- 單機升級11.2.0.4到12.1.0.2的實戰__catupgrd.sqlSQL
- oracle資料庫11.2.0.3升級到11.2.0.4Oracle資料庫
- 單例項環境下Oracle 11.2.0.3升級到11.2.0.4的過程單例Oracle
- Oracle RAC 10.2.0.5升級到11.2.0.4遇到的問題Oracle
- mongodb單機從3.2升級到4.0.4升級MongoDB
- Oracle資料庫異機升級(10.2.0.5 --> 11.2.0.4)Oracle資料庫
- 同機上升級oracle10.2.0.5到11.2.0.4Oracle
- Oracle 10.2.0.5升級至11.2.0.4Oracle
- 探索Oracle之資料庫升級二 11.2.0.3升級到11.2.0.4完整步驟Oracle資料庫
- [20130320]升級oracle 11.2.0.1到11.2.0.3.txtOracle
- 如何升級Oracle Grid Infrastructure和RAC從11.2.0.3到11.2.0.4?OracleASTStruct
- 使用DBUA升級 Oracle 11.2.0.4到Oracle 19C的問題記錄Oracle
- Oracle:Oracle RAC 11.2.0.4 升級為 19cOracle
- 11.2.0.3 database異機升級至11.2.0.4Database
- dbua升級oracle 10.2.0.1 0 到11.2.0.4 失敗後還原過程Oracle
- 【XTTS】Oracle XTTS V4--Oracle11.2.0.4+ 遷移升級TTSOracle
- ORACLE EXADATA升級—從11.2.3.1.0到11.2.3.3.0–(8)升級交換機Oracle
- oracle 升級到 11.2.0.2Oracle
- Oracle 11.2.0.4 從單例項,使用RMAN 異機恢復到RACOracle單例
- Windows升級到oracle 11g的異機物理升級文件(冷備)WindowsOracle
- oracle11.2.0.3升級到11.2.0.4出現查詢效能問題,分析處理Oracle
- 【UP_ORACLE】使用AutoUpgrade工具升級Oracle 11.2.0.4至12.2.0.1Oracle