search
HomeDatabaseMysql Tutorial 粗心导致ORA-16020错误(fewer destinations available than specified

一次在切换归档日志时sqlaltersystemswitchlogfile;时停了好久都没反应;查看确实在归档模式下:SQLarchiveloglist;DatabaselogmodeArchiveModeAutomaticarch..

一次在切换归档日志时


sql>alter system switch logfile; 时停了好久都没反应;


查看确实在归档模式下:

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



查看有几组日志:

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


网上资料说“如果数据库处于归档模式下,当执行alter system switch logfile操作后,Oracle接
下来需要进行日志切换。在进行日志切换之前,Oracle首先检查将要切换到的下一个日志文件是否已归档,而你的数据库是处于归档模式但不是自动归档,所以Oracle需要等待进行手工归档,再进行切换。而在你还没进行手工归档需要归档的日志之前,服务器空间,数据库实际上已经挂起并等待手工归档,所以出现了以上的问题。”先进性手动归档:

解决办法:
1、将末归档的日志手工归档:
  SQL>shutdown immediate
  SQL>startup mount
  SQL>alter system archive log all;
  打开数据库:
  SQL>alter database open;
2、将数据库置于自动归档状态:
  SQL>alter system set log_archive_start=true scope=spfile;
  SQL>shutdown immediate
  SQL>startup


安装步骤我的还是报错


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


网上这篇文章介绍了怎么解决ora-16020的错误”“

而我的还是行不通;


于是进一步检查归档文件的属性发现问题所在:

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 16:47 admin
drwxr-xr-x 2 root   root     4096 Jun 19 10:20 archiveback
drwxr-xr-x 2 oracle oinstall 4096 Jun 18 20:16 backup


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


SQL> alter system archive log all;   //在此执行手动归档成功;

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.

问题解决,原来是自己修改了归档的存放地点,网站空间,香港虚拟主机,而忘记了修改权限导致!


[oracle@oracle11g archiveback]$ ll
total 76160
-rw-r----- 1 oracle oinstall 43909120 Jun 19 20:29 1_3_818441304.dbf
-rw-r----- 1 oracle oinstall   512512 Jun 19 20:29 1_4_818441304.dbf
-rw-r----- 1 oracle oinstall 33562624 Jun 19 20:43 1_5_818441304.dbf

本文出自 “赖笔头” 博客,请务必保留此出处

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
What Are the Limitations of Using Views in MySQL?What Are the Limitations of Using Views in MySQL?May 14, 2025 am 12:10 AM

MySQLviewshavelimitations:1)Theydon'tsupportallSQLoperations,restrictingdatamanipulationthroughviewswithjoinsorsubqueries.2)Theycanimpactperformance,especiallywithcomplexqueriesorlargedatasets.3)Viewsdon'tstoredata,potentiallyleadingtooutdatedinforma

Securing Your MySQL Database: Adding Users and Granting PrivilegesSecuring Your MySQL Database: Adding Users and Granting PrivilegesMay 14, 2025 am 12:09 AM

ProperusermanagementinMySQLiscrucialforenhancingsecurityandensuringefficientdatabaseoperation.1)UseCREATEUSERtoaddusers,specifyingconnectionsourcewith@'localhost'or@'%'.2)GrantspecificprivilegeswithGRANT,usingleastprivilegeprincipletominimizerisks.3)

What Factors Influence the Number of Triggers I Can Use in MySQL?What Factors Influence the Number of Triggers I Can Use in MySQL?May 14, 2025 am 12:08 AM

MySQLdoesn'timposeahardlimitontriggers,butpracticalfactorsdeterminetheireffectiveuse:1)Serverconfigurationimpactstriggermanagement;2)Complextriggersincreasesystemload;3)Largertablesslowtriggerperformance;4)Highconcurrencycancausetriggercontention;5)M

MySQL: Is it safe to store BLOB?MySQL: Is it safe to store BLOB?May 14, 2025 am 12:07 AM

Yes,it'ssafetostoreBLOBdatainMySQL,butconsiderthesefactors:1)StorageSpace:BLOBscanconsumesignificantspace,potentiallyincreasingcostsandslowingperformance.2)Performance:LargerrowsizesduetoBLOBsmayslowdownqueries.3)BackupandRecovery:Theseprocessescanbe

MySQL: Adding a user through a PHP web interfaceMySQL: Adding a user through a PHP web interfaceMay 14, 2025 am 12:04 AM

Adding MySQL users through the PHP web interface can use MySQLi extensions. The steps are as follows: 1. Connect to the MySQL database and use the MySQLi extension. 2. Create a user, use the CREATEUSER statement, and use the PASSWORD() function to encrypt the password. 3. Prevent SQL injection and use the mysqli_real_escape_string() function to process user input. 4. Assign permissions to new users and use the GRANT statement.

MySQL: BLOB and other no-sql storage, what are the differences?MySQL: BLOB and other no-sql storage, what are the differences?May 13, 2025 am 12:14 AM

MySQL'sBLOBissuitableforstoringbinarydatawithinarelationaldatabase,whileNoSQLoptionslikeMongoDB,Redis,andCassandraofferflexible,scalablesolutionsforunstructureddata.BLOBissimplerbutcanslowdownperformancewithlargedata;NoSQLprovidesbetterscalabilityand

MySQL Add User: Syntax, Options, and Security Best PracticesMySQL Add User: Syntax, Options, and Security Best PracticesMay 13, 2025 am 12:12 AM

ToaddauserinMySQL,use:CREATEUSER'username'@'host'IDENTIFIEDBY'password';Here'showtodoitsecurely:1)Choosethehostcarefullytocontrolaccess.2)SetresourcelimitswithoptionslikeMAX_QUERIES_PER_HOUR.3)Usestrong,uniquepasswords.4)EnforceSSL/TLSconnectionswith

MySQL: How to avoid String Data Types common mistakes?MySQL: How to avoid String Data Types common mistakes?May 13, 2025 am 12:09 AM

ToavoidcommonmistakeswithstringdatatypesinMySQL,understandstringtypenuances,choosetherighttype,andmanageencodingandcollationsettingseffectively.1)UseCHARforfixed-lengthstrings,VARCHARforvariable-length,andTEXT/BLOBforlargerdata.2)Setcorrectcharacters

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor