Tuesday, 30 May 2017

Enabling archivelog mode of Oracle database

 step to archivelog mode database to noarchivelog mode database

Archive log Mode:- In this mode redo log files archived and stored in the file  
                                system. Recovery of database is possible when database is
                                running on archive log mode.

We can check database is running on archive log mode or noarchive log mode by below 2 ways

1)  By querying v$database dictionary

SQL> select log_mode from v$database;

LOG_MODE
------------
NOARCHIVELOG

2) By "archive log list" command 

SQL> archive log list
Database log mode             Archive Mode
Automatic archival             Enabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     9
Current log sequence           11

Steps for noacrhive log mode from archive log mode:-

1) Shutdown the database :-

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.

2) Start Database in mount stage:-

SQL> startup mount
ORACLE instance started.

Total System Global Area 4225675264 bytes
Fixed Size                  2182464 bytes
Variable Size            2483028672 bytes
Database Buffers         1728053248 bytes
Redo Buffers               12410880 bytes
Database mounted.

3) Alter database to noarchivelog mode:-

SQL> alter database noarchivelog;
alter database noarchivelog
*
ERROR at line 1:
ORA-38774: cannot disable media recovery - flashback database is enabled

SQL> alter database flashback off;

Database altered.

SQL> alter database noarchivelog;

Database altered.

4) Alter the database for open:-

SQL> alter database open;
Database altered.

5) Verify the log mode :-

SQL> archive log list
Database log mode              No Archive Mode
Automatic archival             Disabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     9
Current log sequence           11
SQL> select log_mode from v$database;

LOG_MODE
------------
NOARCHIVELOG

1 comment:

  1. Thanks for the given information you are providing content very usefull to users.
    Learn How to Work With Ref Cursor in ORACLE 12C For Beginner Actual cost of this course is 9,999/- But now Kuncham Software Solutions Pvt ltd is giving you Free access. Limited period offer Hurry-up Enroll Now at Udemy.


    Hurry-Up Enroll Now and get Free Access to the Entire Course


    ReplyDelete

Cloning database with RMAN

Below are the steps to clone production database(primedb) to UAT database(clonedb)   STEP1 :- Check the both servers are able to connect ...