中文亚洲精品无码_熟女乱子伦免费_人人超碰人人爱国产_亚洲熟妇女综合网

當(dāng)前位置: 首頁 > news >正文

網(wǎng)站域名注冊(cè)費(fèi)用軟件開發(fā)工資一般多少

網(wǎng)站域名注冊(cè)費(fèi)用,軟件開發(fā)工資一般多少,apache wordpress 優(yōu)化,dedecms做網(wǎng)站和thinkphp今天負(fù)責(zé)報(bào)表的同事反饋在DG庫查詢時(shí)出現(xiàn)如下報(bào)錯(cuò) ORA-01578:ORACLE數(shù)據(jù)塊損壞(文件號(hào)6,塊號(hào) 2494856)ORA-01110:數(shù)據(jù)文件6: /oradata/PMSDG/o1 mf users_molczgmn_.dbfORA-26040:數(shù)據(jù)塊是使用 NOLOGGING 選項(xiàng)加載的 可以看到報(bào)錯(cuò)是數(shù)據(jù)文件損壞,提示了file id和b…

今天負(fù)責(zé)報(bào)表的同事反饋在DG庫查詢時(shí)出現(xiàn)如下報(bào)錯(cuò)

ORA-01578:ORACLE數(shù)據(jù)塊損壞(文件號(hào)6,塊號(hào) 2494856)ORA-01110:數(shù)據(jù)文件6: '/oradata/PMSDG/o1 mf users_molczgmn_.dbfORA-26040:數(shù)據(jù)塊是使用 NOLOGGING 選項(xiàng)加載的

可以看到報(bào)錯(cuò)是數(shù)據(jù)文件損壞,提示了file id和block id

在 Oracle Data Guard 環(huán)境中,如果?備庫數(shù)據(jù)文件?出現(xiàn)壞塊,而主庫正常,如何來修復(fù)呢?這里假設(shè)備庫是?Physical Standby?模式。

如果是邏輯備庫則如下的方法1/2不適用。


一. 確認(rèn)問題

? 確認(rèn)壞塊信息

在備庫執(zhí)行以下命令查看壞塊信息:

 

SELECT * FROM V$DATABASE_BLOCK_CORRUPTION;

? 檢查具體受影響的數(shù)據(jù)文件

查看壞塊對(duì)應(yīng)的數(shù)據(jù)文件編號(hào)和名稱:(主備均查詢一下,確認(rèn)主庫是否也有損壞)

 

SELECT FILE_ID, FILE_NAME FROM DBA_DATA_FILES WHERE FILE_ID IN (SELECT FILE# FROM V$DATABASE_BLOCK_CORRUPTION);


二. 修復(fù)方法

方法 1:通過主庫恢復(fù)壞塊?

在 Data Guard 環(huán)境中, 如果確認(rèn)主庫沒有損壞 只有備庫出現(xiàn)文件損壞,可以直接通過rman來修復(fù)

1.1 停止備庫的日志應(yīng)用

在備庫停止日志應(yīng)用:

 

ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;

1.2 恢復(fù)壞塊

通過 RMAN 恢復(fù)受影響的數(shù)據(jù)文件:

登錄到備庫的 RMAN:

 

rman target / RMAN> RECOVER DATAFILE 6 BLOCK 2494856; Starting recover at 02-JAN-25 using target database control file instead of recovery catalog allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=200 device type=DISK starting media recovery media recovery complete, elapsed time: 00:00:00 Finished recover at 02-JAN-25 RMAN>

 

RMAN 會(huì)自動(dòng)從主庫提取所需的日志恢復(fù)受影響的塊。

1.3 啟動(dòng)日志應(yīng)用

修復(fù)完成后,重新啟動(dòng)日志應(yīng)用:

 

ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT FROM SESSION;


方法 2:從主庫復(fù)制數(shù)據(jù)文件

如果壞塊數(shù)量較多或?RECOVER?無法成功,可以直接從主庫復(fù)制整個(gè)數(shù)據(jù)文件。

2.1 確認(rèn)數(shù)據(jù)文件路徑

在主庫和備庫執(zhí)行以下查詢,確認(rèn)數(shù)據(jù)文件路徑一致:

 

SELECT FILE_ID, FILE_NAME FROM DBA_DATA_FILES;

2.2 在主庫創(chuàng)建數(shù)據(jù)文件備份

登錄到主庫的 RMAN,備份受影響的數(shù)據(jù)文件:

 

[oracle@PMS~]$ rman target / Recovery Manager: Release 11.2.0.4.0 - Production on Thu Jan 2 22:46:31 2025 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. connected to target database: PMS (DBID=4262015389) RMAN> BACKUP AS COPY DATAFILE 6 FORMAT '/home/oracle/o1 mf users_molczgmn_.dbf'; Starting backup at 02-JAN-25 using target database control file instead of recovery catalog allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=764 instance=pms2 device type=DISK channel ORA_DISK_1: starting datafile copy input datafile file number=00006 name=+DATA/pms/datafile/o1 mf users_molczgmn_.dbf output file name=/home/oracle/o1 mf users_molczgmn_.dbf tag=TAG20250102T224636 RECID=4 STAMP=1189378160 channel ORA_DISK_1: datafile copy complete, elapsed time: 00:02:45 Finished backup at 02-JAN-25 Starting Control File and SPFILE Autobackup at 02-JAN-25 piece handle=+ARCH/pms/autobackup/2025_01_02/s_1189378162.29728.1189378163 comment=NONE Finished Control File and SPFILE Autobackup at 02-JAN-25

 

2.3 傳輸備份到備庫

將備份文件傳輸?shù)絺鋷煜嗤窂?#xff1a;

 

scp -P 11122 o1 mf users_molczgmn_.dbf oracle@10.xx.xx.xx:/home/oracle

2.4 在備庫切換數(shù)據(jù)文件

在備庫停止日志應(yīng)用:

ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;

登錄到備庫的 RMAN,切換到新數(shù)據(jù)文件:

 

啟動(dòng)數(shù)據(jù)庫到mount注冊(cè)數(shù)據(jù)文件副本CATALOG DATAFILECOPY '/home/oracle/o1 mf users_molczgmn_.dbf';RESTORE DATAFILE 6 ;RECOVER DATAFILE 6;開啟數(shù)據(jù)庫alter database open;
[oracle@pmsdg ~]$ rman target / Recovery Manager: Release 11.2.0.4.0 - Production on Thu Jan 2 22:14:57 2025 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. connected to target database: PMS(DBID=4262015389) RMAN> catalog start with '/home/oracle/o1 mf users_molczgmn_.dbf'; searching for all files that match the pattern /home/oracle/o1 mf users_molczgmn_.dbf List of Files Unknown to the Database ===================================== File Name: /home/oracle/o1 mf users_molczgmn_.dbf Do you really want to catalog the above files (enter YES or NO)? yes cataloging files... cataloging done List of Cataloged Files ======================= File Name: /home/oracle/o1 mf users_molczgmn_.dbf --將備庫啟動(dòng)到mount階段. [oracle@pmsdg]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.4.0 Production on Thu Jan 2 22:27:50 2025 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, OLAP, Data Mining and Real Application Testing options SQL> shutdown immediate; Database closed. Database dismounted. ORACLE instance shut down. SYS@orcl150> startup mount; ORACLE instance started. Total System Global Area 1586708480 bytes Fixed Size 2253624 bytes Variable Size 989859016 bytes Database Buffers 587202560 bytes Redo Buffers 7393280 bytes Database mounted. [oracle@pmsdg]$ rman target / Recovery Manager: Release 11.2.0.4.0 - Production on Thu Jan 2 22:28:24 2025 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. connected to target database: PMSDG (DBID=4262015389, not open) RMAN> restore datafile 6; Starting restore at 02-JAN-25 using target database control file instead of recovery catalog allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=63 device type=DISK channel ORA_DISK_1: starting datafile backup set restore channel ORA_DISK_1: specifying datafile(s) to restore from backup set channel ORA_DISK_1: restoring datafile 00006 to /oradata/PMSDG/o1 mf users_molczgmn_.dbf channel ORA_DISK_1: reading from backup piece /home/oracle/o1 mf users_molczgmn_.dbf channel ORA_DISK_1: piece handle=/home/oracle/o1 mf users_molczgmn_.dbf tag=TAG20230203T204533 channel ORA_DISK_1: restored backup piece 1 channel ORA_DISK_1: restore complete, elapsed time: 00:06:01 Finished restore at 02-JAN-25 RMAN> recover datafile 6; Starting recover at 02-JAN-25 using target database control file instead of recovery catalog allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=63 device type=DISK starting media recovery media recovery complete, elapsed time: 00:05:01 Finished recover at 02-JAN-25 RMAN> alter database open; database opened

2.5 啟動(dòng)日志應(yīng)用

修復(fù)完成后,重新啟動(dòng)日志應(yīng)用:

 

ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT FROM SESSION;


方法 3:重建備庫(簡單粗暴)

如果壞塊影響嚴(yán)重且以上方法無法修復(fù),可以考慮重新同步備庫,如果是數(shù)據(jù)量比較小的推薦這樣操作

如果是數(shù)據(jù)量很大的話 推薦前面的兩種方法:

3.1 RMAN duplicate方式重建備庫

創(chuàng)建主庫的全量備份(包括數(shù)據(jù)文件、控制文件、歸檔日志):

 

rman target sys/xxxx@pms auxiliary sys/xxxx@PMSDGrun { allocate channel d1 type disk; allocate channel d2 type disk; allocate channel d3 type disk; allocate channel d4 type disk; allocate auxiliary channel c1 type disk; allocate auxiliary channel c2 type disk; allocate auxiliary channel c3 type disk; allocate auxiliary channel c4 type disk; duplicate target database for standby from active database nofilenamecheck; }

3.2 重新開始?xì)w檔應(yīng)用

alter database recover managed standby database cancel;
alter database open;
alter database recover managed standby database using current logfile disconnect from session;

在備庫使用 RMAN 恢復(fù)備份并重新配置 Data Guard 環(huán)境。


