Archive mode configuration for Oracle 10 backup and recovery

Source: Internet
Author: User

Before the article, the archive mode is enabled and the archive log format is set to the front for easy reading and clarification. Each part will be described in detail later. SQL> archive log list // view the current archive Mode
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 3
Current log sequence 5
Enable SQL> shutdown immediate in archive Mode
Database closed.
Database dismounted.
Oracle instance shut down.
SQL> startup mount;
ORACLE instance started. Total System Global Area 612368384 bytes
Fixed Size 2022832 bytes
Variable Size 222298704 bytes
Database Buffers 385875968 bytes
Redo Buffers 2170880 bytes
Database mounted.
SQL> alter database archivelog; // enable archive mode Database altered. SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 3
Next log sequence to archive 5
Current log sequence 5 modify the location where archive logs are stored SQL> alter system set db_recovery_file_dest = ''; System altered. SQL> alter system set log_archive_dest = '/home/oracle/backup'; System altered. SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination/home/oracle/backup
Oldest online log sequence 3
Next log sequence to archive 5
Current log sequence 5
Note:

By default, archive logs are stored in the directory corresponding to the quick recovery zone (corresponding to the initialization parameter db_recovery_file_dest) and archive log file names are generated according to the specific format, if db_recovery_file_dest = ''is not modified, but the path of log_archive_dest is specified directly, an error is returned. As follows:

SQL> alter system set log_archive_dest = '/home/oracle/backup ';
Alter system set log_archive_dest = '/home/oracle/backup'
*
ERROR at line 1:
ORA-02097: parameter cannot be modified because specified the value is invalid
ORA-16018: cannot use LOG_ARCHIVE_DEST with LOG_ARCHIVE_DEST_n or
DB_RECOVERY_FILE_DEST

SQL> alter system set log_archive_format = 'arc % S _ % R. % T. arc 'scope = spfile; System altered. SQL> alter system switch logfile; // The log format modification still does not take effect. Try to restart the database to make it take effect and generate. system altered. SQL> alter database open; Database altered. SQL> alter system switch logfile; // manually switch to generate an archive log and view the generated file System altered in the backup directory. cd/home/oracle/backup
$ Ls
Listen 5_736446919.dbf listen 6_736446919.dbf listen 7_736446919.dbf ARC0000000008_0736446919.0001.arc
  • 1
  • 2
  • Next Page
[Content navigation]
Page 1: Up Page 1: Bottom

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.