Oracle : Simulate and Repair Block Corruption

Steps to simulate and repair block corruption

1.  Linking BBED

cd $ORACLE_HOME/rdbms/lib
make -f ins_rdbms.mk BBED=$ORACLE_HOME/bin/bbed $ORACLE_HOME/bin/bbed

2.  Prepare Parfile for BBED

SQL> select file#||’ ‘||name||’ ‘||bytes from v$datafile;

Put Output into a file fileunix.log

cat fileunix.log
1 /home/oracle/data2/system.dbf 1048576000
2 /home/oracle/data3/undo.dbf 1048576000
3 /home/oracle/data2/sysaux.dbf 838860800
4 /home/oracle/data3/users.dbf 262144000
6 /home/oracle/data3/index.dbf 104857600

Create Parfile bbed.par

cat bbed.par
blocksize=8192
listfile=fileunix.log
mode=edit

3.  Create Test Table BBED

sqlplus system/….
SQL> create table bbed tablespace users as select * from dba_tables;
SQL> select count(*) from bbed;

COUNT(*)
———-
876

SQL> col segment_name for a10
SQL> select segment_name,file_id,block_id
from dba_extents
where segment_name=’BBED’;

SEGMENT_NA    FILE_ID   BLOCK_ID
———- ———- ———-
BBED                4         33
BBED                4         25
BBED                4         17
BBED                4          9

Now, we know that we can corrupt Block 17 in File 4 for the Test.

4. Start BBED and corrupt Block 17 in File 4

bbed parfile=bbed.par
Password: blockedit

BBED: Release 2.0.0.0.0 - Limited Production on Wed Feb 25 09:15:39 2009
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
************* !!! For Oracle Internal Use only !!! ***************

BBED> set file 4
FILE#           4

BBED> show
FILE#           4
BLOCK#          1
OFFSET          0
DBA             0×01000001 (16777217 4,1)
FILENAME        /home/oracle/data3/users.dbf
BIFILE          bifile.bbd
LISTFILE        fileunix.log
BLOCKSIZE       8192
MODE            Edit
EDIT            Unrecoverable
IBASE           Dec
OBASE           Dec
WIDTH           80
COUNT           512
LOGFILE         log.bbd
SPOOL           No


Read the rest of this entry »

Optimize Oracle UNDO Parameters

Overview

Starting in Oracle9i, rollback segments are re-named undo logs. Traditionally transaction undo information was stored in Rollback Segments until a commit or rollback statement was issued, at which point it was made available for overlaying.

Best of all, automatic undo management allows the DBA to specify how long undo information should be retained after commit, preventing “snapshot too old” errors on long running queries.

This is done by setting the UNDO_RETENTION parameter.  The default is 900 seconds (5 minutes), and you can set this parameter to guarantee that Oracle keeps undo logs for extended periods of time.

Read the rest of this entry »

Download Tutorial Matlab berbahasa Indonesia

Anda yang sedang belajar Matlab atau sedang ada tugas kuliah yang dikerjakan dengan matlab ? Jangan bingung atau khawatir, silakan download tutorial Matlab berbahasa Indonesia berikut

http://www.ziddu.com/download/8391345/Tutorial_MatLab_TeguhW.pdf.html

Gratis…tis..tis… Silakan disebarkan ke teman-teman.

Solman Key for sale

Hi guys,

If you want to install SAP ECC 5 or mySAP ERP 2004 and SAP ECC 6 or mySAP ERP 2005 or SAP ERP 6 even just fresh install or IDES version, you’ll need SAP Solution Manager Key or simply called solman key.

You can buy it from this blog.

You just pay me $5 to me through my paypal account (devratt@yahoo.com).

After that, you’ll confirm and get access password, simply contact me at : devratt@yahoo.com atau devratt