Reasons for maintaining redo log files;
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
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;
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
You liked the article?
Like: 0
Vote for difficulty
Current difficulty (Avg): Medium
TekSlate is the best online training provider in delivering world-class IT skills to individuals and corporates from all parts of the globe. We are proven experts in accumulating every need of an IT skills upgrade aspirant and have delivered excellent services. We aim to bring you all the essentials to learn and master new technologies in the market with our articles, blogs, and videos. Build your career success with us, enhancing most in-demand skills in the market.