Skip to main content

How to Enable ARCHIVELOG mode

How to Enable ARCHIVELOG mode


Benefits of ARCHIVELOG mode.



1. We can able to take database backup ONLINE.
2. No Need to Down Oracle DB Server
3. We can better Manage our Backup Policy through RMAN
4. Limited DBA task
5. We can able to RECOVER our database point-in-time



How can enable ARCHIVELOG MODE in 9iR1.


When we create new database then database is created NOARCHIVELOG mode by default.

shutdown database


SQL>shutdown immediate;


Edit below parameters in pfile(init.ora) file.


1. LOG_ARCHIVE_START=TRUE


Create New SPFILE from Modified pfile(init.ora)


SQL> create SPFILE from PFILE;


Startup Database in Mount Mode


SQL> startup mount;


Change Database log mode from NOARCHIVELOG to ARCHIVELOG


SQL> alter database archivelog;


Open DB for normal use


SQL> alter database open;


check archive log status


Database log mode Archive Mode
Automatic archival Enabled
Archive destination C:\Oracle\product\RDBMS
Oldest online log sequence 0
Next log sequence to archive 1
Current log sequence 1



Default Archivelog destination is :$ORACLE_HOME/rdbms.




How can enable ARCHIVELOG MODE in 10gr1



In 10g Archivelog mode enabling is easy becuase we need to just turn DB log mode and archive log is automatic start.


shutdown database


SQL> shutdown immediate;


startup database in mount mode


SQL> startup mount;


Change DB log mode


SQL> alter database archivelog;


Open DB for normal use


SQL> alter database open;


check archivelog status


SQL> archive log list


Default Archive log destination.


1. 10g introduce new feature called FRA (flashback recovery area) so all archivelog files created in FRA.

2. If your not using FRA then all files created in $ORACLE_HOME/database


We can check database archivelog mode through below query


SQL> select log_mode from v$database;
or
SQL> archive log list

Comments

Popular posts from this blog

CLSRSC-430: Failed to start rolling patch mode

############################################################ GRID PSU Failed on Node2: =========================== [root@server1 tmp]# /oracrs/oracle/product/12102/OPatch/opatchauto apply /path1/patches/23273629 -oh /oracrs/oracle/product/12102 -ocmrf /tmp/ocm.rsp OPatch Automation Tool Copyright (c)2014, Oracle Corporation. All rights reserved. OPatchauto Version : 12.1.0.1.10 OUI Version        : 12.1.0.2.0 Running from       : /oracrs/oracle/product/12102 opatchauto log file: /oracrs/oracle/product/12102/cfgtoollogs/opatchauto/23273629/opatch_gi_2016-11-25_06-13-44_deploy.log Parameter Validation: Successful Configuration Validation: Successful Patch Location: /path1/patches/23273629 Grid Infrastructure Patch(es): 21436941 23054246 23054327 23054341 DB Patch(es): 23054246 23054327 The following patch(es) are duplicate patches with patches installed in the Oracle Home.  [ 20299023] You hav...

SQL Plan Management [ SPM ]

============================================= SQL> SHOW parameter baselines NAME                                 TYPE        VALUE ------------------------------------ ----------- ------- optimizer_capture_sql_plan_baselines boolean     FALSE optimizer_use_sql_plan_baselines     boolean     TRUE SQL> ============================================= Connect as SPM user and create a table as follows. -------------------------------------------------- SQL> CREATE TABLE EMPLOYEE (code number,dept char(100),address char(1000)); Table created. SQL> ============================================= Populate some rows in the table =================================== declare c1 number; begin for c1 IN 1..10000 ...