Redo log files (minimum 4m in ORACLE 10g)

Reasons for maintaining redo log files;

  • Fast commit mechanism
  • Roll forward mechanism & roll backward mechanism [through smon]
  • Recovery operations [through archive files]   

To enable or achieve a mod

In init. Ora file

Up to ORACLE 9i               log_archive_start = time

Log_archive_dest= /disk3/oradata/pol/arch

Log_archive_format= %s.arc

In ORACLE 10 g log-archive-dest= % t_%s_%r.arc

%t           thread no. [instance]

%s          sequence no.

%r           resetlog id

Inclined to build a profession as Oracle DBA Training? Then here is the blog post on, explore Oracle DBA Training

Note:   

The database should be in the mount stage to enable archive log files.

Demo: Redolog file management

SYS>     select member from vi$logfile;

SYS>     select member, group# from v$logfile;

SYS>     desc v$log

SYS>     select group#, members, status from v$log;

SYS>     save vdlog

SYS>     alter system switch logfile;

[for manual swithch]

SYS>     alter database add logfile group3;

‘disk3/oradata/pal/redo3.dbf’size 4m;

SYS>     @vdlog

Group1

Group2

Group 3           unused

SYS>     alter system switch logfile;

SYS>     alter system switch logfile;

SYS>     @vdlog

To drop the redo log file, it’s status should be ‘INACTIVE’

SYS>     alter database drop logfile group3;  

Enabling the database into archive log mode

Dba 12 ~] $ sq!plus ‘/as sysdba’

SYS> startup

SYS> archive log list

Archive log      disable

SYS>     shut immediate

SYS>!

Dba12 ~]$ cd $ORACLE_HOME/ dbs

Dba12 dbs] $ vi initrajpar.ora

Log_archive_dest=disk3/oradatga/pal/arch

:wq

Dba12 dbs ] $ cd /disk3/oradata/pal/

Dba12 pal]$ mkdir arch

Dba12 pal] $ ls

Dba12 pal]$ exit

SYS > startup mount

SYS> alter database archivelog;

SYS> alter database open;

SYS> archive log list

Archivelog       enable

SYS> !ps  - x

SYS>     grant connect, resource to user 2

Identified by user2;

SYS> conn user 2 / user 2

User2> ! demobld user 2 / user2

User 2> select * from tab;

User 2> insert inot emp select * from emp;

User 2 >           /

User 2 >           /           [up to some thousands of records]

User2>!

Dba12 ~] $ cd / disk 3 /oradata /pal /arch

Dba12 arch ] $ ls

  tsr              

For an in-depth knowledge, click on below