三. 驗(yàn)證修復(fù)

? 檢查壞塊是否修復(fù)

在備庫執(zhí)行以下命令,確認(rèn)壞塊是否已修復(fù):

 

SELECT * FROM V$DATABASE_BLOCK_CORRUPTION;

? 確認(rèn)日志應(yīng)用正常

查看備庫是否同步正常:

 

--日志傳輸狀態(tài) standby> select 'Last Applied : ' Logs, to_char(next_time, 'DD-MON-YY HH24:MI:SS') Time from v$archived_log where sequence# = (select max(sequence#) from v$archived_log where applied = 'YES') union select 'Last Received : ' Logs, to_char(next_time, 'DD-MON-YY HH24:MI:SS') Time from v$archived_log where sequence# = (select max(sequence#) from v$archived_log); -- 最后應(yīng)用的sequence序列 Standby> select al.thrd "Thread", almax "Last Seq Received", lhmax "Last Seq Applied" from (select thread# thrd, max(sequence#) almax from v$archived_log where resetlogs_change# = (select resetlogs_change# from v$database) group by thread#) al, (select thread# thrd, max(sequence#) lhmax from v$log_history where first_time = (select max(first_time) from v$log_history) group by thread#) lh where al.thrd = lh.thrd;


四. 注意事項(xiàng)優(yōu)先通過主庫恢復(fù)

    • 如果壞塊較少,推薦使用方法 1 恢復(fù)。
    • 如果壞塊較多,直接使用方法 2 替換數(shù)據(jù)文件。
    • 如果數(shù)據(jù)庫比較小 也推薦重建方式? 簡單直接,如果數(shù)據(jù)庫太大 重建耗時(shí)太久 推薦前兩種方式
    • 另外如果是主庫有文件損壞,備庫正常方法2也適用。
http://www.risenshineclean.com/news/7293.html

相關(guān)文章:

  • python可以做網(wǎng)站開發(fā)嗎無錫百度正規(guī)公司
  • 黑龍江新聞法治頻道節(jié)目回放東莞seo建站哪家好
  • 溫州專業(yè)手機(jī)網(wǎng)站制作哪家好天津網(wǎng)站seo設(shè)計(jì)
  • 網(wǎng)站代碼模板免費(fèi)十大網(wǎng)絡(luò)推廣公司排名
  • 南皮縣做網(wǎng)站整站關(guān)鍵詞排名優(yōu)化
  • 美麗寮步網(wǎng)站建設(shè)高性能免費(fèi)大數(shù)據(jù)平臺(tái)
  • 代理公司注冊(cè)上海工具seo
  • 義烏網(wǎng)站建設(shè)現(xiàn)狀html期末大作業(yè)個(gè)人網(wǎng)站制作
  • 傳媒公司做網(wǎng)站編輯 如何西安做網(wǎng)站的公司
  • 南京專業(yè)做網(wǎng)站的公司有哪些鄭州seo優(yōu)化外包顧問
  • 網(wǎng)站制作怎么學(xué)去哪學(xué)電商運(yùn)營培訓(xùn)哪個(gè)機(jī)構(gòu)好
  • 網(wǎng)站開發(fā)賺錢嗎my63777免費(fèi)域名查詢2023年
  • 怎么樣推廣網(wǎng)站專業(yè)網(wǎng)站制作
  • 有哪些網(wǎng)站做的比較好看的青島官網(wǎng)優(yōu)化
  • 遵義網(wǎng)站建設(shè)網(wǎng)站寧波seo教學(xué)
  • wordpress調(diào)用具體文章做搜索引擎優(yōu)化的企業(yè)
  • 做自己的網(wǎng)站花多錢自己開發(fā)網(wǎng)站
  • 網(wǎng)站組網(wǎng)圖眾志seo
  • 域名備案和網(wǎng)站備案是一回事嗎互聯(lián)網(wǎng)培訓(xùn)班學(xué)費(fèi)多少
  • 溫州地區(qū)做網(wǎng)站怎么免費(fèi)做網(wǎng)站
  • 佛山順德網(wǎng)站制作公司哪家好惠州網(wǎng)站營銷推廣
  • 東莞疾控最新消息seo 排名 優(yōu)化
  • 網(wǎng)站開發(fā)總監(jiān)招聘西安seo網(wǎng)站管理
  • 上海網(wǎng)站排名優(yōu)化網(wǎng)頁
  • 網(wǎng)站建設(shè)怎樣中英文百度關(guān)鍵詞搜索查詢
  • 網(wǎng)站建設(shè)制作設(shè)計(jì)seo優(yōu)化珠海比較靠譜的電商培訓(xùn)機(jī)構(gòu)
  • 做外貿(mào)需要用什么網(wǎng)站品牌營銷策略案例
  • 網(wǎng)站建設(shè)哪家公司安裝百度
  • 黃山家居網(wǎng)站建設(shè)怎么樣濟(jì)南網(wǎng)站建設(shè)
  • 手機(jī)響應(yīng)式網(wǎng)站西安疫情最新數(shù)據(jù)