Before
image file
Before image file is a file which store the
transaction information (like user, transaction number and previous value)
happens in the DB in a Binary form, once the transaction is completed it will
stores the binary info on how to modify the records and indices. if the
transaction is aborted then DB will reads the data from the bi file and stores
in it.
BI files are essential to access any DB. At
least one BI and one data file is required.
BI in .st file,
BI
entry in a .st is file must, a simple entry can be made as below
b .
b
here is stands for the before image file and “.” stands for the current
directory where DB is going to create.
It will be good practice to
have as much bi file is needed, when the long running transaction happening it
will keep on writing the transaction details to the bi files which leads to
growth in bi file, when bi growth is occur which may affects the performance or
once it reaches the maximum size then which may down the DB as well!. so it is
must to keep an eye on the BI file size.
It
is always a good practice to run one Before-image page Writer (BIW) for
Database to reduce the Bottleneck happen from BI.
Syntax: probiw <db-name>
Ultimately you can have only one biw per DB
which consumes one “–n”
How to
check the size of the BI?
You can
find the current size of bi
for each _dbstatus
no-lock.
disp
(_dbstatus-bisize * _DbStatus-BiBlkSize / 1048576 ) format
">>>,>>>,>>>,>>9"
label "BI Size#"
(
_DBStatus-BISize * _DBStatus-DBBlkSize / 1048576 ) format
">>>,>>>,>>>,>>9" label
"Used BI Size#" with frame bi.
But remember this query will give you the
actual size of bi once it crosses bi cluster
Monitoring
BI Activity
Use operating system
utilities to monitor the amount of I/O activity on the disk where the BI file
or files reside. Use the PROMON utility to monitor specific BI activity. Use
the R&D option BI Log Activity -
promon > R&D > 2. Activity Displays
> 5. BI Log
- Busy buffer waits
- Empty buffer waits
- High number of writes per second
- High number of partial writes
How to
Truncate the Grown Bi Size
Shutdown
th DB using proshut or promon
Hit
the below command
proutil <db-name> -C truncate bi
No comments:
Post a Comment