Oracle is successfully installed on Redhat 5 in the morning. The archive mode is not enabled during database creation.
SQL> SelectName, open_mode, log_modeFromV $Database; Name open_mode log_mode-----------------------------------------SzpdcoraReadWrite noarchivelog
SQL>ArchiveLogListDatabase LogMode no archive modeautomatic archival disabledarchive destination use_db_recovery_file_destoldest onlineLogSequence6Current LogSequence8
It is not enabled.
To change the archive mode, follow these steps:
SQL> ShutdownImmediatesql>Startup nomountsql> Alter DatabaseMount; SQL> Alter DatabaseArchivelog; SQL> Alter Database Open;DatabaseAltered.
Let's look at the archive mode.
SQL > ArchiveLog List; Database Log Mode archive modeautomatic archivalEnabledArchive destination use_db_recovery_file_destoldest online Log Sequence 6 Next Log Sequence To Archive 8 Current Log Sequence 8 SQL > Select Name, open_mode, log_mode From V $ Database ;
You can see that the default archive log storage path is in the flash back area ($ oracle_base/flash_recovery_area ). Oracle has a limit on this path, that is, it only has 2 GB space by default. It is not only the default path for archiving logs, but also the default address for backup files and flash back logs, in this way, the space used by the archive log lock cannot reach 2 GB. If the path size is not set, many systems have encountered problems where the archiving logs are full and cannot be archived.
If there is not enough space, either change the size of the flash back area or switch the archive log to another directory.
SQL>Show parameter db_recoveryname type value-----------------------------------------------------------------------------Db_recovery_file_dest string/U01/App/Oracle/Flash_recovery _ areadb_recovery_file_dest_size bigInteger3852 m
You can see the location of the default flash back area. Now change to/u01/APP/Oracle/archivelogs
SQL > Alter SystemSet Log_archive_dest_1 = ' Location =/u01/APP/archivelogs ' Scope = Both; System altered. SQL > Archive Log List; Database Log Mode archive modeautomatic archival enabledarchive destination / U01/ App / Archivelogsoldest online Log Sequence 6 Next Log Sequence To Archive 8 Current Log Sequence 8
OK. manually switch the log to check the effect.
SQL> AlterSystem switch logfile; System altered.[Oracle @ localhost archivelogs]$ Ls1_8 _795179693. DBF
Generate ipv8_795179693.dbf. The default suffix is DBF.
View the archive log naming format:
SQL>Show parameter log_archive_formatname type value-----------------------------------------------------------------------------Log_archive_format string%T _%S _%R. DBF
By the way, let's take a look at the Parameter Details:
% S log sequence number
% S log sequence number, zero filled
% T thread number
% T thread number, zero filledThread number, which can be understood as a node number. If it is not a RAC environment, % T is 1
% R scenario no.