DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: block corruption in data dictionary tables

  1. #1
    Join Date
    Sep 2001
    Posts
    261
    Guys, how can i resolve block corruption in data dictionary tables? if its from a user table i can use the Analyze Table command but i cant use the command for Views.

    i got this error:

    SQL> SELECT * FROM DBA_SOURCE;
    ERROR:
    ORA-01578: ORACLE data block corrupted (file # 1, block # 4478)
    ORA-01110: data file 1: 'D:\ORACLE\ORADATA\EIC\SYSTEM01.DBF'

    thank you very much for your help.
    The Maverick
    Oracle Certified DBA - 8i

  2. #2
    Join Date
    Nov 2001
    Location
    Bangalore
    Posts
    41
    Hi,

    Data dictionary tables will be residing in system tablespace.
    if any datafile is corrupted then copy the datafile to different location, rename the file then recover the database.

    san

  3. #3
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    First try to determine whether the specified block belongs to a table or to an index. You can use DBA_EXTENTS to find out that:

    select owner, segment_name, segment_type from dba_extents
    where file_id = 1
    and 4478 between block_id and block_id + blocks;

    If the offended block belongs to the index segment you can simply recreate it. If it belongs to a table then I belive you'll have to recreate the database.
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

  4. #4
    Join Date
    Sep 2001
    Posts
    261
    Originally posted by jmodic
    ...I belive you'll have to recreate the database.
    I think so =) thanks for the help.
    BTW, how can i prevent it from happening again? any suggestions on how i can detect block corruptions other than checking the alert log and running ANALYZE TABLE / INDEX command?

    Thanks again.
    The Maverick
    Oracle Certified DBA - 8i

  5. #5
    Join Date
    Oct 2001
    Location
    Madrid, Spain
    Posts
    763
    Hi,

    For detect the corruption you have the dbv utility.

    Then if you have the name of the corrupted file, you can know wich segment is corrupted:

    1. select file_name, file_id
    from dba_data_files
    where file_name like '%your_file%';

    2. select owner,segment_name,segment_type
    from dba_extents
    where file_id= file_id_of_the_first_select
    and number_of_block_obytained_with_dbv between block_id and block_id+blocks-1;

    This will show you the all as you need.

    Other thing you must know is that all database blocks are formatted before Oracle use, then if the block is not assigned, no problem it will be corrected, and if it is assigned, you can drop the segment and recreate (not in your case because the corruption is in the system tablespace).

    Your solution is recreate the database.

    Good Luck

    Regards

    Angel

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width