Carelessness leads to ORA-16020 errors (fewer destinations available than specified

Source: Internet
Author: User

One time when switching to archiving logs


SQL> alter system switch logfile; it does not respond after it is stopped for a long time;


Check whether it is in archive mode:

SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination/db/oracle/archiveback
Oldest online log sequence 3
Next log sequence to archive 3
Current log sequence 5



View several groups of logs:

SQL> select group #, THREAD #, MEMBERS, STATUS from v $ log;

GROUP # THREAD # MEMBERS STATUS
----------------------------------------------
1 1 1 INACTIVE
3 1 1 INACTIVE
2 1 1 CURRENT


If the database is in archive mode, after the alter system switch logfile operation is executed
Log switch is required. Before switching logs, Oracle first checks whether the next log file to be switched is archived, while your database is in archive mode but not automatically archived. Therefore, Oracle needs to wait for manual archiving, then switch. Before you manually archive the logs that need to be archived, the database has actually been suspended and is waiting for manual archiving, so the above problems have occurred ." Advanced manual archiving:

Solution:
1. Manually archive the last archived log:
SQL> shutdown immediate
SQL> startup mount
SQL> alter system archive log all;
Open the database:
SQL> alter database open;
2. Place the database in the automatic archiving status:
SQL> alter system set log_archive_start = true scope = spfile;
SQL> shutdown immediate
SQL> startup


My installation steps still report errors


SQL> alter system archive log all;
Alter system archive log all
*
ERROR at line 1:
ORA-16020: fewer destinations available than specified
LOG_ARCHIVE_MIN_SUCCEED_DEST


This article on the Internet describes how to solve the ora-16020 error "http://hi.baidu.com/aixspace/item/4ccb9a0e8e71b088a3df4332"

But I still cannot;


So I further checked the attribute of the archive file to find the problem:

SQL> show parameter archive

NAME TYPE VALUE
-----------------------------------------------------------------------------
Archive_lag_target integer 0
Log_archive_config string
Log_archive_dest string
Log_archive_dest_1 string location =/db/oracle/archiveback


[Oracle @ oracle11g oracle] $ ll
Total 40
Drwxr-x --- 5 oracle oinstall 4096 Jun 18 admin
Drwxr-xr-x 2 root 4096 Jun 19 10:20 archiveback
Drwxr-xr-x 2 oracle oinstall 4096 Jun 18 backup


[Root @ oracle11g oracle] # chown-R oracle: oinstall archiveback/


SQL> alter system archive log all; // manual archiving is successful here;

System altered.


SQL> select open_mode, log_mode from v $ database;

OPEN_MODE LOG_MODE
--------------------------------
MOUNTED ARCHIVELOG

SQL> alter database open;

Database altered.


SQL> alter system switch logfile;

System altered.

The problem was solved by modifying the storage location of the archive, and forgetting to modify the permission!


[Oracle @ oracle11g archiveback] $ ll
Total 76160
-Rw-r ----- 1 oracle oinstall 43909120 Jun 19 1_3_818441304.dbf
-Rw-r ----- 1 oracle oinstall 512512 Jun 19 20:29 4154_818441304.dbf
-Rw-r ----- 1 oracle oinstall 33562624 Jun 19 20:43 listen 5_818441304.dbf

This article from the "Lai pen head" blog, please be sure to keep this source http://summervast.blog.51cto.com/690507/1225329

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.