Oracle12c遷移-某風險報告類系統升級暨遷移至12c-3
本文我們介紹一下升級暨遷移的其他技術
rman升級的主要步驟
1、在源庫11.2,檢查獲取統計物件的併發收集設定
SQL> select dbms_stats.get_prefs('CONCURRENT') from dual;
DBMS_STATS.GET_PREFS('CONCURRENT')
--------------------------------------------------------------------------------
FALSE
SQL>
如果併發收集設定部'FALSE',進行如下設定
begin
dbms_stats.set_global_prefs('CONCURRENT','FALSE');
end;
/
2、在源庫執行dbupgdiag.sql收集診斷資訊
cp dbupgdiag.sql $ORACLE_HOME/rdbms/admin
$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
SQL> @?/rdbms/admin/dbupgdiag.sql
Enter value for 1: /tmp
SQL> @?/rdbms/admin/preupgrd.sql
Results of the checks are located at:
/u01/app/oracle/cfgtoollogs/CDBXF/preupgrade/preupgrade.log
Pre-Upgrade Fixup Script (run in source database environment):
/u01/app/oracle/cfgtoollogs/CDBXF/preupgrade/preupgrade_fixups.sql
Post-Upgrade Fixup Script (run shortly after upgrade):
/u01/app/oracle/cfgtoollogs/CDBXF/preupgrade/postupgrade_fixups.sql
3、在源庫11g執行rman備份,這裡我們採用壓縮備份方式
bakcup_cdbxf.sh
############################################################################
rman target / log=/rmanbak/cdbxf/ cdbxf11gbak_20190629.log <<EOF
run {
ALLOCATE CHANNEL ch01 TYPE disk;
ALLOCATE CHANNEL ch02 TYPE disk;
ALLOCATE CHANNEL ch03 TYPE disk;
ALLOCATE CHANNEL ch04 TYPE disk;
backup as compressed backupset database format '/rmanbak/ cdbxf/db_xf11g_full_%U' plus archivelog format '/rmanbak/cdbxf/db_xf11g_arch_%U';
backup current controlfile format '/rmanbak/cdbxf/db_xf_ctl_%U';
RELEASE CHANNEL ch01;
RELEASE CHANNEL ch02;
RELEASE CHANNEL ch03;
RELEASE CHANNEL ch04;
}
EOF
############################################################################
4、將備份集傳輸到目標伺服器上
由於我們採用異機升級方式所以需要將11g的rman備份集拷貝到12c的伺服器上
$ scp db_xf11g_* oracle@ip:/rmanbak/cdbxf
The authenticity of host '' can't be established.
。。。。
Are you sure you want to continue connecting (yes/no)? yes
。。。。
5、在12c資料庫上建立密碼檔案
$ORACLE_HOME/bin/orapwd file=orapwCDBXFpassword=oracle
6、準備12c的引數檔案
db_name=CDBXF12
*.compatible='12.1.0.0.0'
*.db_block_size=16384
*.db_file_name_convert='+data/cdbrxf','+data/cdbxf12'
*.log_file_name_convert='+data/cdbxf','+data/cdbxf12'
control_files='+data/cdbxf12/control01.ctl'
7、將輔助例項啟動到nomount狀態
$ echo $ORACLE_SID
CDBXF12
$ sqlplus / as sysdba
SQL*Plus: Release 12.1.0.1.0 Production on
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to an idle instance.
SYS@ CDBXF >startup nomount pfile='initCDBRXFora';
ORACLE instance started.
SYS@ CDBXF>
8、 在rman下連線到AUXLIARY
$ export ORACLE_SID=CDBRXF
$ rman auxiliary /
Recovery Manager: Release
Copyright (c) 1982, 2013, Oracle and/or its affiliates. All rights reserved.
connected to auxiliary database: 12CXF (not mounted)
RMAN>
9、使用12c rman執行duplicate
RMAN> connect auxiliary /
contents of Memory Script:
{
sql clone "create spfile from memory";
}
executing Memory Script
sql statement: create spfile from memory
contents of Memory Script:
{
shutdown clone immediate;
startup clone nomount;
}
executing Memory Script
。。。。
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
10、進行升級
SYS@ CDBXF >alter database open resetlogs upgrade;
$ cd $ORACLE_HOME/rdbms/admin
$ pwd
/u01/12.1.0.1/oracle/product/db_1/rdbms/admin
$ORACLE_HOME/perl/bin/perl catctl.pl -n 4 -l $ORACLE_HOME/diagnostics catupgrd.sql
$ORACLE_HOME/perl/bin/perl catctl.pl -n 4 -l $ORACLE_HOME/diagnostics catupgrd.sql
$ORACLE_HOME/perl/bin/perl catctl.pl -n 4 -l $ORACLE_HOME/diagnostics catupgrd.sql
Analyzing file catupgrd.sql
Log files in /u01/12.1.0.1/oracle/product/db_1/diagnostics
14 scripts found in file catupgrd.sql
Next path: catalog.sql
32 scripts found in file catalog.sql
Next path: catproc.sql
37 scripts found in file catproc.sql
Next path: catptabs.sql
61 scripts found in file catptabs.sql
Next path: catpdbms.sql
205 scripts found in file catpdbms.sql
Next path: catpdeps.sql
77 scripts found in file catpdeps.sql
Next path: catpprvt.sql
260 scripts found in file catpprvt.sql
Next path: catpexec.sql
26 scripts found in file catpexec.sql
Next path: cmpupgrd.sql
16 scripts found in file cmpupgrd.sql
[Phase 0] type is 1 with 1 Files
catupstr.sql
[Phase 1] type is 1 with 3 Files
cdstrt.sql cdfixed.sql cdcore.sql
[Phase 2] type is 1 with 1 Files
ora_restart.sql
[Phase 3] type is 2 with 18 Files
cdplsql.sql cdsqlddl.sql cdmanage.sql cdtxnspc.sql
cdenv.sql cdrac.sql cdsec.sql cdobj.sql
cdjava.sql cdpart.sql cdrep.sql cdaw.sql
cdsummgt.sql cdtools.sql cdexttab.sql cddm.sql
catldr.sql cdclst.sql
[Phase 4] type is 1 with 1 Files
ora_restart.sql
type is 2 with 122 Files
prvtbpui.plb prvtdput.plb prvtmeta.plb prvtmeti.plb
prvtmetu.plb prvtmetb.plb prvtmetd.plb prvtmet2.plb
prvtdp.plb prvtbpc.plb prvtbpci.plb prvtbpw.plb
prvtbpm.plb prvtbpfi.plb prvtbpf.plb prvtbpp.plb
prvtbpd.plb prvtbpdi.plb prvtbpv.plb prvtbpvi.plb
prvtdpcr.plb prvtplts.plb prvtpitr.plb prvtreie.plb
prvtrwee.plb prvtidxu.plb prvtrcmp.plb prvtchnf.plb
prvtedu.plb prvtlsby.plb prvtlsib.plb prvtlssb.plb
prvtsmv.plb prvtsma.plb prvtbxfr.plb prvtbord.plb
prvtjdbb.plb prvtslrt.plb prvtslxp.plb prvtatsk.plb
prvtmntr.plb prvtsmgu.plb prvtdadv.plb prvtadv.plb
prvtawr.plb prvtawrs.plb prvtawri.plb prvtash.plb
prvtawrv.plb prvtsqlf.plb prvtsqli.plb prvtsqlt.plb
prvtautorepi.plb prvtautorep.plb prvtfus.plb prvtmp.plb
prvthdm.plb prvtaddm.plb prvtrtaddm.plb prvt_awr_data_cp.plb
prvtcpaddm.plb prvtuadv.plb prvtsqlu.plb prvtspai.plb
prvtspa.plb prvtratmask.plb prvtspmi.plb prvtspm.plb
prvtsmbi.plb prvtsmb.plb prvtfus.plb catfusrg.sql
prvtwrk.plb prvtsmaa.plb prvtxpln.plb prvtstat.plb
prvtstai.plb prvtsqld.plb prvtspcu.plb prvtodm.plb
prvtkcl.plb prvtdst.plb prvtcmpr.plb prvtilm.plb
prvtpexei.plb prvtpexe.plb prvtcapi.plb prvtfuse.plb
prvtfspi.plb prvtpspi.plb prvtdnfs.plb prvtfs.plb
prvtadri.plb prvtadr.plb prvtadra.plb prvtadmi.plb
prvtutils.plb prvtxsrs.plb prvtsc.plb prvtacl.plb
prvtds.plb prvtns.plb prvtdiag.plb prvtkzrxu.plb
prvtnacl.plb prvtredacta.plb prvtpdb.plb prvttlog.plb
prvtsqll.plb prvtappcont.plb prvtspd.plb prvtspdi.plb
prvtpprof.plb prvtsqlm.plb prvtpart.plb prvtrupg.plb
prvtrupgis.plb prvtrupgib.plb prvtpstdy.plb prvttsdp.plb
prvtqopi.plb prvtlog.plb
[Phase 34] type is 1 with 1 Files
ora_load_with_comp.sql
[Phase 35] type is 1 with 1 Files
ora_restart.sql
[Phase 36] type is 1 with 4 Files
catmetinsert.sql catpcnfg.sql utluppkg.sql catdph.sql
-end-
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/28373936/viewspace-2676880/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle12c遷移-某風險報告類系統升級暨遷移至12c-2Oracle
- Oracle12c遷移-某風險報告類系統升級暨遷移至12c-1Oracle
- 雲遷移的安全風險
- SAP系統升級,如何做資料遷移?
- ESXI 遷移至KVM (V2V遷移)
- gitlab的遷移和升級Gitlab
- gitlab安裝/遷移/升級流程Gitlab
- WSL子系統檔案遷移至其他磁碟
- datagrip2019.1.4-升級資料遷移
- 騰訊通RTX最佳升級遷移指南,相容移動端及Linux系統Linux
- SmartDialog遷移至4.0:一份真誠的遷移說明
- 系統資料遷移
- Windows 遷移系統盤Windows
- Arch Linux 系統遷移Linux
- 遷移windows子系統Windows
- 將ERP系統遷移至雲端具有哪些作用
- Grafana的版本升級和資料遷移Grafana
- Hadoop Hive遷移至MaxComputeHadoopHive
- weblogic版本升級遷移需要注意事項Web
- 作業系統遷移難?Alibaba Cloud Linux 支援跨版本升級 | 龍蜥技術作業系統CloudLinux
- 企業為何要將ERP系統遷移至雲端?
- iOS CoreData (二) 版本升級和資料庫遷移iOS資料庫
- 最全weblogic升級與遷移改造常見問題Web
- SQL Server升級和遷移的三個技巧GZSQLServer
- 【XTTS】Oracle XTTS V4--Oracle11.2.0.4+ 遷移升級TTSOracle
- Flora影象風格遷移AppAPP
- 【RMAN】Oracle使用rman將11.2.0.4資料庫遷移至Oracle12c命令參考Oracle資料庫
- Mysql百萬級資料遷移,怎麼遷移?實戰過沒?MySql
- 本部落格已遷移至Wordpress~
- Android 端影象多風格遷移Android
- [譯] TensorFlow 教程 #15 – 風格遷移
- CentOS 停止維護,一文看懂升級遷移路徑CentOS
- win10遷移系統到固態硬碟 win10系統遷移到ssd教程Win10硬碟
- 大型系統儲存層遷移實踐
- 企業資訊系統在遷移過程中,資料遷移要注意什麼?
- 應用遷移至 Android P 操作指南Android
- MSSQL Server 遷移至 ORACLE解決方案SQLServerOracle
- 深度有趣 | 30 快速影象風格遷移