Interpreting an index data block dump
I have seen a few postings about reading index data blocks, mine doesnt quite look like those.
Ok: 11Gr1 (linux)
Tracing down a hot block issue with an index, I performed
alter system dump datafile 11 block 4030208;
Looking at the Web page "Index Block Dump: Index Only Section Part II (Station To Station)" and others they show a dump like this:
row#0[8021] flag: ——, lock: 0, len=15
col 0; len 5; (5): 42 4f 57 49 45
col 1; len 6; (6): 02 01 48 8a 00 00
row#1[8002] flag: ——, lock: 0, len=19
col 0; len 9; (9): 4d 41 4a 4f 52 20 54 4f 4d
col 1; len 6; (6): 02 01 48 8a 00 02
row#2[7987] flag: ——, lock: 0, len=15
col 0; len 5; (5): 5a 49 47 47 59
col 1; len 6; (6): 02 01 48 8a 00 01
—– end of leaf block dump —–
End dump data blocks tsn: 8 file#: 8 minblk 84234 maxblk 84234
I dont see anything that "obvious" in my dump. Am I looking at something other then an leaf block perhaps?
I am expecting/hoping to see some sort of pairs for an index like X(y number, z number)
Block dump from cache:
Dump of buffer cache at level 4 for tsn=6, rdba=50167552
BH (0x275f2aec8) file#: 11 rdba: 0x02fd7f00 (11/4030208) class: 4 ba: 0x274992000
set: 111 bsz: 8192 bsi: 0 sflg: 0 pwc: 0, 25 lid: 0x00000000,0x00000000
dbwrid: 2 obj: 127499 objn: 77784 tsn: 6 afn: 11
hash: [0x403d34650,0x403d34650] lru: [0x333f32878,0x209f4ea88]
lru-flags: hot_buffer
ckptq: [NULL] fileq: [NULL] objq: [0x22dede3f8,0x30ff9c3f8]
st: XCURRENT md: NULL tch: 2
flags: block_written_once redo_since_read gotten_in_current_mode
LRBA: [0x0.0.0] LSCN: [0x0.0] HSCN: [0xffff.ffffffff] HSUB: [34]
cr pin refcnt: 0 sh pin refcnt: 0
buffer tsn: 6 rdba: 0x02fd7f00 (11/4030208)
scn: 0x0001.19bccf84 seq: 0x02 flg: 0x04 tail: 0xcf841002
frmt: 0x02 chkval: 0x987f type: 0x10=DATA SEGMENT HEADER - UNLIMITED
Hex dump of block: st=0, typ_found=1
Dump of memory from 0x0000000274992000 to 0x0000000274994000
274992000 0000A210 02FD7F00 19BCCF84 04020001 [................]
274993FF0 00000000 00000000 00000000 CF841002 [................]
Extent Control Header
Extent Header:: spare1: 0 spare2: 0 #extents: 66 #blocks: 10239
last map 0x00000000 #maps: 0 offset: 4128
Highwater:: 0x047feb5b ext#: 65 blk#: 731 ext size: 1024
#blocks in seg. hdr's freelists: 0
#blocks below: 9946
mapblk 0x00000000 offset: 65
Unlocked
Map Header:: next 0x00000000 #extents: 66 obj#: 127499 flag: 0x40000000
Extent Map
0x02fd7f01 length: 127
0x0339ea80 length: 128
...
Some time ago, I wrote a python script to print decimal form integer values from an index block dump. I don't know if it will help you, but it may be a start. It only prints the integer equivalent of the first column in the index, as that is what I needed at the time.
It is called as...
18:55:31 oracle@oh1xcwcdb01 /u02/admin/wcperf/udump >./blockdump.py wcperf1_ora_21618.trc
col 0: [ 4] c4 48 2a 53 converts to 71418200 on line #526 in the block dump.
col 0: [ 5] c4 48 2a 53 1d converts to 71418228 on line #640 in the block dump.
col 0: [ 6] c5 08 02 20 61 3f converts to 701319662 on line #648 in the block dump.
col 0: [ 6] c5 08 03 2f 33 17 converts to 702465022 on line #785 in the block dump.
col 0: [ 6] c5 08 03 2f 33 5f converts to 702465094 on line #793 in the block dump.
col 0: [ 6] c5 08 03 2f 40 38 converts to 702466355 on line #801 in the block dump.
col 0: [ 6] c5 08 03 30 09 5c converts to 702470891 on line #809 in the block dump.
col 0: [ 6] c5 08 03 32 61 05 converts to 702499604 on line #817 in the block dump.
col 0: [ 6] c5 08 03 33 0b 06 converts to 702501005 on line #827 in the block dump.
col 0: [ 6] c5 08 03 33 19 4b converts to 702502474 on line #835 in the block dump.
col 0: [ 6] c5 08 03 33 44 3d converts to 702506760 on line #843 in the block dump.
col 0: [ 6] c5 08 03 33 45 08 converts to 702506807 on line #851 in the block dump.
col 0: [ 6] c5 08 03 33 4e 5a converts to 702507789 on line #859 in the block dump.
col 0: [ 6] c5 08 03 33 5f 3b converts to 702509458 on line #867 in the block dump.
col 0: [ 6] c5 09 01 01 21 64 converts to 800003299 on line #875 in the block dump.
col 0: [ 6] c5 09 01 01 22 3b converts to 800003358 on line #883 in the block dump.
18:55:41 oracle@oh1xcwcdb01 /u02/admin/wcperf/udump >...and the script itself is below...
#!/usr/bin/python
#Author: Steve Howard
#Date: March 23, 2009
#Organization: AppCrawler
#Purpose: Simple script to print integer equivalents of block dump values in index.
import fileinput
import string
import sys
import re
#boo=1
boo=0
j=0
for line in fileinput.input([sys.argv[1:][0]]):
j=j+1
if re.match('^col 0:', line):
#print line
dep=int(string.replace(string.split(string.split(line,"]")[1])[0],"c","")) - 1
#print dep
i=0
tot=0
exp=dep
for col in string.split(string.split(line,"]")[1]):
if i > 0:
tot = tot + ((int(col, 16) - 1) * (100**exp))
exp = exp - 1
i = i + 1
print line.rstrip("\n") + " converts to " + str(tot) + " on line #" + str(j) + " in the block dump."
Similar Messages
-
Ora-01113 and ora-01110 -- Data Block Corruption
Running 10g no backup and noarchivelog.
I put the datafile offline so I can bring up the database. Can anyone help me figure out how to fix the Bad datafile?
Thank You,TRACE FILE INFORMATION
SQL> select pa.value || '/' || i.instance_name || '_ora_'
2 || pr.spid || '.trc' as trace_file
3 from v$session s, v$process pr, v$parameter pa, v$instance i
4 where s.username = user and s.paddr = pr.addr
5* and pa.name='user_dump_dest';
TRACE_FILE
/oracle/admin/ora9i/udump/ora9i_ora_25199.trcDUMPING A TABLE BLOCK
SQL> select file_id,block_id,bytes,blocks
2 from dba_extents
3 where owner='P' and segment_name='EMP';
FILE_ID BLOCK_ID BYTES BLOCKS
3 9 65,536 8next is to find out the tablespace name and the datafile...
SQL> select tablespace_name,file_name from dba_data_files
2 where relative_fno = 3;
TABLESPACE_NAME FILE_NAME
USER_DATA /oradata3/ora9i/user_data01.dbfNow that we know which file and blocks hold our table, let’s dump a sample block of the table. This is done as follows:
SQL> alter system dump datafile 3 block 10;System altered.
Let’s now look at the contents of dumping one block.
Start dump data blocks tsn: 3 file#: 3 minblk 10 maxblk 10
buffer tsn: 3 rdba: 0x00c0000a (3/10)
scn: 0x0000.00046911 seq: 0x02 flg: 0x04 tail: 0x69110602
frmt: 0x02 chkval: 0x579d type: 0x06=trans data
Block header dump: 0x00c0000a
Object id on Block? Y
seg/obj: 0x6d9c csc: 0x00.46911 itc: 2 flg: O typ: 1 - DATA
fsl: 0 fnx: 0x0 ver: 0x01
Itl Xid Uba Flag Lck Scn/Fsc
0x01 xid: 0x0005.02f.0000010c uba: 0x00806f10.00ca.28 C--- 0 scn 0x0000.00046900
0x02 xid: 0x0003.01c.00000101 uba: 0x00800033.0099.04 C--- 0 scn 0x0000.00046906
This is the beginning of the data block dump. The first line tells us that we are dumping file#3, starting at block# 10 (minblk), and finishing with block# 10 (maxblk). Had we dumped more than one data block, these values would represent a range. The relative data block address (rdba) is 0x00c0000a. For more information on the rdba, refer to a later section in this paper. At the end of this line, we can see in parentheses that the rdba corresponds to file# 3, block# 10 (3/10).
The third line describes the SCN of the data block. In our case, the SCN is 0x0000.00046911. The tail of the data block is composed of the last two bytes of the SCN (6911) appended with the type (06) and the sequence (02). If the decomposition of the tail does not match these three values, then the system knows that the block is inconsistent and needs to be recovered. While this tail value shows up at the beginning of the block dump, it is physically stored at the end of the data block.
The block type shows up on the fourth line. Some of the valid types correspond to the following table:
Type Meaning
0x02 undo block
0x06 table or index data block
0x0e undo segment header
0x10 data segment header block
0x17 bitmapped data segment headeri hope it will help... -
Index block dump: "header address" doesn't match rdba
I did a dump on index leaf block, and I found "header address" doesn't match rdba, what's the "header address"? I also found several leaf blocks have the same "header address".
buffer tsn: 11 rdba: 0x1684d120 (90/315680)
========> 0x1684d120 (1)
header address 4403265988=0x1067481c4
========> 0x1067481c4 (2)
*** SERVICE NAME:(SYS$USERS) 2009-08-04 04:37:36.335
*** SESSION ID:(14234.24426) 2009-08-04 04:37:36.335
Start dump data blocks tsn: 11 file#: 90 minblk 315680 maxblk 315680
buffer tsn: 11 rdba: 0x1684d120 (90/315680)
========> 0x1684d120 (1)
scn: 0x0324.dda9ec3d seq: 0x01 flg: 0x04 tail: 0xec3d0601
frmt: 0x02 chkval: 0xeb2a type: 0x06=trans data
Hex dump of block: st=0, typ_found=1
Block header dump: 0x1684d120
Object id on Block? Y
seg/obj: 0x7ca10 csc: 0x324.dda9ec3d itc: 17 flg: O typ: 2 - INDEX
fsl: 0 fnx: 0x1684cf72 ver: 0x01
Itl Xid Uba Flag Lck Scn/Fsc
Leaf block dump
===============
header address 4403265988=0x1067481c4
========> 0x1067481c4 (2)
kdxcolev 0
KDXCOLEV Flags = - - -
kdxcolok 0
kdxcoopc 0x90: opcode=0: iot flags=I-- is converted=Y
kdxconco 2
kdxcosdc 5
kdxconro 0
kdxcofbo 36=0x24
kdxcofeo 7672=0x1df8
kdxcoavs 7636
kdxlespl 0
kdxlende 0
kdxlenxt 373579108=0x16445d64
kdxleprv 377801347=0x1684ca83
kdxledsz 0
kdxlebksz 7672
----- end of leaf block dump -----Thanks,
DanielHi user646745
You didn't say why you need to do index block dump ?
Also take are that block structures and dumps some time are different from a ver to ver it 9i and 10g. Unless you now what exectaly you are looking for
Thanks -
Multiple Selection from a data block
Hello,
I have a data block returning the names and surnames of employees. Can I select multiple rows from that data block?
Thank youYou could put a checkbox on the row and if it is ticked then interpret this as a selected row.
Sometimes it is useful to store this type of selection in some type of structure like a record group or index by table and process those rows rather than read the data block -
Leaf Block Dump / Output varies
Hello guys,
i have faced the following issues on a leaf block dump:
First)
row#0[8024] flag: ------, lock: 0, len=12, data:(6): 00 40 76 fa 00 00
col 0; len 2; (2): c1 02
col 1; NULL
row#1[7998] flag: ------, lock: 0, len=14, data:(6): 00 40 76 fa 00 02
col 0; len 2; (2): c1 03
col 1; len 2; (2): c1 02
.......Second)
1103F5A90 3D91D858 000C0100 03303130 0944454C [=..X.....010.DEL]
1103F5AA0 494E535F 494E0832 30303730 36303106 [0505.20070601.]
1103F5AB0 30303535 3331063D 91D85800 0D010003 [005531.=..X.....]
1103F5AC0 30313009 44454C49 4E535F49 4E083230 [010.DAT050_IN.20]
1103F5AD0 30373036 30310630 30353533 34063D91 [070601.005534.=.]
1103F5AE0 D858000E 01000330 31300944 454C494E [.X.....010.DAT03]
1103F5AF0 535F494E 08323030 37303630 31063030 [S_IN.20070601.00]
1103F5B00 35353334 063D91D8 58000F01 00033031 [5534.=..X.....01]
1103F5B10 30094445 4C494E53 5F494E08 32303037 [0.DAT050_IN.2007]Sometimes i am facing the row#n output like in the first example and sometimes i am facing only the "real data" like in the second example when i am doing a leaf block dump. Both examples are from different indeces...
When does one occur? Has anyone any idea?
Regards
StefanHi,
File is truncated by trace file limit. Yeah but the file is not big enough.. i only dumped one block.. and the limit is up to 10MB
But as far as I'm aware, a memory dump is normally not included in block dump. Did you check what's at the top? Really interesting... i have done the same on our test system on the same index.. and there the section leaf block dump includes the information. The same command on the same index (i have cloned the database 3 days ago to our test system).
Leaf block dump
===============
row#0[3514] flag: ---D--, lock: 2, len=39
col 0; len 3; (3): 30 31 30
col 1; len 9; (9): 44 45 4c 49 4e 53 5f 49 4e
col 2; len 8; (8): 32 30 30 37 30 36 30 31
col 3; len 6; (6): 30 30 35 35 31 39
col 4; len 6; (6): 3d 91 d7 d8 00 13
----- end of leaf block dump -----Can this leaf block cleaned out (by deletes) and not include any pointers anymore?
I have compared the leaf block attributes:
-> kdxcoavs 3298 (with row#n entries)
-> kdxcoavs 6988 (without row#n entries)
So the dump were are no row#n entries has much more available space - this would be confirm my guess.
Regards
Stefan -
What is the meaning of data blocks ?
hi,
What is the exact meaning of "data blocks" in the following paragraph ?
Index records and table records are organized in data blocks.
If you dispatch an SQL statement from an ABAP program to the database, the program searches for the data records requested either in the database table itself (full table scan) or by using an index (index unique scan or index range scan). If all fields requested are found in the index using an index scan, the table records do not need to be accessed.
A data block shows the level of detail in which data is written to the hard disk or read from the hard disk. Data blocks may contain multiple data records, but a single data record may be spread across several data blocks.
thanks
bhaktiHi ,
As Per oracle , data is stored in database in form of Data blocks , extent and Segments .
Physical space of memory is allocated to store data .
first level is called BLOCKS ,nexxt is extent and last is SEGMENT .
each block can store multiple data records and Conversly large no of data records can be stored in data Blocks .
data is stored in DATA BLOCKS which is smallest unit in oracle where data is stored in bytes .
regards
Deepak. -
number of data block
is there any limit for the number of datablocks in a form?
i have a form that has 8 blocks and all of them are none base,
some times when i use this form it suddenly closed and a special file (ifrun60_dump file)
is created.i donot know the reson and i cannot solve the problem
if you have any idea about this ,plz help me?
thanks in advance.
regards ,
shoja.Restriction on the number of objects is documented in the Help topic "Limits" - There is no practical limit to the number of blocks in a form. Certainly 8 is a timy number compared with mosdt forms.
Contact support and supply them with the dump file, that should help to identify the issue you have. -
I have one table xxxx in a tablespace tbx and the tablespace tbx has only 1 datafile. The table xxxx size is 890MB w/ 14 millions records. The datafile size is 2048MB. This table is a frequently access with insert/delete/select. The system spends alot of time waiting on this datafile. If I create a new tablespace abc with 20 datafiles worth about 100MB each, would it help reducing the data block wait count? The pctfree/pctused is 10/40 respectively.
Can anyone please give me an how to resolve this?I am looking at an Oracle Statistics. We use SAN technology with RAID 0+1 Striped across all disks.
First I use this query to get the wait statistics:
select time, count, class
from v$waitstat
order by time, count;
From this query above, I got this result and database just been up 02/17/2004, just about 4 days ago:
TIME COUNT CLASS
0 0 sort block
0 0 save undo block
0 0 save undo header
0 0 free list
0 0 bitmap block
0 0 unused
0 0 system undo block
0 0 system undo header
0 0 bitmap index block
10 10 extent map
48 656 undo header
271 853 undo block
301 730 segment header
780382 1214405 data block
Then I use this query to find which datafile is being hit the most:
select count, file#, name
from x$kcbfwait, v$datafile
where indx + 1 = file#
order by count desc;
The query above returned:
COUNT FILE# NAME
473324 121 /xx/xx_ycm_tbs_03_01.dbf
104179 120 /xx/xx_ycm_tbs_02_01.dbf
93336 118 /xx/xx_idx_tbs_03_01.dbf
93138 119 /xx/xx_idx_tbs_03_02.dbf
80289 90 /xx/xx_datafile67.dbf
64044 108 /xx/xx_ycm_tbs_01_01.dbf
61485 41 /xx/xx_datafile25.dbf
61103 21 /xx/xx_datafile8.dbf
57329 114 /xx/xx_ycm_tbs_01_02.dbf
29338 5 /xx/xx_datafile02.dbf
29101 123 /xx/xx_idx_tbs_04_01.dbf
file# 121 is in a tablespace with this only datafile and this tablespace hold only one table. file#120 is the same thing, it's in another tablespace and only one table in that tablespace.
At the same time, i use TOP in Solaris I see iowait range between 5-25% during busy hour. -
Query Execution/Elapsed Time and Oracle Data Blocks
Hi,
I have created 3 tables with one column only. As an example Table 1 below:
SQL> create table T1 ( x char(2000));
So 3 tables are created in this way i.e. T1,T2 and T3.
T1 = in the default database tablespace of 8k (11g v11.1.0.6.0 - Production) (O.S=Windows).
T2 = I created in a Tablespace with Blocksize 16k.
T3 = I created in a Tablespace with Blocksize 4k. In the same Instance.
Each table has approx. 500 rows (So, table sizes are same in all the cases to test Query execution time ). As these 3 tables are created under different data block sizes so the ALLOCATED no. of data blocks are different in all cases.
T1 = 8k = 256 Blocks = 00:00:04.76 (query execution time/elapsed time)
T2 = 16k=121 Blocks = 00:00:04.64
T3 = 4k = 490 Blocks = 00:00:04.91
Table Access is FULL i.e. I have used select * from table_name; in all 3 cases. No Index nothing.
My Question is why query execution time is nearly the same in all 3 cases because Oracle has to read all the data blocks in each case to fetch the records and there is a much difference in the allocated no. of blocks ???
In 4k block size example, Oracle has to read just 121 blocks and it's taking nearly the same time as it's taking to read 490 blocks???
This is just 1 example of different data blocks. I have around 40 tables in each block size tablespace and the result are nearly the same. It's very strange for me because there is a much difference in the no. of allocated blocks but execution time is almost the same, only difference in milliseconds.
I'll highly appreciate the expert opinions.
Bundle of thanks in advance.
Best Regards,Hi Chris,
No I'm not using separate databases, it's 8k database with non-standard blocksizes of 16k and 4k.
Actually I wanted to test the Elapsed time of these 3 tables, so for that I tried to create the same size
tables.
And how I equalize these is like I have created one column table with char(2000).
555 MB is the figure I wanted to use for these 3 tables ( no special figure, just to make it bigger than the
RAM used for my db at the db startup to be sure of not retrieving the records from cache).
so row size with overhead is 2006 * 290,000 rows = 581740000(bytes) / 1024 = 568105KB / 1024 = 555MB.
Through this math calculation I thought It will be the total table size. So I Created the same no. of rows in 3 blocksizes.
If it's wrong then what a mes because I was calculating tables sizes in the same way from the last few months.
Can you please explain a little how you found out the tables sizes in different block sizes.Though I understood how you
calculated size in MB from these 3 block sizes
T8K =97177 BLOCKS=759MB *( 97177*8 = 777416KB / 1024 = 759MB )*
T16K=41639 BLOCKS=650MB
BT4K=293656 BLOCKS=1147MB
For me it's new to calculate the size of a table. Can you please tell me then how many rows I can create in each of
these 3 tables to make them equal in MB to test for elapsed time.
Then I'll again run my test and put the results here. Because If I've wrongly calculated table sizes then there is no need to talk about elapsed time. First I must equalize the table sizes properly.
SQL> select sum(bytes)/1024/1024 "Size in MB" from dba_segments> 2 where segment_name = 'T16K';
Size in MB
655
Is above SQL is correct to calculate the size or is it the correct alternative way to your method of calculating the size??
I created the same table again with everything same and the result is :
SQL> select num_rows,blocks from user_tables where table_name = 'T16K';NUM_ROWS BLOCKS
290000 41703
64 more blocks are allocated this time so may be that's y it's showing total size of 655 instead of 650.
Thanks alot for your help.
Best Regards,
KAm
Edited by: kam555 on Nov 20, 2009 5:57 PM -
Storing a lot of data in an indexed data structure for quick access.
I'm designing an app. which will need to store a large amount of data in memory. Records will be flowing into the app. via a socket. The app will receive about 30 records/second which is about 108,000 records/hour and about 600,000 records/day. I need to store the records in an indexed data structure so that I can access them quickly. For example, at 9:00am I will need to access records received at 8:30am, 8:35am, 8:40am, etc. This program will be multithreaded and as I understand Vector is the only data structure that is thread safe. Is Vector my only choice? How do I access objects in a Vector using an index? Is there something better that I can use?
Is Vector my only choice?If you want to access the objects by key then you should use something like a HashMap. But if you want to access them by an array index then an ArrayList would be more appropriate.
as I understand Vector is the only data structure that is thread safeYou can get a thread-safe version of any Collection object by using the Collection.synchronizedCollection method.
How do I access objects in a Vector using an index? I'd suggest you read the API documentation. And probably the Sun tutorial on Collections at http://java.sun.com/docs/books/tutorial/collections/index.html
600,000 records/day. Unless you plan to dump old data after a short period of time, you may want to consider using a database to avoid running out of memory. -
Hi,
I am running into a data corruption issue.
My database is:
SQL> select banner from v$version;
BANNER
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
PL/SQL Release 11.2.0.3.0 - Production
CORE 11.2.0.3.0 Production
TNS for Linux: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production
The following information is written to the alert.log File
alert.log File
Mon Nov 07 17:24:12 2011
Starting ORACLE instance (normal)
LICENSE_MAX_SESSION = 0
LICENSE_SESSIONS_WARNING = 0
Picked latch-free SCN scheme 2
Using LOG_ARCHIVE_DEST_1 parameter default value as USE_DB_RECOVERY_FILE_DEST
Autotune of undo retention is turned on.
IMODE=BR
ILAT =27
LICENSE_MAX_USERS = 0
SYS auditing is disabled
Starting up:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production.
ORACLE_HOME = /home/oracle/dbhome
System name: Linux
Node name: dbl-ora
Release: 2.6.18-274.3.1.el5 (This is rhel5.7 or CentOs5.7)
Version: #1 SMP Tue Sep 6 20:14:03 EDT 2011
Machine: i686 / vm
Mon Nov 07 19:42:14 2011
Corrupt Block Found
TSN = 0, TSNAME = SYSTEM
RFN = 1, BLK = 52346, RDBA = 4246650
OBJN = 225, OBJD = 225, OBJECT = IDL_UB1$, SUBOBJECT =
SEGMENT OWNER = SYS, SEGMENT TYPE = Table Segment
Errors in file /home/oracle/diag/rdbms/ora11/K/trace/K_ora_5425.trc (incident=11053):
ORA-01578: ORACLE data block corrupted (file # 1, block # 52346)
ORA-01110: data file 1: '/home/oracle/oradata/ora11/system01.dbf'
Incident details in: /home/oracle/diag/rdbms/ora11/K/incident/incdir_11053/K_ora_5425_i11053.trc
I was even able to detect the row that is generating the issue.
In my case the obj# 33573 until 33577 are causing the issue,
though I have no idea what sort of objects are affected.
SQL> select * from idl_ub1$ where obj#=33572;
OBJ# PART VERSION PIECE# LENGTH P
33572 1 0 0 9032 F
SQL> select * from idl_ub1$ where obj#=33573;
ERROR:
ORA-01578: ORACLE data block corrupted (file # 1, block # 52346)
ORA-01110: data file 1: '/home/oracle/oradata/ora11/system01.dbf'
no rows selected
SQL> select * from idl_ub1$ where obj#=33577;
ERROR:
ORA-01578: ORACLE data block corrupted (file # 1, block # 52358)
ORA-01110: data file 1: '/home/oracle/oradata/ora11/system01.dbf'
no rows selected
SQL> select * from idl_ub1$ where obj#=33578;
OBJ# PART VERSION PIECE# LENGTH P
33578 1 0 0 9032 F
Any idea, how to fix this problem without recreating the whole database?
Thanks in advance.
wmager
Edited by: magerxr on Nov 7, 2011 8:27 AMmagerxr wrote:
Thanks again for your quick advise.
Here comes the result of dbv against my system tablespace.
[oracle@dbl-ora ~]$ dbv FILE=/home/oracle/oradata/ora11/system01.dbf
DBVERIFY: Release 11.2.0.3.0 - Production on Mon Nov 7 22:39:11 2011
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
DBVERIFY - Verification starting : FILE = /home/oracle/oradata/ora11/system01.dbf
Page 52346 is influx - most likely media corrupt
Corrupt block relative dba: 0x0040cc7a (file 1, block 52346)
Fractured block found during dbv:
Data in bad block:
type: 6 format: 2 rdba: 0x0040cc7a
last change scn: 0x0000.0010acfa seq: 0x1 flg: 0x04
spare1: 0x0 spare2: 0x0 spare3: 0x0
consistency value in tail: 0x00000000
check value in block header: 0x8fda
computed block checksum: 0xaafbselect owner, segment_type, segment_name from dba_extents
where file_id = 1 and 52346 between block_id and block_id+blocks-1;
>
Page 52347 is marked corrupt
Corrupt block relative dba: 0x0040cc7b (file 1, block 52347)
Bad header found during dbv:
Data in bad block:
type: 1 format: 6 rdba: 0x0000a206
last change scn: 0xacfa.0040cc7b seq: 0x10 flg: 0x00
spare1: 0xfa spare2: 0xac spare3: 0x401
consistency value in tail: 0x00000000
check value in block header: 0x0
block checksum disabled
select owner, segment_type, segment_name from dba_extents
where file_id = 1 and 52347 between block_id and block_id+blocks-1;
Page 52361 is marked corrupt
Corrupt block relative dba: 0x0040cc89 (file 1, block 52361)
Bad header found during dbv:
Data in bad block:
type: 1 format: 6 rdba: 0x0000a206
last change scn: 0xacfb.0040cc89 seq: 0x10 flg: 0x00
spare1: 0xfb spare2: 0xac spare3: 0x401
consistency value in tail: 0x32298500
check value in block header: 0x0
block checksum disabled
select owner, segment_type, segment_name from dba_extents
where file_id = 1 and 52361 between block_id and block_id+blocks-1;
>
>
DBVERIFY - Verification complete
Total Pages Examined : 122880
Total Pages Processed (Data) : 81298
Total Pages Failing (Data) : 0
Total Pages Processed (Index): 22307
Total Pages Failing (Index): 0
Total Pages Processed (Other): 3349
Total Pages Processed (Seg) : 1
Total Pages Failing (Seg) : 0
Total Pages Empty : 15910
Total Pages Marked Corrupt : 16
Total Pages Influx : 1
Total Pages Encrypted : 0
Highest block SCN : 4064615 (0.4064615)post results from 3 SQL above -
Segments, extents and data blocks
I'm somewhat green when it comes to Oracle and databases in general, so bare with me. I bought the OCP Exam Guide to try and learn as much as I can. I'm at the chapter about segments, extents and data blocks and I'm having a bit of trouble grasping the conecpts of these. Are these logical? Does anyone have time for quick overview?
Thank you!Ignoring the O/S, the basic storage unit in Oracle is a block (db_block). You define the size of the block with the db_block_size parameter, and it is effectively fixed at database creation. You can have tablespaces with a different block size from the database default, but we won't go there for now. A db_block is not the sme as an O/S block, so in that sense it is a logical unit.
In Oracle, a segment is anything that takes disc space, generally speaking, a table or an index. Every segment is stored in a tablespace. A segment can only be in one tablespace, but a tablespace can hold many segments. A tablespace gets its space from a data file (an O/S file). Each data file belongs to one tablespace, but a tablespace can have multiple data files.
Each segment is made up a a number of extents. The are the units of space that are allocated to the segment as it needs space. The size of each extent is controlled by either the INITIAL and NEXT parameters in CREATE TABLESPACE or in one of the CREATE <segment> commands. If you are using locally managed tablespaces, the tablespace parameters define the extent sizes. Each extent belongs to only one segment, but a segment can have many extents. Although the extent sizes are defined in bytes, they must be a multiple of the block size.So, if you have an 8K block size, you cannot have a 12K extent size.
So:
An extent is made up of one or more (contiginous) blocks within a data file.
A segment is made up of one or more (possibly non-contiginous) extents possibly in multiple data files.
Note that the blocks in an extent must be contiginous, but that is a logical concept within Oracle, since Oracle has no way of knowing how and where the O/S has actually allocated the physical space, it just has an internal map of the file space allocated by the O/S.
HTH
John -
Help with Data Block Based on Procedure--getting compilation error
I am trying to create a datablock based on a procedure , but im getting errors in compilation:
Errors are :
1) identifier 'HSM_WSH_DEL_UTIL.DEL_TBL' must be declared
2)PL/SQL ERROR 320 at line 7, column 27
the declaration of the type of this expression is incomplete or malformed
ANy Help would be appreciated !
Heres my pkg spec and body for the data block:
CREATE OR REPLACE PACKAGE hsm_wsh_del_util IS
TYPE del_record is record
(delivery_id number);
TYPE del_tbl is table of del_record INDEX BY BINARY_INTEGER;
procedure do_query(p_del IN OUT del_tbl);
END hsm_wsh_del_util ;
CREATE OR REPLACE PACKAGE BODY hsm_wsh_del_util IS
procedure do_query(p_del IN OUT del_tbl)
IS
idx number :=1;
CURSOR DELIVERY IS
SELECT DELIVERY_ID
FROM abc_deliveries;
begin
FOR CUR IN DELIVERY LOOP
p_del(idx).delivery_id :=cur.delivery_id;
idx:= idx+1;
END LOOP;
end do_query;
END hsm_wsh_del_util;
Edited by: 981170 on Mar 13, 2013 1:08 PMHi,
Yes I did use the wizard,
I agve it the package.proc name for query.
it pulled up the field delivery ID,
Hit finish, because I do not need update/delete/inserts.
the query data source columns and arguments was defaulted correctly.
THe QUERY-PROCEDURE was built by default.
It is giving me an error though: wrong number or types of arguments in call to POPULATE_BLOCK..
DECLARE
bk_data HSM_WSH_DEL_UTIL.DEL_TBL;
BEGIN
hsm_wsh_del_util.do_query(bk_data);
PLSQL_TABLE.POPULATE_BLOCK(bk_data, 'NEW_DELIVERIES');
END; -
Separate table and index data in RAC database
Hi Experts,
Our database is Oracle11g RAC database. I need your expertise on this
Do we need to retain the table and index data in two different tablespaces for performance perspective in RAC database too?
Please share your practical experience…Thanks in advance.
Regards
Richardg777 wrote:
In my opinion, if there is striping implemented then performance shouldn't degrade even if the index and table blocks are in one tablespace. Exactly.. striping is NOT a good idea at tablespace level as a tablespace is a logical storage device. It is very difficult to stripe comprehensively/correctly at that level, if not impossible.
Striping is a function of the actual storage system and need to happen at physical level. A proper RAID0 implementation.
So the question about multiple tablespaces for a performance increase should not be about striping - but about issues such as data management, block sizes, transportable tablespaces and so on.
Thus my question (at the OP) - what performance problems are expected and are these relevant to the number of tablespaces? -
Data Block, Extents, and Segments in Datafiles
I'm trying to understand the relationship of Data Blocks, Extents, and Segments in Datafiles. What is the simpliest explanation for their relationships.
Hi,
Look at this (might be more readable if you paste it somewhere and use a font with fixed width):
SQL>CONNECT SYSTEM/MANAGER
ConnectÚ.
SQL> CREATE TABLE MyTable
2 (
3 CH1 VARCHAR2(10),
4 CH2 VARCHAR2(10)
5 ) TABLESPACE TOOLS;
Table crÚÚe.
SQL>SELECT * FROM DBA_SEGMENTS WHERE SEGMENT_NAME='MYTABLE';
OWNER SEGMENT_NAME PARTITION_NAME SEGMENT_TYPE TABLESPACE_NAME HEADER_FILE HEADER_BLOCK BYTES BLOCKS EXTENTS INITIAL_EXTENT NEXT_EXTENT MIN_EXTENTS MAX_EXTENTS PCT_INCREASE FREELISTS FREELIST_GROUPS RELATIVE_FNO BUFFER_
SYSTEM MYTABLE TABLE TOOLS 7 1555 65536 16 1 65536 1 2147483645 7 DEFAULT
SQL> SELECT * FROM DBA_EXTENTS WHERE SEGMENT_NAME='MYTABLE';
OWNER SEGMENT_NAME PARTITION_NAME SEGMENT_TYPE TABLESPACE_NAME EXTENT_ID FILE_ID BLOCK_ID BYTES BLOCKS RELATIVE_FNO
SYSTEM MYTABLE TABLE TOOLS 0 7 1553 65536 16 7
SQL> -- Give it another extent
SQL> ALTER TABLE MyTable ALLOCATE EXTENT;
Table modifiÚe.
SQL> SELECT * FROM DBA_EXTENTS WHERE SEGMENT_NAME='MYTABLE';
OWNER SEGMENT_NAME PARTITION_NAME SEGMENT_TYPE TABLESPACE_NAME EXTENT_ID FILE_ID BLOCK_ID BYTES BLOCKS RELATIVE_FNO
SYSTEM MYTABLE TABLE TOOLS 0 7 1553 65536 16 7
SYSTEM MYTABLE TABLE TOOLS 1 7 1569 65536 16 7
SQL> -- Note that in this particular case, Both extents are on the same datafile (7), and if you add the block_id (first block in the extent) of the extent 0 (first one) to the number
SQL> -- of blocks in the extent (16) = 1553 + 16 = 1569 = BLOCK_ID of the second extent (they are physically side by side)
SQL> -- THIS IS NOT ALWAYS TRUE, AND GENERALLY FALSE!
SQL>
SQL> -- Let's dump the first block and see what's in:
SQL> ALTER SYSTEM DUMP DATAFILE 7 BLOCK 1553;
SystÞme modifiÚ.
SQL> -- Now edit the trace file
/* Content:
Start dump data blocks tsn: 7 file#: 7 minblk 1553 maxblk 1553
buffer tsn: 7 rdba: 0x01c00611 (7/1553)
scn: 0x0000.0007b1fa seq: 0x02 flg: 0x00 tail: 0xb1fa2002
frmt: 0x02 chkval: 0x0000 type: 0x20=FIRST LEVEL BITMAP BLOCK
Dump of First Level Bitmap Block
nbits : 4 nranges: 1 parent dba: 0x01c00612 poffset: 0
unformatted: 13 total: 16 first useful block: 3
owning instance : 1
instance ownership changed at
Last successful Search
Freeness Status: nf1 0 nf2 0 nf3 0 nf4 0
Extent Map Block Offset: 4294967295
First free datablock : 3
Bitmap block lock opcode 0
Locker xid: : 0x0000.000.00000000
Highwater:: 0x01c00614 ext#: 0 blk#: 3 ext size: 16
#blocks in seg. hdr's freelists: 0
#blocks below: 0
mapblk 0x00000000 offset: 0
HWM Flag: HWM Set
DBA Ranges :
0x01c00611 Length: 16 Offset: 0
0:Metadata 1:Metadata 2:Metadata 3:unformatted
4:unformatted 5:unformatted 6:unformatted 7:unformatted
8:unformatted 9:unformatted 10:unformatted 11:unformatted
12:unformatted 13:unformatted 14:unformatted 15:unformatted
End dump data blocks tsn: 7 file#: 7 minblk 1553 maxblk 1553
SQL> -- Now add 2 lines
SQL> INSERT INTO MYTABLE VALUES ('ABC','123');
1 ligne crÚÚe.
SQL> COMMIT;
Validation effectuÚe.
SQL> INSERT INTO MYTABLE VALUES ('DEF','456');
1 ligne crÚÚe.
SQL> COMMIT;
Validation effectuÚe.
SQL> -- And get the ROWID (absolute line physical position) of these lines
SQL> SELECT ROWID FROM MYTABLE;
ROWID
AAAHotAAHAAAAYfAAA
AAAHotAAHAAAAYfAAB
SQL> -- Absolute file number of these 2 lines:
SQL> SELECT DBMS_ROWID.ROWID_TO_ABSOLUTE_FNO('AAAHotAAHAAAAYfAAA','SYSTEM','MYTABLE') FROM DUAL;
DBMS_ROWID.ROWID_TO_ABSOLUTE_FNO('AAAHOTAAHAAAAYFAAA','SYSTEM','MYTABLE')
7
SQL> SELECT DBMS_ROWID.ROWID_TO_ABSOLUTE_FNO('AAAHotAAHAAAAYfAAB','SYSTEM','MYTABLE') FROM DUAL;
DBMS_ROWID.ROWID_TO_ABSOLUTE_FNO('AAAHOTAAHAAAAYFAAB','SYSTEM','MYTABLE')
7
SQL> -- Both in file 7: no surprise, in the extent.
SQL> -- Let's be curious and look up the block id:
SQL> SELECT DBMS_ROWID.ROWID_BLOCK_NUMBER('AAAHotAAHAAAAYfAAA') FROM DUAL;
DBMS_ROWID.ROWID_BLOCK_NUMBER('AAAHOTAAHAAAAYFAAA')
1567
SQL> SELECT DBMS_ROWID.ROWID_BLOCK_NUMBER('AAAHotAAHAAAAYfAAB') FROM DUAL;
DBMS_ROWID.ROWID_BLOCK_NUMBER('AAAHOTAAHAAAAYFAAB')
1567
SQL> -- Both lines are in block number 1567.. look again into the dump from block 1553 (First free datablock : 3)
SQL> -- Dump the block:
SQL> ALTER SYSTEM DUMP DATAFILE 7 BLOCK 1567;
SystÞme modifiÚ.
SQL>
/* Content:
Start dump data blocks tsn: 7 file#: 7 minblk 1567 maxblk 1567
buffer tsn: 7 rdba: 0x01c0061f (7/1567)
scn: 0x0000.0007b2fd seq: 0x01 flg: 0x02 tail: 0xb2fd0601
frmt: 0x02 chkval: 0x0000 type: 0x06=trans data
Block header dump: 0x01c0061f
Object id on Block? Y
seg/obj: 0x7a2d csc: 0x00.7b2f5 itc: 2 flg: E typ: 1 - DATA <--------- Here is the objet ID. 0x7a2d = 31227 (check just below block dump)
brn: 0 bdba: 0x1c00611 ver: 0x01
inc: 0 exflg: 0
Itl Xid Uba Flag Lck Scn/Fsc
0x01 0x0006.003.000002f8 0x008000b7.0081.06 --U- 1 fsc 0x0000.0007b2f9
0x02 0x0005.000.000002fd 0x00800099.008f.16 --U- 1 fsc 0x0000.0007b2fd
data_block_dump,data header at 0x2ff1064
===============
tsiz: 0xf98
hsiz: 0x16
pbl: 0x02ff1064
bdba: 0x01c0061f
76543210
flag=--------
ntab=1
nrow=2 <--------- 2 Lines in the block
frre=-1
fsbo=0x16
fseo=0xf82
avsp=0xf6c
tosp=0xf6c
0xe:pti[0] nrow=2 offs=0
0x12:pri[0] offs=0xf8d
0x14:pri[1] offs=0xf82
block_row_dump:
tab 0, row 0, @0xf8d
tl: 11 fb: H-FL lb: 0x1 cc: 2 <--------- First line header
col 0: [ 3] 41 42 43 <--------- Here is 'ABC'
col 1: [ 3] 31 32 33 <--------- Here is '123'
tab 0, row 1, @0xf82
tl: 11 fb: H-FL lb: 0x2 cc: 2 <--------- Second line header
col 0: [ 3] 44 45 46 <--------- Here is 'DEF'
col 1: [ 3] 34 35 36 <--------- Here is '456'
end_of_block_dump
End dump data blocks tsn: 7 file#: 7 minblk 1567 maxblk 1567
SQL> SELECT OBJECT_ID FROM DBA_OBJECTS WHERE OBJECT_NAME='MYTABLE';
OBJECT_ID
31277
Sincerely hope this'll help you understand.
Regards,
Yoann.
Maybe you are looking for
-
Help please! itunes no longer works at all
Hi! I've been dealing with this for weeks now, and thought i'd ask for help. When I try to open itunes it sends me the message that says "itunes has encountered a problem and needs to close." and then it gives me the option of sending an error report
-
Transferring music from ipod classic to new computer
Hi, can anyone help? My last computer became corrupted and unusable and I am left only with my ipod of music, which I would like to transfer to a new computer, however, it will not synch with the new one as it is says my ipod is already synched with
-
MB_DOCUMENT_BADI - SAP R/3 release upgrade from 4.7.1 to ECC 6
Once finished upgrading from SAP R/3 4.7.1 to SAP ECC 6, from SPAU I see that there was no problem on the implementations of this BAdI. But when I tried the transaction, where this BAdi was implemented in, I realized that my implementations were not
-
Viewing Daily Show on iPad in Safari
Can't view show clips because of error: Needs ADOBIE FLASH PLAYER. Notice is; Apple does not support Flash Player on iPhone and iPad. Will this soon change? Is there an app that gives support? Is there another way to watch these segments?
-
NI-DAQ 6.9.3f4 doesn't work with 6025E PXI board.
The PXI 6025 board will do single point aquisitions but won't do waveform aquisitions with NI-DAQ 6.9.3f4. The software would also crash the system when trying to run the test panel in Measurement and Automation. After reinstalling 6.9.1f28 it worked