ORA-19905: log_archive_format must contain % s, % T and % R

Source: Internet
Author: User

The path to archive logs is specified by the initialization parameters log_archive_dest_n and db_recovery_file_dest:

1. log_archive_dest_n, where n has a maximum of 31, meaning 31 archiving paths are available. The Archive logs saved on each path are the same. However, oracle archiving can be divided into local archiving and remote archiving by saving logs on the local file system and sending them to another remote database. Only 1 ~ can be used for local archiving ~ 10.

The test environment is Windows 7. Set the archive log path to D: \ RMAN \ archivelog.

SQL> alter system set log_archive_dest_1 = 'd: \ RMAN \ archivelog \'

System altered.

2. If none of the first 10 log_archive_dest_n are set, Oracle uses the fast recovery zone pointed to by the db_recovery_file_dest parameter.

3. The file name format of the archived log is determined by the static initialization parameter log_archive_format, but the archived log format stored in the quick recovery area has its own set of specifications. The default value of log_archive_format is % T _ % S _ % R. DBF, macros % T, % s, and % R represent the thread Number of the log (which instance generates the log), and serial number (the number of logs written by lgwr), reset the log number (sometimes online logs have to re-write from serial number 1), now set an error parameter to assume that: "ORA-19905: log_archive_format must contain % s, % T and % R "error. The instance cannot be started.

% R intentionally missed during setup:

SQL> alter system set log_archive_format = 'arc _ Br _ % T _ % S. log' scope = spfile;

System altered.

Restart the database:

SQL> startup force;

ORA-19905: log_archive_format must contain % s, % T and % R.

SQL> select status from V $ instance;

Select status from V $ instance

*

Error at line 1:

A ORA-01034: Oracle not available

Process ID: 0

Session ID: 63 serial number: 5

SQL> Conn/As sysdba

Already connected to the idle routine.

SQL> Create spfile from pfile = 'C: \ app \ ekunijiang \ admin \ ekuni \ pfile \ init. ora.5162012224111 ';

The file has been created.

SQL> startup

The Oracle routine has been started.

The above solution appears.

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.