upgrade 10.2.0.5 to 11.2.0.4 on linux
1、在source庫上執行utlu112i.sql指令碼
將11g $ORACLE_HOME/rdbms/admin下的utlu112i.sql指令碼複製到10g的/home/oracle/執行
spool upgrade_info.log
@?/rdbms/admin/utlu112i.sql
原庫資料檔案保留足夠的空餘空間
ALTER TABLESPACE system ADD DATAFILE '+DATA01' SIZE 1G AUTOEXTEND OFF;
ALTER TABLESPACE SYSAUX ADD DATAFILE '+DATA01' SIZE 1G AUTOEXTEND OFF;
ALTER TABLESPACE USERS ADD DATAFILE '+DATA01' SIZE 1G AUTOEXTEND OFF;
ALTER TABLESPACE UNDOTBS1 ADD DATAFILE '+DATA01' SIZE 1G AUTOEXTEND OFF;
ALTER TABLESPACE TEMP ADD tempfile '+DATA01' SIZE 1G AUTOEXTEND OFF;
檢查source庫資料檔案及日誌檔案
set line 130
col file_name for a60
col MEMBER for a60
select member from v$logfile;
select file_name,STATUS from dba_temp_files;
select file_id,file_name,STATUS,ONLINE_STATUS from dba_data_files;
2、原備全備
rman target /
backup database format '/home/oracle/full_%U.bak' plus archivelog;
複製備份集到target庫。
3、target恢復
3.1 start instance
startup nomount pfile='/home/oracle/pfile.ora'; --注:sga_target>2G以上,根據主機配置設定足夠sga
set DBID=2071660054; --設定source庫DBID
restore controlfile from '/home/oracle/full_02spdlip_1_1.bak';
alter database mount;
3.2 restore database
run{
set newname for datafile 1 to '+DATA01/';
set newname for datafile 2 to '+DATA01/';
set newname for datafile 3 to '+DATA01/';
set newname for datafile 4 to '+DATA01/';
restore database;
switch datafile all;
}
3.3 recover database
select CHECKPOINT_CHANGE# from v$database;
select CHECKPOINT_CHANGE# from v$datafile;
select CHECKPOINT_CHANGE# from v$datafile_header;
recover database until scn 397878;
alter database rename file '/oradata/onlinelog/o1_mf_3_f6fy0tvm_.log' to '+DATA01';
alter database rename file '/oradata/onlinelog/o1_mf_2_f6fy0sqf_.log' to '+DATA01';
alter database rename file '/oradata/onlinelog/o1_mf_1_f6fy0rho_.log' to '+DATA01';
alter database rename file '/oradata/datafile/o1_mf_temp_f6fy0xqt_.tmp' to '+DATA01';
3.4 update database
alter database open resetlogs upgrade;
set line 200
col name for a60
select * from v$sgainfo; --檢查shared_pool_size,測試時100M升級報錯,建議500M以上。
@?/rdbms/admin/catupgrd.sql
@?/rdbms/admin/utlu112s.sql
@?/rdbms/admin/catuppst.sql
3.5 檢查無效物件及升級元件
編譯無效物件
set lines 1200 pages 1200
col owner for a15
col object_name for a40
col status for a15
col OBJECT_TYPE for a20
select owner,object_name,OBJECT_TYPE,status from dba_objects where status !='VALID';
@?/rdbms/admin/utlrp.sql
檢查升級元件
set lines 1200
col comp_name for a30
col status for a12
col version for a20
select comp_name,status,version from dba_server_registry;
將11g $ORACLE_HOME/rdbms/admin下的utlu112i.sql指令碼複製到10g的/home/oracle/執行
spool upgrade_info.log
@?/rdbms/admin/utlu112i.sql
原庫資料檔案保留足夠的空餘空間
ALTER TABLESPACE system ADD DATAFILE '+DATA01' SIZE 1G AUTOEXTEND OFF;
ALTER TABLESPACE SYSAUX ADD DATAFILE '+DATA01' SIZE 1G AUTOEXTEND OFF;
ALTER TABLESPACE USERS ADD DATAFILE '+DATA01' SIZE 1G AUTOEXTEND OFF;
ALTER TABLESPACE UNDOTBS1 ADD DATAFILE '+DATA01' SIZE 1G AUTOEXTEND OFF;
ALTER TABLESPACE TEMP ADD tempfile '+DATA01' SIZE 1G AUTOEXTEND OFF;
檢查source庫資料檔案及日誌檔案
set line 130
col file_name for a60
col MEMBER for a60
select member from v$logfile;
select file_name,STATUS from dba_temp_files;
select file_id,file_name,STATUS,ONLINE_STATUS from dba_data_files;
2、原備全備
rman target /
backup database format '/home/oracle/full_%U.bak' plus archivelog;
複製備份集到target庫。
3、target恢復
3.1 start instance
startup nomount pfile='/home/oracle/pfile.ora'; --注:sga_target>2G以上,根據主機配置設定足夠sga
set DBID=2071660054; --設定source庫DBID
restore controlfile from '/home/oracle/full_02spdlip_1_1.bak';
alter database mount;
3.2 restore database
run{
set newname for datafile 1 to '+DATA01/';
set newname for datafile 2 to '+DATA01/';
set newname for datafile 3 to '+DATA01/';
set newname for datafile 4 to '+DATA01/';
restore database;
switch datafile all;
}
3.3 recover database
select CHECKPOINT_CHANGE# from v$database;
select CHECKPOINT_CHANGE# from v$datafile;
select CHECKPOINT_CHANGE# from v$datafile_header;
recover database until scn 397878;
alter database rename file '/oradata/onlinelog/o1_mf_3_f6fy0tvm_.log' to '+DATA01';
alter database rename file '/oradata/onlinelog/o1_mf_2_f6fy0sqf_.log' to '+DATA01';
alter database rename file '/oradata/onlinelog/o1_mf_1_f6fy0rho_.log' to '+DATA01';
alter database rename file '/oradata/datafile/o1_mf_temp_f6fy0xqt_.tmp' to '+DATA01';
3.4 update database
alter database open resetlogs upgrade;
set line 200
col name for a60
select * from v$sgainfo; --檢查shared_pool_size,測試時100M升級報錯,建議500M以上。
@?/rdbms/admin/catupgrd.sql
@?/rdbms/admin/utlu112s.sql
@?/rdbms/admin/catuppst.sql
3.5 檢查無效物件及升級元件
編譯無效物件
set lines 1200 pages 1200
col owner for a15
col object_name for a40
col status for a15
col OBJECT_TYPE for a20
select owner,object_name,OBJECT_TYPE,status from dba_objects where status !='VALID';
@?/rdbms/admin/utlrp.sql
檢查升級元件
set lines 1200
col comp_name for a30
col status for a12
col version for a20
select comp_name,status,version from dba_server_registry;
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/31442014/viewspace-2152007/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 11.2.0.4 upgrade to 19.3.0.0
- Oracle 10.2.0.5升級至11.2.0.4Oracle
- ORACLE rac 11.2.0.4 for rhel7.8 upgrade to 19.11.1 報錯ORA-29516處理Oracle
- ORACLE 11.2.0.4 DG(Broker) for linux 部署OracleLinux
- linux下使用yum upgrade軟體包Linux
- linux 中 yum makecache 、yum update、yum upgrade的作用Linux
- helm upgrade
- 2.3.3.3 Application UpgradeAPP
- PostgreSQL DBA(91) - PG upgradeSQL
- 2.3.3.3.1 How an Application Upgrade WorksAPP
- oracle 10 rac 升級 10.2.0.1升級到10.2.0.5Oracle
- 從10.2.0.1升級到10.2.0.5操作實驗(下)
- Oracle Linux 6.7中 Oracle 11.2.0.4 RAC叢集CRS異常處理OracleLinux
- Cisco ACI APIC upgrade downgrade pathAPI
- apt的update和upgrade區別APT
- windows10 upgrade可以刪除嗎_win10系統如何刪除upgrade資料夾WindowsWin10
- centos7-kernel-upgrade-核心升級CentOS
- MYSQL 8.0 Upgrade &Downgrade的幾點注意MySql
- ORACLE 11.2.0.4 rac for linux 鏈路宕導致的單節點異常當機OracleLinux
- oracle之 11.2.0.4 bbed安裝Oracle
- CentOS 7.6 安裝11.2.0.4 RACCentOS
- win10 upgrade檔案能刪除嗎 win10系統怎麼刪除upgrade檔案Win10
- oracle rac 11.2.0.3 升級到11.2.0.4Oracle
- RAC安裝【AIX 7 + 11.2.0.4 + ASM】AIASM
- Poor Performance On Certain Dictionary Queries After Upgrade To 10gORMAI
- ORACLE windows和linux環境下 10g升級到11.2.0.4 並安裝11.2.0.4.19補丁OracleWindowsLinux
- AnolisOS 7.9 靜默安裝Oacle 11.2.0.4
- Solaris下Oracle RAC 11.2.0.4 安裝方法Oracle
- Oracle 11.2.0.4 Dataguard兩則故障處理Oracle
- 使用 nuxi upgrade 升級現有nuxt專案版本UX
- Oracle案例04——ORA-39700: database must be opened with UPGRADE optionOracleDatabase
- oracle資料庫11.2.0.3升級到11.2.0.4Oracle資料庫
- Oracle 11.2.0.4 physical dataguard和snapshot dataguard切換Oracle
- 11.2.0.4 Dataguard臨時讀寫三種方法
- DG:11.2.0.4 RAC線上duplicate恢復DG
- oracle 11.2.0.4 rac叢集等待事件enq: TM - contentionOracle事件ENQ
- redhat7.2靜默安裝Oracle11.2.0.4RedhatOracle
- Oracle:Oracle RAC 11.2.0.4 升級為 19cOracle