Monday, June 22, 2009

ORA-01578 ORACLE data block corrupted

In case this happens, Metalink provides a super-duper statement, that will show you the name and type of the corrupt segment:

SELECT segment_name , segment_type , owner , tablespace_name
FROM sys.dba_extents
WHERE file_id = &bad_file_id
AND &bad_block_id BETWEEN block_id and block_id + blocks -1

To fix it, I used toad to recreate the tables/indexes that were corrupt.

Labels: ,

Wednesday, June 3, 2009

Some import/export notes

  • Always use direct=y when using exp/imp (much faster since it basically copies blocks from the db to the dumpfile)
  • Disable archive log mode before an import of a large database and do a backup afterwards. It's not really state of the art to delete archive logs when you get an ORA-19809: limit exceeded for recovery files (altough you could just back them up <.<)
  • When moving data from a <=9i to 10g+ database, only do a schema import. Those old standard users could cause the import to just abort.
Just a few things I remember from some frustrating few hours of exp/importing a 40 gig database -.-

Btw: Just in case you don't know how to disable archive log mode:
shutdown immediate;
startup mount;
alter database noarchivelog;
alter database open;
archive log list;

Labels: , , , , , ,