1. There are two ways to run Oracle databases:
(1) archivelog: Archive aims to restore the database to the maximum extent when a database fails. It ensures that no submitted data is lost:
(2) Non-archive mode (noarchivelog): Only the database can be recovered to the nearest recycling point (cold backup or logical backup), which is very likely to cause data loss.
You can use the archive log LIST command to obtain the archive status of your briefs, for example:
Svrmgr> archive log list
Database Log mode archive Mode
Automatic Archival Enabled
Archive destination/u02/Arch
Oldest online log sequence 14
Next log sequence to archive 16
Current Log sequence 16
Whether the archive mode is used depends on the high availability of the database and the amount of data that users can afford to lose.
For production databases, archive is strongly required to ensure that no data is lost. databases under development and debugging can be archived.
1.1. Change the archive mode to archive
To switch the archiving and non-archiving statuses of a database, you must restart the database and modify it under Mount:
(1) shutting down the database and backing up existing data. Changing the running mode of the database is an important change to the database. Therefore, you need to back up the database and archive possible problems:
(2)
Log_archive_start = true # Start automatic archiving
Log_archive_format = arc % T % S. Arc # archive file format
Log_archive_dest =/u02/arch # archive path
In 8i, a maximum of five archiving paths can be created and archived to other servers, such as the standby database server, 9i supports nine archiving paths and physical/logical backup servers.
(3) Start the instance to the Mount state, that is, load the database but do not open the database:
$> Svrmgrl
Svrmagrl> connect internal
Svrmagrl> startup Mount
(4) issue the modification command, start the database, and complete the modification process.
Svrmagrl> alter database archivelog;
Svrmagrl> alter database open;
1.2. Change the archive status to not Archive
This parameter is the same as the preceding region, but is not the same as some operations. It is mainly used to delete or comment out the parameter in Step 4 above. In the (4) region, command:
Svrmgrl> alter database noarchivelog;
Note: A full cold backup of the database must be performed after the archive mode is switched to the non-archive mode to prevent unexpected times.