Posts Tagged ‘ARCHIVELOG mode’

Enable Pluggable Database(PDB) Archivelog Mode

August 26th, 2019, posted in Oracle Queries
Share

Enabling archive log mode -12c pluggable database/Container database

Since the Redologs are created at container database level in 12c and not at pluggable database level.
(Enabling archivelog at pluggable database level is not possible). Archiving is done at CDB’s.

You can check archive log mode either by querying v$database or archive-log list :

 

SQL> select name,open_mode,log_mode from v$database;

NAME      OPEN_MODE            LOG_MODE
--------- -------------------- ------------
CDB      READ WRITE           NOARCHIVELOG

(OR)

SQL> archive log list
Database log mode        Archive Mode
Automatic archival        Disabled
Archive destination        USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     11
Next log sequence to archive   13
Current log sequence        13

***************  ***************
To enable the Archive-log mode
***************  ***************immam_dba,dba immam,imam dba,dba imam,oracle clone issue,oracle database,oracle application,oracle clone issue,ora oracle

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

SQL> startup mount;
ORACLE instance started.

Total System Global Area  788529152 bytes
Fixed Size      2929352 bytes
Variable Size    541068600 bytes
Database Buffers   239075328 bytes
Redo Buffers      5455872 bytes
Database mounted.

SQL> ALTER DATABASE ARCHIVELOG;
Database altered.

SQL> ALTER DATABASE OPEN;
Database altered.

SQL> select name,open_mode,log_mode from v$database;

NAME      OPEN_MODE            LOG_MODE
--------- -------------------- ------------
CDB      READ WRITE           ARCHIVELOG



SQL> archive log list
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     413
Next log sequence to archive   415
Current log sequence           415

SQL> show parameter DB_RECOVERY_FILE_DEST

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest                string      /u03/app/oracle/fast_recovery_area
db_recovery_file_dest_size           big integer 27G

 

Share

ORA-00265: Instance recovery required cannot set ARCHIVELOG mode

June 3rd, 2016, posted in Oracle Queries
Share

Today, I came across the “ORA-00265: instance recovery required, cannot set ARCHIVELOG mode” while
converting database into archive log mode.Problem sys@standby> startup mount; ORACLE instance started. Total System Global Area 835104768 bytes Fixed Size 2217952 bytes Variable Size 490735648 bytes Database Buffers 335544320 bytes Redo Buffers 6606848 bytes Database mounted. sys@standby> alter database recover managed standby database using current logfile disconnect; alter database recover managed standby database using current logfile disconnect * ERROR at line 1: ORA-01153: an incompatible media recovery is active Cause This indicates a currently running media recovery process. Action sys@standby> alter database recover managed standby database cancel; sys@standby> alter database recover managed standby database using current logfile disconnect; Note When shutting down physical standby database, firstly turn off media recovery process. Otherwise the next time when starting up redo apply again, you will encounter error ORA-01153.

This error usually caused when database crashed unfortunately or we shutdown database with the help of database shutdown command as: shutdown abort, startup force mount or shutdown abort. These types of command will required instance recovery in next startup. In short it need clean database startup.

 

SQL> alter database archivelog;
alter database archivelog
*
ERROR at line 1:
ORA-00265: instance recovery required, cannot set ARCHIVELOG mode

Reason :

ORA-00265: instance recovery required, cannot set ARCHIVELOG mode
 *Cause:  The database either crashed or was shutdown with the ABORT
          option. Media recovery cannot be enabled because the online
          logs may not be sufficient to recover the current datafiles.
 *Action: Open the database and then enter the SHUTDOWN command with the
          NORMAL or IMMEDIATE option.


ORA-00265: Instance recovery required cannot set ARCHIVELOG mode,ORA-00265,Instance recovery required, cannot set ARCHIVELOG mode,ARCHIVELOG mode,ARCHIVELOG Error,Oracle DBA,Oracle Database,Oracle Archive issue,Oracle Ora,

Solution:

SQL> select status from v$instance;
STATUS
————————————
MOUNTED

SQL> alter database open;
Database altered.

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 293601280 bytes
Fixed Size 1248600 bytes
Variable Size 88081064 bytes
Database Buffers 197132288 bytes
Redo Buffers 7139328 bytes
Database mounted.
SQL> alter database archivelog;
Database altered.
SQL> alter database open;
Database altered.
Share