View database status, database as archive mode
[Email protected] hey~j->archive log list;
Database Log Mode Archive mode
Automatic Archival Enabled
Archive Destination Use_db_recovery_file_dest
Oldest online log sequence 1
Next log sequence to archive 1
Current log sequence 1
Note the archive path is the path specified by the parameter use_db_recovery_file_dest, i.e. the fast recovery area path
Modify database to non-archive mode (open, close archive mode is required in Mount mode)
[Email protected] Hey~j->shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
[email protected] hey~j->startup mount;
ORACLE instance started.
Total System Global area 830930944 bytes
Fixed Size 2257800 bytes
Variable Size 541068408 bytes
Database buffers 281018368 bytes
Redo buffers 6586368 bytes
Database mounted.
[Email protected] Hey~j->alter database noarchivelog;
Database altered.
[Email protected] hey~j->archive log list;
Database log mode No Archive mode
Automatic Archival Disabled
Archive Destination Use_db_recovery_file_dest
Oldest online log sequence 1
Current log sequence 1
[Email protected] hey~j->select status from V$instance;
STATUS
------------
Mounted
[Email protected] Hey~j->alter database archivelog;
Database altered.
[Email protected] hey~j->archive log list;
Database Log Mode Archive mode
Automatic Archival Enabled
Archive Destination Use_db_recovery_file_dest
Oldest online log sequence 1
Next log sequence to archive 1
Current log sequence 1
[Email protected] hey~j->alter database open;
Database altered.
After the database starts archiving, it is particularly important to note that there is still space left in the directory where the archive is placed, and if there is not enough space, it can cause the database hang, because when the redo log is switched on, the logs are archived, the logs are recycled, and if you loop to an archive redo file, Then the database will appear hang, waiting for the log archive. Therefore, the remaining space and the outdated archive log are required to be maintained.
Set Database archiving mode