February 2012
M T W T F S S
« Apr    
 12345
6789101112
13141516171819
20212223242526
272829  

Common Causes and Solutions for ORA-1157

SQL> startup
ORACLE instance started.
Total System Global Area  202868968 bytes
Fixed Size                   731368 bytes
Variable Size             167772160 bytes
Database Buffers           33554432 bytes
Redo Buffers                 811008 bytes
Database mounted.
ORA-01157: cannot identify/lock data file 7 - see DBWR trace file
ORA-01110: data file 7: ‘/opt/oracle/product/9.2/dbs/datafile.dbf’
1. The datafile does exist, but Oracle cannot find it.
2. The [...]

table data block corruption simulation

1. corrupt the data file corresponding to the table For this purpose, a dd command is generate from the Oracle views.

set heading off
set lines 113
SELECT ‘dd of=’ || f.file_name || ‘ bs=8192 conv=notrunc seek=’ ||
to_number(S.HEADER_BLOCK + 1) || ‘ << EOF’,
[...]