您好,登錄后才能下訂單哦!
本篇內(nèi)容介紹了“Oracle如何從Linux x86單機(jī)遷移到Solaries雙節(jié)點(diǎn)RAC集群”的有關(guān)知識(shí),在實(shí)際案例的操作過(guò)程中,不少人都會(huì)遇到這樣的困境,接下來(lái)就讓小編帶領(lǐng)大家學(xué)習(xí)一下如何處理這些情況吧!希望大家仔細(xì)閱讀,能夠?qū)W有所成!
(注: 每組一個(gè),增加組數(shù)為8,調(diào)整大小為1G)
SQL> set linesize 300;SQL> col member for a50; SQL> select * from v$logfile; GROUP# STATUS TYPE MEMBER IS_ ---------- ------- ------- -------------------------------------------------- --- 2 ONLINE +DATADG/cams/onlinelog/group_2.292.989624633 NO 1 ONLINE +DATADG/cams/onlinelog/group_1.256.989624629 NO 3 ONLINE +DATADG/cams/onlinelog/group_3.296.989624869 NO 4 ONLINE +DATADG/cams/onlinelog/group_4.295.989624875 NO 5 ONLINE +DATADG/cams/onlinelog/group_5 NO 6 ONLINE +DATADG/cams/onlinelog/group_6 NO 7 ONLINE +DATADG/cams/onlinelog/group_7 NO 8 ONLINE +DATADG/cams/onlinelog/group_8 NO 8 rows selected. SQL> select GROUP#,BYTES,MEMBERS,STATUS from v$log; GROUP# BYTES MEMBERS STATUS ---------- ---------- ---------- ---------------- 1 1073741824 1 INACTIVE 2 1073741824 1 INACTIVE 3 1073741824 1 CURRENT 4 1073741824 1 INACTIVE 5 1073741824 1 CURRENT 6 1073741824 1 INACTIVE 7 1073741824 1 INACTIVE 8 1073741824 1 INACTIVE 8 rows selected.
(注: 調(diào)整控制文件為3個(gè),存在在不同路徑下)
SQL> set linesize 300;SQL> col name for a55; SQL> select * from v$controlfile; STATUS NAME IS_ BLOCK_SIZE FILE_SIZE_BLKS ------- ------------------------------------------------------- --- ---------- -------------- +DATADG/cams/controlfile/controlfile1/controlfile1 NO 16384 1128 +DATADG/cams/controlfile/controlfile2/controlfile2 NO 16384 1128 +DATADG/cams/controlfile/current.303.989624627 NO 16384 1128
(注:每個(gè)節(jié)點(diǎn)的內(nèi)存都為64G,開(kāi)啟AMM)
SQL> show parameter memory;NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ hi_shared_memory_address integer 0 memory_max_target big integer 32256M memory_target big integer 32256M shared_memory_address integer 0 SQL> show parameter sga; NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ lock_sga boolean FALSE pre_page_sga boolean FALSE sga_max_size big integer 32256M sga_target big integer 0 SQL> show parameter pga; NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ pga_aggregate_target big integer 0
調(diào)整
job_queue_processes,
log_buffer,
db_block_checking,
processes,
session_cached_cursors,
open_cursors,
undo_retention
等參數(shù),符合生產(chǎn)規(guī)范。
SQL> archive log list; Database log mode Archive Mode Automatic archival Enabled Archive destination +DATADG Oldest online log sequence 8 Next log sequence to archive 11 Current log sequence 11
(1)設(shè)置數(shù)據(jù)庫(kù)自動(dòng)備份控制文件
(2)每周日做RMAN 0級(jí)全庫(kù)備份
(3)每日(除周日)做RMAN 1級(jí)增量備份
(4)在主服務(wù)器上只保留2周的全庫(kù)備份、增量備份
(5)將兩周前的全庫(kù)備份、增量備份copy至其他環(huán)境中
(注:按照客戶要求,這里將RMAN備份到ASM磁盤(pán)中)
先創(chuàng)建RMAN備份目錄“+DATADG/CAMS/RMAN”
腳本存放目錄:/u01/app/oracle/backup/rman
日志存放目錄:/u01/app/oracle/backup/rman/logs
在oracle用戶下執(zhí)行:crontab -e,每天凌晨3點(diǎn)執(zhí)行備份
0 3 * * 0-6 /u01/app/oracle/backup/rman/start_rman.sh >> /u01/app/oracle/backup/rman/start_rman.log
手工執(zhí)行RMAN 0級(jí)備份腳本,對(duì)數(shù)據(jù)庫(kù)做全量RMAN備份。
(1)關(guān)閉數(shù)據(jù)庫(kù)
(2)修改其中一個(gè)控制文件名字
(3)啟動(dòng)數(shù)據(jù)庫(kù)(提示錯(cuò)誤信息)
(4)使用RMAN恢復(fù)控制文件
(5)啟動(dòng)數(shù)據(jù)庫(kù)
(6)檢查控制文件信息
(1)關(guān)閉數(shù)據(jù)庫(kù)
(2)修改spfile文件名字
(3)啟動(dòng)數(shù)據(jù)庫(kù)(提示錯(cuò)誤信息)
(4)使用RMAN恢復(fù)spfile文件
(5)重啟數(shù)據(jù)庫(kù)
(6)檢查數(shù)據(jù)庫(kù)狀態(tài)
(1)關(guān)閉數(shù)據(jù)庫(kù)
(2)修改redo文件名字
(3)啟動(dòng)數(shù)據(jù)庫(kù)(提示錯(cuò)誤信息)
(4)使用RMAN完全恢復(fù)
(5)在sqlplus中recover數(shù)據(jù)庫(kù)
(6)打開(kāi)數(shù)據(jù)庫(kù)
(7)檢查數(shù)據(jù)庫(kù)狀態(tài)
(1)完全恢復(fù)
RMAN>startup mount; RMAN>restore database; RMAN>recover database; RMAN>alter database open;
(2)不完全恢復(fù)
oracle@cwgsdb1:~$ srvctl stop database -d cams oracle@cwgsdb1:~$ srvctl start database -d cams -o mount oracle@cwgsdb1:~$ export NLS_DATE_FORMAT="yyyy-mm-dd hh34:mi:ss" $ rman target / RMAN>restore database until time "to_date('2018-10-25 01:07:18','yyyy-mm-dd hh34:mi:ss')"; RMAN>recover database until time "to_date('2018-10-25 01:08:06','yyyy-mm-dd hh34:mi:ss')"; RMAN>alter database open resetlogs; RMAN>exit
Solaries系統(tǒng)時(shí)間與互聯(lián)網(wǎng)時(shí)間不一致,因?yàn)槭菧y(cè)試環(huán)境,切換時(shí)會(huì)清理后重新導(dǎo)入生產(chǎn)數(shù)據(jù),所以直接修改系統(tǒng)時(shí)間解決。
如果生產(chǎn)環(huán)境發(fā)現(xiàn)該問(wèn)題,建議將硬件與系統(tǒng)時(shí)間同步關(guān)掉,停庫(kù)一天,等時(shí)間超過(guò)當(dāng)前時(shí)間,然后開(kāi)系統(tǒng),時(shí)間同步,然后再起數(shù)據(jù)庫(kù)。
“Oracle如何從Linux x86單機(jī)遷移到Solaries雙節(jié)點(diǎn)RAC集群”的內(nèi)容就介紹到這里了,感謝大家的閱讀。如果想了解更多行業(yè)相關(guān)的知識(shí)可以關(guān)注億速云網(wǎng)站,小編將為大家輸出更多高質(zhì)量的實(shí)用文章!
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。