Home Database Mysql Tutorial 11203RAC(asm)恢复一例

11203RAC(asm)恢复一例

Jun 07, 2016 pm 03:56 PM
asm client recover

前天某客户的11203 rac(asm)出现掉电,导致数据库无法启动,注意数据库是归档模式。可见是多么倒霉。据同事说开始是由于发redo和undo损坏导致无法启动,部分信息如下:? 1 2 3 4 5 6 7 8 9 Thu May 08 20:51:07 2014 Dumping diagnostic data in directory=[c

前天某客户的11203 rac(asm)出现掉电,导致数据库无法启动,注意数据库是归档模式。可见是多么倒霉。据同事说开始是由于发redo和undo损坏导致无法启动,部分信息如下: ?
1 2 3 4 5 6 7 8 9 Thu May 08 20:51:07 2014 <code class="php spaces"><code class="php plain">Dumping diagnostic data in directory=[cdmp_20140508205107], requested by (instance=1, osid=13828272), summary=[incident=77085]. <code class="php spaces"><code class="php plain">Abort recovery <code class="php keyword">for <code class="php plain">domain 0 <code class="php spaces"><code class="php plain">Aborting crash recovery due to error 354 <code class="php spaces"><code class="php plain">Errors in file /oracle/db/diag/rdbms/hiatmpdb/hiatmpdb1/trace/hiatmpdb1_ora_13828272.trc: <code class="php spaces"><code class="php plain">ORA-00354: corrupt redo log block header <code class="php spaces"><code class="php plain">ORA-00353: log corruption near block 67856 change 13820540000932 time 05/08/2014 13:12:44 <code class="php spaces"><code class="php plain">ORA-00312: online log 3 thread 2: <code class="php string">'+DATA/hiatmpdb/onlinelog/group_3.269.830653613' <code class="php spaces"><code class="php plain">ORA-00312: online log 3 thread 2: <code class="php string">'+DATA/hiatmpdb/onlinelog/group_3.268.830653613'

他做了一些recover database until cancel操作。甚至还使用了隐含参数,但是仍然无法open数据库,如下: SQL> alter system set “_allow_resetlogs_corruption”=true scope=spfile ; SQL> alter system set “_allow_error_simulation”=true scope=spfile ; open数据库时报undo存坏块,如下: \ 可以看到,在使用隐含参数进行open都仍然报undo存在坏块。本来我想进行不完全恢复,发现后面执行recover database using backup controlfile until cancel 居然报ora-16433错误,很明显,同事之前做过resetlogs了,解决这个错误只能重建undo,本想通过如下方式来重建controlfile的,发现居然不行: oradebug setmypid alter database backup controlfile to trace; 居然错误我记不住了。既然是报undo错误,那么首先的想法就是吧该undo坏块涉及的回滚段进行屏蔽。通过10046 event可以定位到问题回滚段,但是,11g的回滚段格式发生了变化,仅仅是这样还不够的,如下是 10046 event的跟踪信息: ?

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 ===================== <code class="plain spaces"><code class="plain plain">PARSING IN CURSOR #4574130432 len=142 dep=1 uid=0 oct=3 lid=0 tim=237352129855 hv=361892850 ad='700000160cd5178' sqlid='7bd391hat42zk' <code class="plain spaces"><code class="plain plain">select /*+ rule */ name,file#,block#,status$,user#,undosqn,xactsqn,scnbas,scnwrp,DECODE(inst#,0,NULL,inst#),ts#,spare1 from undo$ where us#=:1 <code class="plain spaces"><code class="plain plain">END OF STMT <code class="plain spaces"><code class="plain plain">PARSE #4574130432:c=9,e=14,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=3,plh=4258302260,tim=237352129854 <code class="plain spaces"><code class="plain plain">BINDS #4574130432: <code class="plain spaces"><code class="plain plain">Bind#0 <code class="plain spaces"><code class="plain plain">oacdty=02 mxl=22(22) mxlc=00 mal=00 scl=00 pre=00 <code class="plain spaces"><code class="plain plain">oacflg=08 fl2=0001 frm=00 csi=00 siz=24 off=0 <code class="plain spaces"><code class="plain plain">kxsbbbfp=110a3acb8 bln=22 avl=02 flg=05 <code class="plain spaces"><code class="plain plain">value=3 <code class="plain spaces"><code class="plain plain">EXEC #4574130432:c=47,e=88,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=3,plh=4258302260,tim=237352130029 <code class="plain spaces"><code class="plain plain">FETCH #4574130432:c=8,e=13,p=0,cr=2,cu=0,mis=0,r=1,dep=1,og=3,plh=4258302260,tim=237352130065 <code class="plain spaces"><code class="plain plain">STAT #4574130432 id=1 cnt=1 pid=0 pos=1 obj=15 op='TABLE ACCESS BY INDEX ROWID UNDO$ (cr=2 pr=0 pw=0 time=10 us)' <code class="plain spaces"><code class="plain plain">STAT #4574130432 id=2 cnt=1 pid=1 pos=1 obj=34 op='INDEX UNIQUE SCAN I_UNDO1 (cr=1 pr=0 pw=0 time=5 us)' <code class="plain spaces"><code class="plain plain">CLOSE #4574130432:c=3,e=5,dep=1,type=1,tim=237352130125 <code class="plain spaces"><code class="plain plain">PARSE #4574130432:c=5,e=9,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=3,plh=4258302260,tim=237352130158 <code class="plain spaces"><code class="plain plain">BINDS #4574130432: <code class="plain spaces"><code class="plain plain">Bind#0 <code class="plain spaces"><code class="plain plain">oacdty=02 mxl=22(22) mxlc=00 mal=00 scl=00 pre=00 <code class="plain spaces"><code class="plain plain">oacflg=08 fl2=0001 frm=00 csi=00 siz=24 off=0 <code class="plain spaces"><code class="plain plain">kxsbbbfp=110a3ab88 bln=22 avl=02 flg=05 <code class="plain spaces"><code class="plain plain">value=4 <code class="plain spaces"><code class="plain plain">EXEC #4574130432:c=44,e=71,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=3,plh=4258302260,tim=237352130278 <code class="plain spaces"><code class="plain plain">FETCH #4574130432:c=7,e=12,p=0,cr=2,cu=0,mis=0,r=1,dep=1,og=3,plh=4258302260,tim=237352130308 <code class="plain spaces"><code class="plain plain">CLOSE #4574130432:c=2,e=3,dep=1,type=3,tim=237352130335 <code class="plain spaces"><code class="plain plain">WAIT #4573319128: nam='db file sequential read' ela= 6947 file#=3 block#=176 blocks=1 obj#=0 tim=237352137334 <code class="plain spaces"><code class="plain plain">DDE rules only execution for: ORA 1110 <code class="plain spaces"><code class="plain plain">----- START Event Driven Actions Dump ---- <code class="plain spaces"><code class="plain plain">---- END Event Driven Actions Dump ---- <code class="plain spaces"><code class="plain plain">----- START DDE Actions Dump ----- <code class="plain spaces"><code class="plain plain">Executing SYNC actions <code class="plain spaces"><code class="plain plain">----- START DDE Action: 'DB_STRUCTURE_INTEGRITY_CHECK' (Async) ----- <code class="plain spaces"><code class="plain plain">Successfully dispatched <code class="plain spaces"><code class="plain plain">----- END DDE Action: 'DB_STRUCTURE_INTEGRITY_CHECK' (SUCCESS, 0 csec) ----- <code class="plain spaces"><code class="plain plain">Executing ASYNC actions <code class="plain spaces"><code class="plain plain">----- END DDE Actions Dump (total 0 csec) ----- <code class="plain spaces"><code class="plain plain">WAIT #4573319128: nam='control file sequential read' ela= 258 file#=0 block#=1 blocks=1 obj#=0 tim=237352138057 <code class="plain spaces"><code class="plain plain">WAIT #4573319128: nam='control file sequential read' ela= 205 file#=1 block#=1 blocks=1 obj#=0 tim=237352138319 <code class="plain spaces"><code class="plain plain">WAIT #4573319128: nam='control file sequential read' ela= 190 file#=0 block#=40 blocks=1 obj#=0 tim=237352138539 <code class="plain spaces"><code class="plain plain">WAIT #4573319128: nam='control file sequential read' ela= 251 file#=0 block#=42 blocks=1 obj#=0 tim=237352138818 <code class="plain spaces"><code class="plain plain">WAIT #4573319128: nam='control file sequential read' ela= 192 file#=0 block#=48 blocks=1 obj#=0 tim=237352139044 <code class="plain spaces"><code class="plain plain">WAIT #4573319128: nam='control file sequential read' ela= 255 file#=0 block#=113 blocks=1 obj#=0 tim=237352139328 <code class="plain spaces"><code class="plain plain">WAIT #4573319128: nam='KSV master wait' ela= 1 p1=0 p2=0 p3=0 obj#=0 tim=237352139400 <code class="plain spaces"><code class="plain plain">Byte offset to file# 3 block# 176 is unknown <code class="plain spaces"><code class="plain plain">Incident 115456 created, dump file: /oracle/db/diag/rdbms/hiatmpdb/hiatmpdb1/incident/incdir_115456/hiatmpdb1_ora_12583082_i115456.trc <code class="plain spaces"><code class="plain plain">ORA-01578: ORACLE data block corrupted (file # 3, block # 176) <code class="plain spaces"><code class="plain plain">ORA-01110: data file 3: '+DATA/hiatmpdb/datafile/undotbs1.264.830644315' <code class="plain plain">ORA-01578: ORACLE data block corrupted (file # 3, block # 176) <code class="plain spaces"><code class="plain plain">ORA-01110: data file 3: '+DATA/hiatmpdb/datafile/undotbs1.264.830644315' <code class="plain spaces"><code class="plain plain">ORA-01578: ORACLE data block corrupted (file # 3, block # 176) <code class="plain spaces"><code class="plain plain">ORA-01110: data file 3: '+DATA/hiatmpdb/datafile/undotbs1.264.830644315'
我们可以看到,在访问回滚段4的时候报错了,但是无法获得回滚段的时间戳。Oracle 11g中的回滚段名称的格式如下: _SYSSMUx_时间戳. 实际上,回滚段的信息都存在undo$基表中,我们只需要获得该基表的数据即可。11g中该基表的数据在file 1 block 225block中。因此只需要dd该block,然后strings+grep就行了。最后利用隐含参数_offline_rollback_segments=(_SYSSMUx$) 和_corrupted_rollback_segments=(_SYSSMUx$) 来屏蔽,讲数据库open。 open之后发现想drop问题回滚段居然报错,既然能open也就能够查询dba_rollback_segs试图了,最后发现还有部分回滚段状态也是异常的,因此通过类似这一点 方法来drop 回滚段: ?
1 2 3 4 5 alter session set <code class="php string">"_smu_debug_mode" <code class="php plain">= 4; <code class="php spaces"><code class="php plain">alter rollback segment <code class="php string">"_SYSSMU3_83481414$" <code class="php plain">offline; <code class="php spaces"><code class="php plain">drop rollback segment <code class="php string">"_SYSSMU3_83481414$" <code class="php plain">; <code class="php spaces"><code class="php plain">alter rollback segment <code class="php string">"_SYSSMU4_2115859630$" <code class="php plain">offline; <code class="php spaces"><code class="php plain">drop rollback segment <code class="php string">"_SYSSMU4_2115859630$" <code class="php plain">;
注意,这里如果不这样做的话,无法清理回滚段,你想切换undo 表空间也会报错的。这个问题搞完后,最后发现一个数据文件的坏块,这个坏块折腾了我很长时间,非常奇怪: ?
1 2 3 4 5 6 7 8 9 10 11 continued from file: /oracle/db/diag/rdbms/hiatmpdb/hiatmpdb2/trace/hiatmpdb2_ora_13959382.trc <code class="plain spaces"><code class="plain plain">ORA-01578: ORACLE 数据块损坏 (文件号 97, 块号 373505) <code class="plain spaces"><code class="plain plain">ORA-01110: 数据文件 97: '+DATA/hiatmpdb/datafile/hiatmpts_in06.dbf' <code class="plain plain">========= Dump for incident 197185 (ORA 1578) ======== <code class="plain plain">*** 2014-05-11 16:38:55.665 <code class="plain spaces"><code class="plain plain">dbkedDefDump(): Starting incident default dumps (flags=0x2, level=3, mask=0x0) <code class="plain spaces"><code class="plain plain">----- Current SQL Statement for this session (sql_id=47bt6vfv19g6z) ----- <code class="plain spaces"><code class="plain plain">select t.nid ,t.cpic1path,t.cpic2path from HIATMP.DETECT_SPEED_DATA_EHL_EXTEND t where t.cdevicecode like '%44900100000001%' and row <code class="plain spaces"><code class="plain plain">num
可以看到,97号文件存在一个坏块,我dump了一下该block,发现比较怪: ?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ** 2014-05-11 18:51:21.074 <code class="plain spaces"><code class="plain plain">Start dump data blocks tsn: 6 file#:97 minblk 373505 maxblk 373505 <code class="plain spaces"><code class="plain plain">Block dump from cache: <code class="plain spaces"><code class="plain plain">Dump of buffer cache at level 4 for tsn=6 rdba=407220993 <code class="plain spaces"><code class="plain plain">BH (0x70000012ef08528) file#: 97 rdba: 0x1845b301 (97/373505) class: 8 ba: 0x70000012e5fe000 <code class="plain spaces"><code class="plain plain">set: 33 pool: 3 bsz: 8192 bsi: 0 sflg: 2 pwc: 1575,18 <code class="plain spaces"><code class="plain plain">dbwrid: 0 obj: 90762 objn: 90762 tsn: 6 afn: 97 hint: f <code class="plain spaces"><code class="plain plain">hash: [0x700000157972b00,0x700000157972b00] lru: [0x70000012ef09348,0x70000012ef091d0] <code class="plain spaces"><code class="plain plain">ckptq: [NULL] fileq: [NULL] objq: [0x70000012ef087b0,0x70000014153f8a0] objaq: [0x70000012ef087c0,0x70000014153f890] <code class="plain spaces"><code class="plain plain">st: SCURRENT md: NULL fpin: 'ktspfwh13: ktspGetNextL1ForScan' tch: 4 le: 0x700000043fd8780 <code class="plain spaces"><code class="plain plain">flags: auto_bmr_tried <code class="plain spaces"><code class="plain plain">LRBA: [0x0.0.0] LSCN: [0x0.0] HSCN: [0xffff.ffffffff] HSUB: [65535] <code class="plain spaces"><code class="plain plain">Block dump from disk: <code class="plain spaces"><code class="plain plain">buffer tsn: 6 rdba: 0x1845b301 (97/373505) <code class="plain spaces"><code class="plain plain">scn: 0x0c91.d8604ed8 seq: 0xff flg: 0x04 tail: 0x4ed845ff <code class="plain spaces"><code class="plain plain">frmt: 0x02 chkval: 0xcafb type: 0x45=NGLOB: Lob Extent Header <code class="plain spaces"><code class="plain plain">Hex dump of block: st=0, typ_found=1 <code class="plain spaces"><code class="plain plain">Dump of memory from 0x0000000110AEA800 to 0x0000000110AEC800 <code class="plain spaces"><code class="plain plain">110AEA800 45A20000 1845B301 D8604ED8 0C91FF04 [E....E...`N.....] <code class="plain spaces"><code class="plain plain">110AEA810 CAFB0000 B9138F29 9DC40000 05B6CCDA [.......)........]
大家可以看下这个坏块的type,居然是0×45,说这是一个lob extent header block。开始我还以为这个表存在lob字段,最后desc看了下表结构,根本没有lob字段。可见这个block是写乱了。大家知道处理坏块的方法无法就是10231 event,dbms_repair,以及dbms_rowid来处理。当时试了几种方法均不行。其中10231 event和dbms_repair本质上差不多,都是标记坏块,跳过多块读。而dbms_rowid则是根据坏块获取rowid,然后根据rowid来抢救数据。居然也不行,比较怪。最后我干脆创建一个空间,分配到该文件,然后delete掉数据,然后dd一个空块,修改掉rdba和obj id,然后直接dd替换。后记:后面让同事全库检查,还发现了20来个数据坏块,不过大多是Index,处理相对简单,我就不参与了。
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Two Point Museum: All Exhibits And Where To Find Them
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to recover expired WeChat files? Can expired WeChat files be recovered? How to recover expired WeChat files? Can expired WeChat files be recovered? Feb 22, 2024 pm 02:46 PM

Open WeChat, select Settings in Me, select General and then select Storage Space, select Management in Storage Space, select the conversation in which you want to restore files and select the exclamation mark icon. Tutorial Applicable Model: iPhone13 System: iOS15.3 Version: WeChat 8.0.24 Analysis 1 First open WeChat and click the Settings option on the My page. 2 Then find and click General Options on the settings page. 3Then click Storage Space on the general page. 4 Next, click Manage on the storage space page. 5Finally, select the conversation in which you want to recover files and click the exclamation mark icon on the right. Supplement: WeChat files generally expire in a few days. If the file received by WeChat has not been clicked, the WeChat system will clear it after 72 hours. If the WeChat file has been viewed,

How to fix Windows 11 keyboard not typing problem How to fix Windows 11 keyboard not typing problem Dec 28, 2023 pm 05:59 PM

Recently, some friends have encountered the problem of large characters on the win11 keyboard. They don't know which key to press to restore it. In fact, this may be because our keyboard is locked and we only need to unlock it. Which key should I press to recover if I can’t type on the win11 keyboard? 1. First, we press the “left shift+left alt+numlock” key combination on the keyboard. 2. Then, after opening the menu shown below, click the "Yes" button to enable the mouse keys. 3. Next, click the "Start Menu" or "Search" icon to open the taskbar. 4. After that, enter "osk" in the search box above to open the on-screen keyboard application. 5. Finally, click the "numlock" key in the lower right corner of the on-screen keyboard. Ps: If you are using a laptop, then

How to recover browsing history in incognito mode How to recover browsing history in incognito mode Feb 19, 2024 pm 04:22 PM

Private browsing is a very convenient way to browse and protect your privacy when surfing the Internet on your computer or mobile device. Private browsing mode usually prevents the browser from recording your visit history, saving cookies and cache files, and preventing the website you are browsing from leaving any traces in the browser. However, for some special cases, we may need to restore the browsing history of Incognito Browsing. First of all, we need to make it clear: the purpose of private browsing mode is to protect privacy and prevent others from obtaining the user’s online history from the browser. Therefore, incognito browsing

How to restore chat spark on TikTok How to restore chat spark on TikTok Mar 16, 2024 pm 01:25 PM

On Douyin, a short video platform full of creativity and vitality, we can not only enjoy a variety of exciting content, but also have in-depth communications with like-minded friends. Among them, chat sparks are an important indicator of the intensity of interaction between the two parties, and they often inadvertently ignite the emotional bonds between us and our friends. However, sometimes due to some reasons, the chat spark may be disconnected. So what should we do if we want to restore the chat spark? This tutorial guide will bring you a detailed introduction to the content strategy, hoping to help everyone. How to restore the spark of Douyin chat? 1. Open the Douyin message page and select a friend to chat. 2. Send messages and chat to each other. 3. If you send messages continuously for 3 days, you can get the spark logo. On a 3-day basis, send pictures or videos to each other

How to restore Xiaomi Cloud photo album to local How to restore Xiaomi Cloud photo album to local Feb 24, 2024 pm 03:28 PM

How to restore Xiaomi Cloud Photo Album to local? You can restore Xiaomi Cloud Photo Album to local in Xiaomi Cloud Photo Album APP, but most friends don’t know how to restore Xiaomi Cloud Photo Album to local. The next step is to restore Xiaomi Cloud Photo Album to local. Local method graphic tutorials, interested users come and take a look! How to restore Xiaomi cloud photo album to local 1. First open the settings function in Xiaomi phone and select [Personal Avatar] on the main interface; 2. Then enter the Xiaomi account interface and click the [Cloud Service] function; 3. Then jump to Xiaomi For the function of cloud service, select [Cloud Backup]; 4. Finally, in the interface as shown below, click [Cloud Album] to restore the album to local.

How to restore default wallpaper in win10 How to restore default wallpaper in win10 Feb 10, 2024 pm 10:51 PM

Windows 10's May 2019 Update features a new, brighter default desktop background. It looks great - with the new light theme. If you use Windows 10’s dark theme, you may want a darker background. Strangely, the original Windows 10 desktop background has been removed from the latest version of Windows 10. You have to download it from the web or copy its files from an old Windows 10 PC. Although we were unable to find this wallpaper image on Microsoft's official website, you can download it from other sources. We found a copy of the original Windows 10 desktop wallpaper in 4K resolution on Imgur. Additionally, there are other sizes and more default walls

Tutorial to restore win11 default avatar Tutorial to restore win11 default avatar Jan 02, 2024 pm 12:43 PM

If we change our system account avatar but don’t want it anymore, we can’t find how to change the default avatar in win11. In fact, we only need to find the folder of the default avatar to restore it. Restore the default avatar in win11 1. First click on the "Windows Logo" on the bottom taskbar 2. Then find and open "Settings" 3. Then enter "Account" on the left column 4. Then click on "Account Information" on the right 5. After opening, click "Browse Files" in the selected photo. 6. Finally, enter the "C:\ProgramData\Microsoft\UserAccountPictures" path to find the system default avatar picture.

How to restore Win10 keyboard shortcut settings? How to restore Win10 keyboard shortcut settings? Dec 28, 2023 pm 11:49 PM

When we use the keyboard every day, we always encounter various keyboard problems. Most of them have updated the win10 system, and even more so. What should we do when the keyboard has become a shortcut key? Let’s take a look at the specific solutions below. How to restore the win10 keyboard to shortcut keys 1. It may be that the + shortcut key is turned on. 2. The method of closing is + (cannot press it backwards and forwards). 3. Another thing is to + return to the lock screen interface to log in. 4. Another possibility is to lock the keyboard. Press + to try. 5. If that doesn't work, just press ++ and then cancel. The above is the recovery method for converting the Win10 keyboard into shortcut keys that this website asked you. I hope it can solve your confusion. If you want to know more questions, please bookmark this site. welcome

See all articles