recovery -basic question

hi all,
Greetings from Richards
am trying to roll forward using ai files by making manual crash in test box but am unable to do.i would likt to describe the steps - followed,please say me where am making the mistake

first, i enable the aimage file
then i started the database
then i took a online backup of my database
after that i made sum transaction in my database and i used rfutil dbname -C aimage extract -a ai exent -o output file to extarct ai blocks from ai extent and i stored it in a new location.
then manually i made a crash say i deleted .bi file from my database and try to shutdown bt it didnt allow me to do, so i deleted .lk file and i used prostrct repair dbname dbname.st to update DB control information and i used ps -ef |grep dbname to verify whether my database is in offline or online.9its in offline).
then i used prostrct unlock utility to fix the inconsistency and i used the online backup to restore it.now its get overwrite.
then i used rfutil dbname -C roll forward -a ainame
here i used ainame as the extaced ai block of ai extent from other location.

and i checked my database but the updation wat i made is not there....i don knw whether am doing it in a right procedure or where am making mistake?

P.S:::(after rollfrowarding am getting error as "
Expected ai file number 2 but file specified is 1 in sequence. (8019)"

so i used rfutil dbname -C aimage new to switch and i used rfutil roll forward utility,roll forward is successfull but am not getting the updation wat i made")
 

TomBascom

Curmudgeon
There are an infinite number of ways that a database can crash. How it happens is irrelevant to after-imaging because you are only going to ever see notes from before the crash. All that stuff that you did deleting lock files and using prostrct unlock etc is just noise.

Using -extract is not part of any normal recovery process. That step is specious. You should be using rfutil dbname -C aimage new to mark the current extent "full". You then copy that extent to an archive area, changing the name in the process (I use the sequence number in the naming scheme, it makes life simpler). You can use rfutil dbname -C aimage extent full to get a list of full extents. Finally, after the extent is archived, you mark it "empty" with rfutil dbname -C aimage extent empty

In your test you need to perform the rfutil dbname -C aimage new and copy to archive processes after making a change so that that change will be seen when you apply the archived ai logs.

A key step in recovery using after-imaging is to restore a backup. You chose to restore your backup on top of your test database. I generally do not do that. There is always a chance that the crashed database will be useful in some way. If, for instance, your backup turns out to be no good (maybe you have a bad tape) then the damaged database is your db of last resort. If you restore on top of it (or prodel it) then it is gone and you are in a worse position than you started. If at all possible restore to a different location -- that means that you need disk space for two copies of your db.

After restoring you need to roll forward. But instead of using the file that you created via "extract" you use the archived extent (see above).
 
hi tom,
Thanks for ur kind reply
but in case if my .bi file got deleted or somthing happened means how can i recover it?
i used prostrct unlock to fix the inconsistency and then i restored from back up of my database.

other than this ,is their any other way to recover .bi file(s)?
 

Casper

ProgressTalk.com Moderator
Staff member
No, restore form backup /should/ be the only option you have.

Casper.
 

TomBascom

Curmudgeon
hi tom,
Thanks for ur kind reply

but in case if my .bi file got deleted or somthing happened means how can i recover it?

i used prostrct unlock to fix the inconsistency and then i restored from back up of my database.

other than this ,is their any other way to recover .bi file(s)?

Once again you are changing the subject. You really ought to open a new thread when you ask a new question.

But luckily the correct answer brings us back to the original topic.

Restore and roll-forward is the fastest, most complete and most reliable recovery from almost all crashes and corruptions.

Make your life easy:

0) Manage the archiving of your ai files as previously described using "new" and "empty" and archive them using the sequence number to name them.

1) Use probkup to backup to disk.

2) Restore that backup to a "recovery" directory tree. (Among other things this verifies that your backup is valid.) Possibly on another server. (It is always a good idea to have another server in another location -- that way if you lose the main building to fire, flood, earthquake or theft you're right back in business...)

3) Backup the ondisk probkup files to tape or transfer them to an offsite location. (See above comment on the usefulness of remote locations...)

4) If you are ambitious continuously roll-forward your archived ai files during the day. This is sometimes referred to as a "warm spare".

If a crash or some other bad thing occurs simply roll-forward any outstanding archived ai files and redirect your users to the recovery database. (This requires that your scripts and such not use hard-coded path names for the db -- which is a good idea anyway.)

There is no need to be using prostrct unlock nor to be futzing around with missing .bi files. Which is a pointless exercise anyway since you end up with missing and corrupt data when you do that... and then you restored over the top of it and blew it all away anyhow. You could have saved a few steps and just deleted the whole mess prior to restoring. But see my first post about the dangers of deleting (or otherwise changing) your database of last resort.
 
Top