Database block coprrupted

Strange thing with Oracle 8.1.6
on RedHat 6.2
Sometimes I get message that
database block in system.dbf is corrupted.
After reboot all is OK.
Any ideas?

I had the same problem on an 8.0.5
system. I my case, the problem was
defective memory (found it out through
MEMTEST from www.freshmeat.net, the full
test takes a couple hours)
DB_BLOCK_CHECKSUM was set to TRUE in my init.ora, so the corrupt block wasn't
actually written to redo log. The error
message usually disappeared after 30 minutes
or so. I replaced the memory and everthing
is fine now.
Regards
Anton Weindl
null

Similar Messages

  • HOW TO CREATE MULTIPLE RECORDS IN A NONE DATABASE BLOCK?

    I have a Form where I have a none database block with unbound items. The block
    has 10 records. In the when-new-block instance I run a query by which I would
    like to fill up the block with data. The code fragment looks like the
    following:
    begin
    declare
    tmp_curr_rec_id number;
    begin
    -- a hibak kiolvasasa
    for c_hibak in ( select h.*, h.rowid
    from hibak h
    where 1=1 -- WF - Ide kerul a szurofeltetel
    order by bejelentes_datum asc
    ) loop
    -- bemasoljuk az adatokat az unbound item-ekbe
    :mc_adat.ub_azonosito := c_hibak.azonosito;
    :mc_adat.ub_verzio_letrehozas_datum :=
    c_hibak.verzio_letrehozas_datum;
    :mc_adat.ub_bejelento := c_hibak.bejelento;
    :mc_adat.ub_bejelentes_datum := c_hibak.bejelentes_datum;
    :mc_adat.ub_wf_verzio_csomopont :=
    c_hibak.wf_verzio_csomopont;
    :mc_adat.ub_wf_utolso_esemeny_szoveg :=
    c_hibak.wf_utolso_esemeny_szoveg;
    :mc_adat.ub_hiba_leiras := c_hibak.hiba_leiras;
    :mc_adat.ub_hiba_hely := c_hibak.hiba_hely;
    :mc_adat.ub_rekord_jelleg := 'H';
    :mc_adat.ub_rowid := c_hibak.rowid;
    -- beallitjuk a rekordot-ot olyanra, mintha semmi nem valtozott
    volna
    -- nem szeretnenk a form bezaraskor mindenfele figyelmezteteseket
    -- olvasni a kepernyon
    tmp_curr_rec_id := get_block_property( :system.current_block,
    current_record );
    set_record_property( tmp_curr_rec_id, :system.current_block,
    status, new_status );
    create_record;
    end loop;
    end;
    end;
    The block's update allowed, insert allowed, delete allowed property is set to
    true.
    The result of the code above is that only the last record fetched shows up in
    the block. The problem is - as I found out - is that aech record is fetched,
    the values are copied to the block items, but the create_record built-in
    command would not move the cursor to the next row.
    Can some one please help me with this?
    TIA,
    Tamas Szecsy

    The problem was with the following code segment:
    tmp_curr_rec_id := get_block_property( :system.current_block, current_record );
    set_record_property( tmp_curr_rec_id, :system.current_block, status, new_status );
    After omitting these two lines, the code worked properly.
    Thansk for all whoe replied.
    Regards,
    Tamas

  • Retrive Multiple Records Into A database Block

    hi, all
    i would like to know if there is any document or references wich illustrait the way of retriving Multi records from a procedure built on database side into a database block using form 6i ??
    My Problem is : i create a procedure in the database which retrive a multiple records and the variable from procedure (out) are the same value from Form side (in). but it always fetch the whole records at the same record position in the block as the cursor raised on . i found a way explian how to mintain a set or record using a record type and create a table of that record type , but still don't' know how deal calling the procedure from the form side .
    Any advice of this issue will be greatfull and if sample of code provided will be better
    Thanks in Advance
    Regards
    Omar

    You can try something like this:
    PROCEDURE POPULATE_BLOCK IS
    cursor c1 is
    SELECT <your column names>
    FROM <your table name>
    where <your where condition>
    BEGIN
    open c1;
    go_block('<your block name');
    first_record;
    loop
    fetch c1 into
    :<your block name>.<your column name 1>,
    :<your block name>.<your column name 2>,
    etc,etc
    exit when c1%NOTFOUND;
    next_record;
    end loop;
    close c1;
    first_record;
    END;
    so your code might actually look something like this:
    PROCEDURE POPULATE_BLOCK IS
    cursor c1 is
    SELECT distinct
         a.pog_dept
         ,a.pog_number
         ,a.pog_level
         ,a.pog_id
    ,a.start_date
         ,a.transmit_date
    ,a.deactivate_date
         ,b.pog_description
    FROM pog_stores_msi a, pog_master_msi b
    where a.pog_dept = :b_main.bi_dept
    and a.pog_number = :b_main.bi_pog_number
    and a.pog_level = :b_main.bi_pog_level
    AND A.POG_ID = :B_MAIN.I_POG_ID
    and a.pog_dept = b.pog_dept
    and a.pog_number = b.pog_number
    and a.pog_id = b.pog_id;
    BEGIN
    open c1;
    go_block('b_main');
    first_record;
    loop
    fetch c1 into
    :b_main.bi_dept
    ,:b_main.bi_pog_number
    ,:b_main.bi_pog_level
    ,:b_main.i_pog_id
    ,:b_main.i_start_date
    ,:b_main.i_transmit_date
    ,:b_main.i_deactivate_date
    ,:b_main.i_pog_desc;
    exit when c1%NOTFOUND;
    next_record;
    end loop;
    close c1;
    END;
    Hope this helps,
    NumbNutz

  • How to check an item in a database block has changed before updating

    hi,
    i have a database block having designation and other relative field are there . a ctrl item status (checkbox) in the same block. i want to update records only the status is marked as ticked get updated. what trigger in which levels should be used
    thanks in advance

    In genral forms marks the records as "changed" by itself. If you want to override this "marking", you'll have to overrwrite the DML-logic (for you cannot change the status of the record back to QUERY). So, you have to create ON-INSERT, ON-UPDATE and ON-DELETE-triggers and do something in it like
    IF :BLOCK.MARKED='Y' THEN
      UPDATE_RECORD;
    END IF;

  • How to set "Maximum Lenght" column property for database block at RUNTIME?

    Hi folks,
    Is it possible to somehow set a "Maximum Length" property for database block column at runtime?
    I have a dynamic form, which maintains mostly "STATIC DATA" within all application which are stored in different static data tables (which have similar structure). But now, description column in some of those tables was extended (not in all at this stage). I would like to avoid truncating form error while reading data from those extended tables, so I would like to set an MAXIMUM SIZE to accurate value at the time when I'm specifying TABLE NAME for that database block.
    What property should I use to set it?
       -- before executing query in "MAIN_BLOCK" I always set QUERY_DATA_SOURCE_NAME to user defined value => STATIC DATA TABLE name
       Set_block_Property('MAIN_BLOCK',QUERY_DATA_SOURCE_NAME,:control.table_name);
       Set_block_Property('MAIN_BLOCK',DML_DATA_TARGET_NAME,:control.table_name);
       -- here I would like to set also MAXIMUM LENGHT for particular column (based on some condition, etc.. correct value I can get from ALL_TAB_COLS dictionary
       SET_ITEM_PROPERTY('MAIN_BLOCK.DESCRIPTION', <<XXXXXXX>>, 300);What should I use instead of "<<XXXXXXX>>" if I want to overwrite MAIN_BLOCK.DESCRIPTION column's maximum length to 300?
    Thanks,
    Tomas

    Hi Magoo, thanks for reply.
    Yes, but then user can get other errors while trying to set description with value longer than in database (for all not extended tables).
    Aby idea how to implement SET_CUSTOM_PROPERTY like mentioned here?
    Oracle Forms - "maximum length" property.
    Thanks,
    Tomas

  • Problem in Execute query on non-database block and database block together

    Hi All,
    In my form,i have
    1. First block is Non-database block with one non-database item.
    2. Second and third blocks are database blocks.
    Now the problem is that i want to perform execute-query for all the blocks.
    If the cursor is on the non-database item of 1st block and i clicks on the "Enter-query" then i am getting message " This function can not be performed here".
    If i click on the item of the database block and then clicks on the "Enter-query" and then "execute-query" it's working fine.
    But i don't want to do in this way.
    My cursor will be on the First block only and then it should perform execute-query.
    I am using this non-database item to copy value of this item to the item of the database block item.
    I think i make you understand about my problem.
    I am using forms 10g on Window xp.
    Please help me.

    Hi!
    Simply create a enter-query trigger on the non-database-block:
    begin
    go_block ( 'database_block' );
    enter_query;
    end;If your search criteria is in the non-database-item in the first block,
    you actually do not need the enter_query build-in.
    Just create a execute-query trigger on the first block like:
    begin
    go_block ( 'database_block' );
    execute_query;
    go_item ( :System.trigger_item );
    end;And in a pre-query trigger on the database-block copy the
    value of your seach item into the item you want to search for.
    Regards

  • Validations in a database block before commit

    Hi Folks,
    I have a database block with three fields : Agency, Start Date, End Date. Agency has a List Of values. I need to change the LOV contents depending upon the values already entered. For example any agency with end date as null should not appear in the list and if end date is entered for an agency then it should start appearing in the list...etc. I have to consider both committed and Uncomitted data. Is there a way to traverse through the block without actually navigating through it. The user should not know see the cursor moving anywhere.
    Any suggestions and ideas are most welcome.
    Thanks a lot
    Pranati

    Forms does a select for update when a database item is changed, so the locks have already been established regardless of whether you do a post. You can confirm this behaviour by adding an on-lock trigger.
    Your requirement to read other records in the block without navigating CAN be achieved using calculation properties, and I have used this technique several times in situations like yours.
    Create another agency field in a control block.
    Create a hidden non-database numeric item in your block with a calculation property of formula. The formula should be a user-written function with parameters of control.agency, datablock.agency, datablock.date. Write the function in the form program units: if the agencies match and the date exists return 1 else return 0.
    Create a field in the control block with a summary calculation property doing a sum of the other cxalculated item.
    Now all you need to do is copy the agency code from your current record into control.agency and hey presto ,the summary field instantly tells you how many other records for that agency have dates.
    An alternative method would be to maintain a copy of your block in a record group, but that could get rather complicated.

  • 8K Database Block Size in 11.5.2

    The Release Notes for 11.5.2 state the minimum database block size is 8K. However, this was not a requirement for 11.5.1 and instead patch 1301168 was created for customers with a database block size less than 8K.
    In 11.5.2 is it MANDATORY that the database block size be 8K or greater, or can patch 1301168 be applied in lieu of migrating to a larger block size?

    4K to 8K:
    Use 7.3.4 Export using Unix Pipe to create the export. Files mayhave to split.
    Rebuild the 8.1.6 database. Good Opportunity to consolidate files.
    Import using Unix Pipe with 8.1.6 import utility.
    Set data files to autoextend, unlimited including system. Do not autoextend RBS, TEMP and log.
    Use COMMIT and IGNORE on import.
    Use COMPRESS on export.
    USE very large buffers on both export and import.
    Ignore messages on SYS and SYSTEM tablespace and other definitions.
    If you are using 10.7 with 8.1.6, use interop patch,a nd other module patches (see release notes). Run adprepdb.sql after Import.
    Compile all invalid modules till they match 10.7 invalid modules. Fix invalid modules like the ones documented in release notes.
    If you doing it for just 11.5.2 Just do export import in 8.1.6 with large file system set on your file system and you should be fine. AIX supports Large file systems.
    null

  • How to change existing database block size in all tablespaces

    Hi,
    Need Help to change block size for my existing database which is in 8kb of block size.
    I have read that we can only change block size during database creation, but i want to change it after database installation.
    because for some reason i dont want to change the database installation script.
    Can any one list the steps to change database block size for all existing table space (except system, temp ).
    want to change it to 32kb.
    Thank you for you time.
    -Rushang Kansara

    > We are facing more and more physical reads, I thought by using 32K block size
    we would resolve that..
    A physical read reported by Oracle may not be - it could well be a logical read from the o/s file system cache and not a true physical read. With raw devices for example, a physical I/O reported by Oracle is indeed one as there is no o/s cache for raw devices. So one needs to be careful how aone interprets number like physical reads.
    Lots of physical reads may not necessarily be a bad thing. In contrast, a high percentage of "good/fast" logical reads (i.e. a high % buffer cache hit ratio) may indicate a serious problem with application design - as the application is churning through the exact same data again and again and again. Applications should typically only make a single pass through a data set.
    The best way to deal with physical reads is to make them less. Simple example. A database deals with a lot of inserts. Some bright developer decided to over-index a table. Numerous indexes for the same columns exist in difference physical column orders.
    Oracle now spends a lot of time dealing (reading) with these indexes when inserting (or updating a row). A single write I/O may incur a 100 read I/Os as a result of these indexes needing to be maintained.
    The bottom line is that "more and more physical I/O" is merely a symptom of a problem. Trying to speed these up could well be a wasted exercise. Besides, the most optimal approach to "lots of I/O" is to tune it to make less I/O.
    I/O is the most expensive operation for a RDBMS. It is very difficult to make this expense less (i.e. make I/Os faster). It is more effective to make sure that you use this expensive resource in an optimal way.
    Simple example. Single very large table with 4 indexes. Not very efficient design I/O wise. Single very large partitioned table with local indexes. This can reduce I/O on that table by up to 80% in my experience.

  • Oracle forms commiting database blocks

    I have created a form with 4 database blocks. Fac_master is the main block, which has a not required FK to Fac_potential_cus. Fac_services which has a required FK to fac_master. fac_serv_locations which has a required FK to fac_services. I have put the relationships on the tables that have the PK related to a FK. I am able to insert the data into the form, but when I save the form. The current form's record only saves the data to fac_master. When I create a new form and save it, the current form's record for fac_master saves, but the previous form's record saves to fac_potential_cus and fac_services. Fac_services fk to fac_master does populate with the correct pk from fac_master. Which is causing the FK to not be put into fac_master for fac_potential_cus and fac_serv_locations data is not being put into the table at all because the FK to fac_services is null at the time it trys to put the current record data in itl.
    Can any give me any ideas why only the main datablock(fac_master) saves at the time the form is saved then the other datablocks(fac_services & fac_potential_cus) data saves from the previous record once a new record is saved in fac_master? The data in fac_services is one record behind fac_master and in sync.
    I am using a key_commit at form level. I put a libpack in there to make sure it is reading INSERT and it is. The sql in the key commit is:
    If :system.record_status = 'CHANGED' then
    SUBMIT_BUTTON;
    Elsif :system.record_status = 'INSERT' then
    Commit_Form;
    End if;
    Thanks.
    Edited by: 939341 on Jun 7, 2012 11:27 AM

    Welcome to the forum.
    Unfortunately you posted this question in the Database - General forum. Try posting in the Forms forum
    Forms

  • Database Block Size Smaller Than Operating System Block Size

    Finding that your database block size should be in multiples of your operating system block size is easy...
    But what if the reverse of the image below were the case?
    What happens when you store an Oracle Data Block that is 2 KB in an 8 KB Operating System Block?  Does it waste 6 KB or are there 4 Oracle Data Blocks stored in 1 Operating System Block?
    Is it different if you use ASM?
    I'd like to introduce a 2 KB block size into a RAC Exadata environment for a small set of highly transactional tables and indexes to reduce contention on blocks being requested in the Global Cache.  I've witnessed horrendous wait times for a plethora of sessions when a block was highly active.
    One index in particular has a column that indicates the "state" of the record, it is a very dense index.  Records will flood in, and then multiple processes will poll, do work, and change the state of the record.  The record eventually reaches a final state and is never updated again.
    I know that I can fill up the block with fluff by adjusting the percent free, percent used, and initrans, but that seems like a lazy hack to me and I'd like to do it right if possible.
    Any thoughts or wisdom is much appreciated.
    "The database requests data in multiples of data blocks, not operating system blocks."
    "In contrast, an Oracle block is a logical storage structure whose size and structure are not known to the operating system."
    http://docs.oracle.com/cd/E11882_01/server.112/e25789/logical.htm#BABDCGIB

    But what if the reverse of the image below were the case?
    What happens when you store an Oracle Data Block that is 2 KB in an 8 KB Operating System Block?  Does it waste 6 KB or are there 4 Oracle Data Blocks stored in 1 Operating System Block?
    Is it different if you use ASM?
    I'd like to introduce a 2 KB block size into a RAC Exadata environment for a small set of highly transactional tables and indexes to reduce contention on blocks being requested in the Global Cache.  I've witnessed horrendous wait times for a plethora of sessions when a block was highly active.
    One index in particular has a column that indicates the "state" of the record, it is a very dense index.  Records will flood in, and then multiple processes will poll, do work, and change the state of the record.  The record eventually reaches a final state and is never updated again.
    I know that I can fill up the block with fluff by adjusting the percent free, percent used, and initrans, but that seems like a lazy hack to me and I'd like to do it right if possible.
    Any thoughts or wisdom is much appreciated.
    "The database requests data in multiples of data blocks, not operating system blocks."
    "In contrast, an Oracle block is a logical storage structure whose size and structure are not known to the operating system."
    http://docs.oracle.com/cd/E11882_01/server.112/e25789/logical.htm#BABDCGIB
    You could have answered your own questions if you had just read the top of the page in that doc you posted the link for
    >
    At the finest level of granularity, Oracle Database stores data in data blocks. One logical data block corresponds to a specific number of bytes of physical disk space, for example, 2 KB. Data blocks are the smallest units of storage that Oracle Database can use or allocate.
    An extent is a set of logically contiguous data blocks allocated for storing a specific type of information. In Figure 12-2, the 24 KB extent has 12 data blocks, while the 72 KB extent has 36 data blocks.
    >
    There isn't any 'wasted' space using 2KB Oracle blocks for 8KB OS blocks. As the doc says Oracle allocates 'extents' and an extent, depending on your space management, is going to be a substantial multiple of blocks. You might typically have extents that are multiples of 64 KB and that would be 8 OS blocks for your example. Yes - it is possible that the very first OS block and the very last block might not map exactly to the Oracle blocks  but for a table of any size that is unlikely to be much of an issue.
    The single-block reads used for some index accesses could affect performance since the read of a 2K Oracle block will result in an 8K OS block being read but that 8K block is also likely to be part of the same index.
    The thing is though that an index entry that is 'hot' is going to be hot whether the block it is in is 2K or 8K so any 'contention' for that entry will exist regardless of the block size.
    You will need to conduct tests using a 2K (or other) block and cache size for your index tablespaces and see which gives you the best results for your access patterns.
    You should use the standard block size for ALL tablespaces unless you can substantiate the need for a non-standard size. Indexes and LOB storage are indeed the primary use cases for uses non-standard block sizes for one or more tablespaces. Don't forget that you need to allocate the appropriate buffer cache.

  • Database block with multiples images

    Hi,
    I have a database block with 5 image items for each record (all database items too).
    Block property "number of record displayed"=6....so I have 30 image item into the canvas. But when runs forms..only show me 1 image for each record (last image item of block!!)
    Someone could help me?
    I user for development environment:
    -Forms Versión 10.1.2.0.2
    -Oracle Database 10g Express Edition Release 10.2.0.1.0
    -Windows XP

    Yes...I have 5 image (blob) fields in each database record.
    Fields are identicals...
    :ARTICULOS.IMAGE1
    :ARTICULOS.IMAGE2
    :ARTICULOS.IMAGE3
    :ARTICULOS.IMAGE4
    :ARTICULOS.IMAGE5 (only show me this for each record)
    I make this test to understand if I made something wrong: delete field :ARTICULOS.IMAGE5 and after that :ARTICULOS.IMAGE4 shows the image...

  • Dynamically creating a database block in forms 10g

    hi guys ,
    i got a new requirement ,that is dynamically create a database blocks and items...
    how it is possible..?
    thanks...

    Hello,
    It is not possible. You cannot create blocks or items at runtime. What you can do is to have them created but hidden, then you set them visible as soon as you need them.
    Francois

  • Ordering a non-database block....

    Hi ,
    Is it possible to order and how a non-database block according to user's willing...????
    Thanks , a lot
    Simon

    That will work in sql*plus but to use it in a program you'll need to parameterise the Order By clause. That's why I wrote mine the way I did. It will work in sql*plus if you enter 'A' and 'B' (including the quotes) and it will work in a program if you replace the placeholders with variables.
    SQL> WITH data AS(
      2    SELECT 1 a, 9 b FROM dual UNION ALL
      3    SELECT 1 a, 1 b FROM dual UNION ALL
      4    SELECT 1 a, 8 b FROM dual UNION ALL
      5    SELECT 1 a, 2 b FROM dual UNION ALL
      6    SELECT 1 a, 7 b FROM dual UNION ALL
      7    SELECT 2 a, 8 b FROM dual UNION ALL
      8    SELECT 3 a, 7 b FROM dual UNION ALL
      9    SELECT 4 a, 6 b FROM dual UNION ALL
    10    SELECT 5 a, 5 b FROM dual UNION ALL
    11    SELECT 6 a, 4 b FROM dual UNION ALL
    12    SELECT 7 a, 3 b FROM dual UNION ALL
    13    SELECT 8 a, 2 b FROM dual UNION ALL
    14    SELECT 9 a, 1 b FROM dual
    15  )
    16  SELECT a, b FROM data
    17  ORDER BY
    18    Decode(&ordr1,'A',a,'B',b),
    19    Decode(&ordr2,'A',a,'B',b)
    20  ;
    Enter value for ordr1: 'A'
    old  18:   Decode(&ordr1,'A',a,'B',b),
    new  18:   Decode('A','A',a,'B',b),
    Enter value for ordr2: 'B'
    old  19:   Decode(&ordr2,'A',a,'B',b)
    new  19:   Decode('B','A',a,'B',b)
             A          B
             1          1
             1          2
             1          7
             1          8
             1          9
             2          8
             3          7
             4          6
             5          5
             6          4
             7          3
             8          2
             9          1
    13 rows selected.
    SQL> /
    Enter value for ordr1: 'B'
    old  18:   Decode(&ordr1,'A',a,'B',b),
    new  18:   Decode('B','A',a,'B',b),
    Enter value for ordr2: 'A'
    old  19:   Decode(&ordr2,'A',a,'B',b)
    new  19:   Decode('A','A',a,'B',b)
             A          B
             1          1
             9          1
             1          2
             8          2
             7          3
             6          4
             5          5
             4          6
             1          7
             3          7
             1          8
             2          8
             1          9
    13 rows selected.
    SQL> var ordr1 varchar2(1);
    SQL> var ordr2 varchar2(1);
    SQL> exec :ordr1 := 'A';
    PL/SQL procedure successfully completed.
    SQL> exec :ordr2 := 'B';
    PL/SQL procedure successfully completed.
    SQL> WITH data AS(
      2    SELECT 1 a, 9 b FROM dual UNION ALL
      3    SELECT 1 a, 1 b FROM dual UNION ALL
      4    SELECT 1 a, 8 b FROM dual UNION ALL
      5    SELECT 1 a, 2 b FROM dual UNION ALL
      6    SELECT 1 a, 7 b FROM dual UNION ALL
      7    SELECT 2 a, 8 b FROM dual UNION ALL
      8    SELECT 3 a, 7 b FROM dual UNION ALL
      9    SELECT 4 a, 6 b FROM dual UNION ALL
    10    SELECT 5 a, 5 b FROM dual UNION ALL
    11    SELECT 6 a, 4 b FROM dual UNION ALL
    12    SELECT 7 a, 3 b FROM dual UNION ALL
    13    SELECT 8 a, 2 b FROM dual UNION ALL
    14    SELECT 9 a, 1 b FROM dual
    15  )
    16  SELECT a, b FROM data
    17  ORDER BY
    18    Decode(:ordr1,'A',a,'B',b),
    19    Decode(:ordr2,'A',a,'B',b)
    20  ;
             A          B
             1          1
             1          2
             1          7
             1          8
             1          9
             2          8
             3          7
             4          6
             5          5
             6          4
             7          3
             8          2
             9          1
    13 rows selected.
    SQL> exec :ordr1 := 'B';
    PL/SQL procedure successfully completed.
    SQL> exec :ordr2 := 'A';
    PL/SQL procedure successfully completed.
    SQL> /
             A          B
             1          1
             9          1
             1          2
             8          2
             7          3
             6          4
             5          5
             4          6
             1          7
             3          7
             1          8
             2          8
             1          9
    13 rows selected.
    SQL>

  • Measure the average read time of a single database block for hardware.

    Hi,
    how to Measure the average read time of a single database block for hardware ?
    Many thanks.

    Hi,
    A STATSPACK report has data file level I/O tunings, but they include buffered reads, so they are biased.
    Try this in 9i:
    http://www.dba-oracle.com/oracle_tips_cost_adj.htm
    select
    a.average_wait c1,
    b.average_wait c2,
    a.total_waits /(a.total_waits + b.total_waits)*100 c3,
    b.total_waits /(a.total_waits + b.total_waits)*100 c4,
    (b.average_wait / a.average_wait)*100 c5
    from
    v$system_event a,
    v$system_event b
    where
    a.event = 'db file scattered read'
    and
    b.event = 'db file sequential read';
    Or this, in 10g:
    col c1 heading 'Average Waits for|Full Scan Read I/O' format 9999.999
    col c2 heading 'Average Waits for|Index Read I/O' format 9999.999
    col c3 heading 'Percent of| I/O Waits|for scattered|Full Scans' format 9.99
    col c4 heading 'Percent of| I/O Waits|for sequential|Index Scans' format 9.99
    col c5 heading 'Starting|Value|for|optimizer|index|cost|adj' format 999
    select
    sum(a.time_waited_micro)/sum(a.total_waits)/1000000 c1,
    sum(b.time_waited_micro)/sum(b.total_waits)/1000000 c2,
    sum(a.total_waits) /
    sum(a.total_waits + b.total_waits)
    ) * 100 c3,
    sum(b.total_waits) /
    sum(a.total_waits + b.total_waits)
    ) * 100 c4,
    sum(b.time_waited_micro) /
    sum(b.total_waits)) /
    (sum(a.time_waited_micro)/sum(a.total_waits)
    ) * 100 c5
    from
    dba_hist_system_event a,
    dba_hist_system_event b
    where
    a.snap_id = b.snap_id
    and
    a.event_name = 'db file scattered read'
    and
    b.event_name = 'db file sequential read';

Maybe you are looking for