Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: NotesFromClass-BackUP & Recovery
"Bruce Walker" <rbwalker1_at_mindspring.com> wrote in message
news:3ABE93DB.5843E09D_at_mindspring.com...
> NotesFromClass-BackUP & Recovery
>
> To All - I am taking a class for OCP Oracle 8i.
> These notes are a reflection of my classroom teaching and are published
here
> to receive feed back from 'professionals' who do the job I am training for
now.
> any and all input is appreciated for clarity.
>
> this week 03/25/2001 * BACKUP & RECOVERY **
>
> commit is the most prevalent event to write from redo log buffer to redo
log
> files
> thru the log writer LGWR.
>
Depends. LGWR also kicks in whenever DBWR writes, when 1Mb of unflushed redo is encountered, and at every 1/3rd Log Buffer full. You can't really state with declarative precision which of those would be the most frequent prompt for a flush. A small log buffer might hit the 1/3rd full rule much more often than a commit, for example.
> fast start begins to empty the datablocks (dirty)from the db buffer to
dbase
> datafiles.
>
> lgwr is most active process. Writes all the time.
> original and mirror makes one group. there are at least two groups.
>
> for each block from redo log buffer that is written,
> each file in the group gets a duplicate of the other.
>
> DBWR, LGWR, ARCH defines OFA Optimal Flexible Architecture
> simply saying the 3 processes don't block/lock up each other.
>
> this means put them on different disks.
> when you put them on the same drive, they conflict.
>
>
> log switch causes a checkpoint.checkpoint induced by log switch
> EXCESSIVE I/O
>
> FAST_START_IO_TARGET = 20
>
You will be dribbling DBWR continuously with this setting. The general advice, as far as I can work it out, is that you set this new 8i parameter at your peril. I believe I've seen something on Steve Adam's website strongly advising against implementing this parameter at all, unless you really need to promise Instance Recovery in a fixed (or nearly fixed) period of time (which is what it was intended for).
> block size is 8k, redo log size is 320k,
> which means you have 40 blocks.
>
You seem to be under the impression that Oracle blocks have something to do with Redo Logs. Absolutely not. Redo Logs contains 'redo log blocks', which would better be termed 'o/s blocks'. Oracle blocks refer to data files only.
The block size should be 8k if you're on Unix, 16k on NT, and the redo log buffer should be around a couple of megs tops.
> every 20 blocks it will write to redo log files, CHECKPOINT.
>
Minor checkpoint, yes. Far too frequent.
> redo log buffer works cyclically.
> when checkpoint kicks in, goes point a to point end.
> it is sequential. this, I was told, is important.
> the fact it is sequential.
>
> SMON is in charge of instance recovery------------------
> instance recovery SMON
>
> roll forward -
> committed - in redo log file
> not sychronized -
> will OPEN database
> ---------------------
> roll back
> not committed -
> sychronized
> you will not be looking for something you didn't commit.
> I need a little elaboration on this part.
>
>
> once you enable archive log mode, there must be space in archive
> log folder. Automatic archiving is important, you must turn it on.
> with NO archive log mode, there is NO recovery.
There is no recovery *to the point of failure*. There is still recovery: you restore the entire database from the timeof the last backup, and you have therefore recovered your database (sort of). Also -remember, if no online redo logs have been over-written since the last backup, you can still perform recovery to the point of failure, even without archives.
>
> configure archiving
> manage space in archive folder - with no space for archives
> oracle will HANG. waiting for you.
> Is this true, will stop the system dead in its tracks?
>
Absolutely.
> BUSINESS Online backup offline backup
> 24 x 7 warm cold
> 8am - 5pm oracle is oracle is
> up & running down & cold
>
> oracle should be in archive log mode.
>
No it shouldn't. You, as the DBA, will make an intelligent decision about whether to put the database into archive log mode, depending on the prevailing business requirements, and the availability of suitable resources (like huge quantities of disk space). There is nothing automatic about being in archive log mode: it requires due deliberation, and resourcing accordingly, with a full understanding of the implications.
> recover automatic database;
>
> every file has a header record. those files without an up to date
> header record, oracle will figure it out.
> those files that are out of synch will be recovered.
> -----------------------------
> restore only required data files
> if oracle did not shutdown, recover in opened mode.
> ----------------------------
> in a crash
> - how many files are involved ??
> - what files do I need for recovery ??
>
> must restore datafile
> -----------------------------
> Investigate
> startup PFILE='d:\path\init.ora' MOUNT
> V$RECOVER_FILE
> V$RECOVERY_LOG
> v$datafile
>
> if file status is ONLINE, then take it OFFLINE
> alter database datafile 2 OFFLINE
>
> never restore on a file that is NOT OFFLINE
>
> =============================
> recovery process
> 1 restore datafiles
> 2 recover automatic database;
> 3 bring back file ONLINE
> =================================================
> system tablespace is important for DATA DICTIONARY.
> so you cannot recover online. you must take this offline.
> this coincides with a shutdown.
>
> a file number is consistent with the file for the life of that file.
> It won't change.
> -------------------------------------------------------------
>
> DON'T put your REDO logs on a RAID array.
> as the redo logs are sequential.
> could someone elaborate on this....
>
> =====================================================
> Can you recover if you cannot restore ?
You mean 'I've never taken a backup of the files related to this tablespace, yet the thing has blown up... can I restore?' Absolutely. Provided that all redo (online and archived) since the time of those files' creation is available, then yes, you can. The key syntax is 'alter database create datafile 'X' as 'Y', followed by a 'recover datafile blah'.
Regards
HJR
Received on Mon Mar 26 2001 - 03:15:41 CST
![]() |
![]() |