Wednesday, 20 November 2024

Enable Archive log on Oracle Database.

 RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at 11/20/2024 13:23:08
RMAN-06149: cannot BACKUP DATABASE in NOARCHIVELOG mode

Check the archive log status. Currently Database is in No archive log mode.

SQL> archive log list
Database log mode              No Archive Mode
Automatic archival             Disabled
Archive destination            C:\oracle\app\product\12.2.0\dbhome_1\RDBMS
Oldest online log sequence     314 
Current log sequence           316

Step 1 : Shutdown the database (Immediate/normal)

SQL> shut immediate;

Database closed.
Database dismounted.
ORACLE instance shut down.

Step 2 : Start in mount state

SQL> startup mount;
Total System Global Area 1.0234E+10 bytes
Fixed Size                 12296368 bytes
Variable Size            2281705296 bytes
Database Buffers         7918845952 bytes
Redo Buffers               21254144 bytes
Database mounted.

Step 3 : set where your archive logs needs to be stored.

SQL> sho parameter log_archive_dest_1

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_1                   string

SQL> alter system set log_archive_dest_1="LOCATION=C:\oracle\app\fast_recovery_area\ORCL" scope=both;

System altered.

---- Crosscheck.

SQL> sho parameter log_archive_dest_1

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_1                   string      LOCATION=C:\oracle\app\fast_recovery_area\ORCL

SQL> archive log list
Database log mode              No Archive Mode
Automatic archival             Disabled
Archive destination            C:\oracle\app\fast_recovery_area\ORCL
Oldest online log sequence     316
Current log sequence           318

Step 4 : Alter Database Archivelog

SQL> alter database archivelog;

Database altered.

SQL> archive log list
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            C:\oracle\app\fast_recovery_area\ORCL
Oldest online log sequence     316
Next log sequence to archive   318
Current log sequence           318

Step 5 : Open the database

SQL> alter database open;

Database altered.

Rerun RMAN backup :

C:\Users\param>rman target /

Recovery Manager: Release 12.2.0.1.0 - Production on Wed Nov 20 14:38:39 2024

Copyright (c) 1982, 2017, Oracle and/or its affiliates.  All rights reserved.

connected to target database: ORCL (DBID=1654956044)

RMAN> backup database plus archivelog;


Starting backup at 20-NOV-24
current log archived
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=1590 device type=DISK
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=318 RECID=1 STAMP=1185547178
channel ORA_DISK_1: starting piece 1 at 20-NOV-24
channel ORA_DISK_1: finished piece 1 at 20-NOV-24
piece handle=C:\ORACLE\APP\PRODUCT\12.2.0\DBHOME_1\DATABASE\013AK0TB_1_1 tag=TAG20241120T143939 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 20-NOV-24

Starting backup at 20-NOV-24
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00003 name=C:\ORACLE\APP\ORADATA\ORCL\SYSAUX01.DBF
input datafile file number=00001 name=C:\ORACLE\APP\ORADATA\ORCL\SYSTEM01.DBF
input datafile file number=00005 name=C:\ORACLE\APP\ORADATA\ORCL\UNDOTBS01.DBF
input datafile file number=00007 name=C:\ORACLE\APP\ORADATA\ORCL\USERS01.DBF
channel ORA_DISK_1: starting piece 1 at 20-NOV-24
channel ORA_DISK_1: finished piece 1 at 20-NOV-24
piece handle=C:\ORACLE\APP\PRODUCT\12.2.0\DBHOME_1\DATABASE\023AK0TC_1_1 tag=TAG20241120T143940 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:07
Finished backup at 20-NOV-24

Starting backup at 20-NOV-24
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=319 RECID=2 STAMP=1185547187
channel ORA_DISK_1: starting piece 1 at 20-NOV-24
channel ORA_DISK_1: finished piece 1 at 20-NOV-24
piece handle=C:\ORACLE\APP\PRODUCT\12.2.0\DBHOME_1\DATABASE\033AK0TK_1_1 tag=TAG20241120T143948 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 20-NOV-24

Starting Control File and SPFILE Autobackup at 20-NOV-24
piece handle=C:\ORACLE\APP\PRODUCT\12.2.0\DBHOME_1\DATABASE\C-1654956044-20241120-00 comment=NONE
Finished Control File and SPFILE Autobackup at 20-NOV-24

No comments:

Post a Comment