Get the App
SLTechnology News&Howtos  ›  Database  › 

Oracle 11g changed from non-archiving mode to archiving mode

Shulou Source: shulou.com Published: 2022-06-01 10:30:06 11月13日 Update

U indicates that when Oracle 11g is enabled, the default archive directory is specified as db_recovery_file_dest when archive log mode is enabled. This parameter can be specified in pfile/spfile:

Db_recovery_file_dest='/u01/app/oracle/flash_recovery_area'

Archive mode needs to be changed in mount state

U modify step U start to mount state

SQL > startup mount

ü View archiving 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 5

Current log sequence 7

Modify the archive path without using the default path

Change the log_archive_dest_1 parameter to change the archive log directory (the directory specified by parameter db_recovery_file_dest in pfile/spfile will be invalid)

SQL > show parameter log_archive_dest_1

NAME TYPE

VALUE

-

Log_archive_dest_1 string

Modify the path:

SQL > alter system set log_archive_dest_1='location=/u01/oracle/archivelog' scope=spfile

U reboot to mount state

SQL > shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL > startup mount

U modified to archiving mode

SQL > alter database archivelog

Database altered.

ü check whether the filing is valid

SQL > archive log list

Database log mode Archive Mode

Automatic archival Enabled

Archive destination / u01/oracle/archivelog

Oldest online log sequence 5

Next log sequence to archive 7

Current log sequence 7

SQL > alter database open

SQL > alter system switch logfile

System altered.

Generate an archive file:

[oracle@oracle archivelog] $ls

1_7_888826695.dbf

Tags: Mode parameter status directory path file log step check generate Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft Huawei Docker Shulou Information MariaDB