In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
The following example shows how to restore deleted rows. When the rows in the Oracle are deleted, the data is not actually deleted. Rows are simply marked as deleted, and free space counters and pointers are adjusted accordingly. The row state is stored in the header, which occupies the first few bytes of each line.
The wardrobe consists of Row Flag, Lock Byte (ITL entry) and Column Count. The line header starts with a byte-sized the Row Flag, which holds a bitmask to show the line status. The bitmask is decoded as follows:
Therefore, columns that are suitable for a single block, which are not linked, migrated, or part of the cluster table, or deleted, will have the following attributes:
Head of Row Piece
First Data Piece
Last Data Piece
Therefore, this line is marked 32 + 8 + 4 = 44 or 0x2c. Using the command dump alter system dump datafile N block Y, the above format will be displayed as-- HmurFLMUR. For example, SQL > alter system dump datafile 5 block 1551 witch system altered.Block header dump: 0x0140060f Object id on Block? Y seg/obj: 0x15720 csc: 0x00.111e90 itc: 2 flg: e typ: 1-DATA brn: 0bdba: 0x1400608 ver: 0 inc: 0 exflg: 0 Itl Xid Uba Flag Lck Scn/Fsc0x01 0x0002.00a.0000039c 0x00c000fd.00c0.13-- U1 fsc 0x0000.00111e920x02 0x0000.000.00000000 0x00000000.0000.00-0 fsc 0x0000.00000000bdba: 0x0140060fdata_block_dump Data header at 0x7fa17e07f264=tsiz: 0x1f98hsiz: 0x14pbl: 0x7fa17e07f264 76543210flag=-ntab=1nrow=1frre=-1fsbo=0x14fseo=0x1f8davsp=0x1f79tosp=0x1f790xe:pti [0] nrow=1offs=00x12:pri [0] offs=0x1f8dblock_row_dump:tab 0, row 0, @ 0x1f8dtl: 11 fb:-- Hmurf FLmuri-lb: 0x1 cc: 1col 0: [7] 78 78 73 74 61 72end_of_block_dump when a row is deleted The row flag is updated and bit 5 (16) is set to high. This means that for a typical row, the flag value is now 32 + 16 + 8 + 4percent 60 or 0x3c. In the following example, we delete the record for orastar from the table. Then use the find command to find the deleted line And dump the contents of the block: BBED > find / c star File: / oradata/epmsn/hsql01.dbf (5) Block: 1551 Offsets: 8184 to 8191 Dba:0x0140060f---- 73746172 0106921e BBED > p * kdbr [0] Rowdata [0]-ub1 rowdata [0] @ 8177 0x2cBBED > d / v dba 5 0x2cBBED 1551 offset 8177 File: / oradata/epmsn/hsql01.dbf (5) Block: 1551 Offsets: 8177 to 8191 Dba:0x0140060f--- 2c010107 78787873 74617201 06921e l ... xxxstar.... BBED > d / v dba 5 File 1551 offset 8177 File: / oradata/epmsn/hsql01.dbf (5) Block: 1551 Offsets: 8177 to 8191 Dba:0x0140060f--- 2c010107 78787873 74617201 06921e l,... xxxstar.... * Delete data SQL > select * from hsql.test4;CONS_NAME--xxxstarSQL > delete from hsql.test4;1 row deleted.SQL > commit;Commit complete.SQL > select * from hsql.test4 No rows selected**end delete data BBED > d / v dba 5Power1551 offset 8177 File: / oradata/epmsn/hsql01.dbf (5) Block: 1551 Offsets: 8177 to 8191 Dba:0x0140060f -3c020107 78787873 74617201 06a028 l modify / x 2C offset 8177 File: / oradata/epmsn/hsql01.dbf (5) Block: 1551 Offsets: 8177 to 8191 Dba:0x0140060f -- 2c020107 78787873 74617201 06a028 BBED > sum dba 5 applyCheck value for File 5 Block 1551:current = 0x9ec9, required = 0x9ec9* query un-delete data SQL > select * from hsql.test4 No rows selectedSQL > alter system flush buffer_cache;System altered.SQL > select * from hsql.test4;CONS_NAME--xxxstarSQL >
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.