Group Discounts available for 3+ students and Corporate Clients

Log Files in Oracle DBA

Redo log files (minimum 4m in ORACLE 10g

Reasons for maintaining redolog files;

1      Fast commit mechanism

2      Roll farward mechaninm & rollbackward mechanism [through smon]

3      Recovery operations [through archive files] 

 

To enable orachive 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

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

Demo: Redolog file management

SYS>     select member from vi$logfile;

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

SYS>     desc v$log

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

SYS>     save vdlog

SYS>     alter system switchlogfile;

[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

 

Screenshot_87

 

 

 

 

 

 

 

“At TekSlate, we are trying to create high quality tutorials and articles, if you think any information is incorrect or want to add anything to the article, please feel free to get in touch with us at info@tekslate.com, we will update the article in 24 hours.”

0 Responses on Log Files in Oracle DBA"

    Leave a Message

    Your email address will not be published. Required fields are marked *

    Support


    Please Enter Your Details and Query.
    Three + 6