Forum Stats

  • 3,874,734 Users
  • 2,266,768 Discussions
  • 7,911,961 Comments

Discussions

Correction of the Optimal Flexible Architecture (OFA) standard

top.gun
top.gun Member Posts: 3,666 Gold Crown
edited Jan 11, 2016 5:59PM in Database Ideas - Ideas

The Optimal Flexible Architecture (OFA) standard has been around for some time now, and it makes sense to name files to correctly distinguish between them.

The assigned names are intended to meet the following requirements:

- Database files are easily distinguishable from all other files.

- Files of one database type are easily distinguishable from other database types.

- Files are clearly associated with important attributes specific to the file type. For example, a datafile name may include the tablespace  name to allow for easy association of datafile to tablespace, or an archived log name may include the thread, sequence, and creation date.

There is a problem - there are several types of file that are not easily distinguishable between each other, and therefore don't meet the OFA requirements.

Examine the one of the naming standards as follows:

File TypeFile Naming Convention
Control files/h/q/d/control.ctl
Redo log files/h/q/d/redon.log
Data files

/h/q/d/tn.dbf

Notice the naming standard for redo files.

Redo files are not really logs, like an alert log, or listener log.

Redo files shouldn't be opened with a text editor, and shouldn't be deleted, renamed, nor managed like an alert log, or listener log.

So why should a redo file be given the .log extension as for an alert log, or listener log?

The redo files are full of redo records.

So why not continue giving the alert log, and listener log the .log extension - then give files containing redo records the extension .rec? eg redo01.rec

File TypeFile Naming Convention
Control files/h/q/d/control.ctl
Redo log files/h/q/d/redon.rec
Data files

/h/q/d/tn.dbf

This new naming standard will now easily distinguish between redo files, and the true log files (ie alert log, or listener log) - and for the first time, meet the OFA requirement.

borneselManish Chaturvedictriebtop.gunhimmyLothar FlatzZlatko SiroticBPeaslandDBAcaadecarvalhoJagadekaraKayKDeepak Darak -OraclePravin TakpiresysassysdbaGeert GruwezRindbækMKJ10930279BeGinN.B.Sven W.Gbenga Ajakaye
23 votes

Active · Last Updated

Comments

  • top.gun
    top.gun Member Posts: 3,666 Gold Crown

    Just in case anyone doesn't know what a redo record is:

    "

    Redo log files are filled with redo records. A redo record, also called a redo entry, is made up of a group of change vectors, each of which is a description of a change made to a single block in the database. For example, if you change a salary value in an employee table, you generate a redo record containing change vectors that describe changes to the data segment block for the table, the undo segment data block, and the transaction table of the undo segments.

    "

    You can see there is no correlation between a redo file (online or archived), and the alert and listener logs which are just text files.

  • sysassysdba
    sysassysdba Member Posts: 459 Silver Badge

    and i will add....naming redo and archives files *.log can be very dangerous....if your system administrator it is very clean, you can see maintenance scripts like:

    find / -name "*.log" -size +100M -exec rm -rf {} \;  

    top.gun
  • top.gun
    top.gun Member Posts: 3,666 Gold Crown

    and i will add....naming redo and archives files *.log can be very dangerous....if your system administrator it is very clean, you can see maintenance scripts like:

    find / -name "*.log" -size +100M -exec rm -rf {} \;  

    Exactly - it's dangerous when performing automated maintenance.....

    Junior DBAs may also mistaken online redolog or archived redolog files for old logs that are out of place and need to be deleted.

  • MKJ10930279
    MKJ10930279 Member Posts: 244

    wow.. that's a good suggestion.

    top.gun