To back up an Oracle database with consistent data, ensure that the ARCHIVELOG mode is enabled to archive the Redo logs.
Follow these steps to verify if the ARCHIVELOG mode is enabled:
ARCHIVE LOG LIST;
Archive log settings for the current instance is displayed.
Database log mode: Archive Mode
Automatic archival: Enabled
Note: If the ARCHIVELOG mode is not enabled, you must start the ARCHIVELOG mode to backup the database.
Follow these steps to start the ARCHIVELOG mode:
CONNECT SYS/SYS_PASSWORD AS SYSDBA
STARTUP MOUNT;
ALTER DATABASE ARCHIVELOG;
ALTER DATABASE OPEN;
By default, archive logs is written to the flash recovery area. If you do not want to write archive logs to the flash recovery area, you can set the LOG_ARCHIVE_DEST_n parameter to the location where you want to write archive logs.
SQL>ALTRE SYSTEM SET LOG_ARCHIVE_DEST_1='LOCATION=e:\app\administrator\oradata\<oracle_database_name>\arch' SCOPE= BOTH;
System altered.
SQL> ARCHIVE LOG LIST;
Archive log settings for the current instance is displayed.
Database log mode: Archive Mode
Automatic archival: Enabled
Archive destination: E:\app\oracle\oradata\<oracle_database_name>\arch
Oldest online log sequence: 21
Current log sequence: 23
Oracle VSS Writer Service is started and functioning properly.
Copyright © 2016 |
|