In this post we are going to discuss about how to convert no ARCHIVELOG
mode database to archive lo mode and vice versa.
![]() |
archivelog-noarchivelog |
Archive log mode verification using ARCHIVELOG list method, below
we can database is in archive log mode with current and oldest log sequence.
SQL> archive log list
Database log
mode
Archive Mode
Automatic
archival
Enabled
Archive destination
/u01/arch/techon_db
Oldest online log sequence 8485
Next log sequence to archive 8490
Current log
sequence 8490
Below are steps to convert
database to NOARCHIVELOG mode
--clean shutdown the database
SQL> shut immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>
--startup database in mount mode
SQL> startup mount;
ORACLE instance started.
Total System Global Area 1811910416 bytes
Fixed
Size
732944 bytes
Variable
Size
1056964608 bytes
Database Buffers
738197504 bytes
Redo
Buffers
16015360 bytes
Database mounted.
SQL>
--alter database to NOARCHIVELOG
SQL> alter database noarchivelog;
Database altered.
--open the database
SQL> alter database open;
Database altered.
SQL> archive log list
Database log
mode
No Archive Mode
Automatic
archival
Enabled
Archive
destination /u01/arch/techon_db
Oldest online log sequence 8485
Current log
sequence 8490
Now
we will convert database to NOARCHIVELOG mode. Follow the same method as above.
Use alter database ARCHIVELOG instead of alter database NOARCHIVELOG
We need to set below parameters before converting it to ARCHIVELOG.
Make it through either pfile or spfile (using alter system command)
log_archive_dest='/u01/arch/techon_db'
log_archive_format='%t_%s_%r.arc'
log_archive_start=true
log_archive_format='%t_%s_%r.arc'
log_archive_start=true
SQL> shut immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 1811910416 bytes
Fixed
Size
732944 bytes
Variable
Size
1056964608 bytes
Database
Buffers 738197504 bytes
Redo
Buffers
16015360 bytes
Database mounted.
SQL> alter database archivelog;
Database altered.
SQL> alter database open;
Database altered.
SQL> archive log list;
Database log
mode
Archive Mode
Automatic
archival
Enabled
Archive destination /u01/arch/techon_db
Oldest online log sequence 8485
Next log sequence to archive 8490
Current log
sequence 8490
Verify if ARCHIVELOG is working fine by issue switch log.
SQL> alter system switch logfile;
System altered.
SQL> /
System altered.
SQL> /
System altered.
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /u01/arch/techon_db
Oldest online log sequence 8488
Next log sequence to archive 8493
Current log sequence 8493
0 comments:
Post a Comment