Enable 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
enable the archivelogmode using shell scripts...
ReplyDelete