粗心导致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
本文出自 “赖笔头” 博客,请务必保留此出处

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

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

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics











Solutions to Oracle cannot be opened include: 1. Start the database service; 2. Start the listener; 3. Check port conflicts; 4. Set environment variables correctly; 5. Make sure the firewall or antivirus software does not block the connection; 6. Check whether the server is closed; 7. Use RMAN to recover corrupt files; 8. Check whether the TNS service name is correct; 9. Check network connection; 10. Reinstall Oracle software.

The method to solve the Oracle cursor closure problem includes: explicitly closing the cursor using the CLOSE statement. Declare the cursor in the FOR UPDATE clause so that it automatically closes after the scope is ended. Declare the cursor in the USING clause so that it automatically closes when the associated PL/SQL variable is closed. Use exception handling to ensure that the cursor is closed in any exception situation. Use the connection pool to automatically close the cursor. Disable automatic submission and delay cursor closing.

In Oracle, the FOR LOOP loop can create cursors dynamically. The steps are: 1. Define the cursor type; 2. Create the loop; 3. Create the cursor dynamically; 4. Execute the cursor; 5. Close the cursor. Example: A cursor can be created cycle-by-circuit to display the names and salaries of the top 10 employees.

Oracle views can be exported through the EXP utility: Log in to the Oracle database. Start the EXP utility, specifying the view name and export directory. Enter export parameters, including target mode, file format, and tablespace. Start exporting. Verify the export using the impdp utility.

When Oracle log files are full, the following solutions can be adopted: 1) Clean old log files; 2) Increase the log file size; 3) Increase the log file group; 4) Set up automatic log management; 5) Reinitialize the database. Before implementing any solution, it is recommended to back up the database to prevent data loss.

Oracle is not only a database company, but also a leader in cloud computing and ERP systems. 1. Oracle provides comprehensive solutions from database to cloud services and ERP systems. 2. OracleCloud challenges AWS and Azure, providing IaaS, PaaS and SaaS services. 3. Oracle's ERP systems such as E-BusinessSuite and FusionApplications help enterprises optimize operations.

Building a Hadoop Distributed File System (HDFS) on a CentOS system requires multiple steps. This article provides a brief configuration guide. 1. Prepare to install JDK in the early stage: Install JavaDevelopmentKit (JDK) on all nodes, and the version must be compatible with Hadoop. The installation package can be downloaded from the Oracle official website. Environment variable configuration: Edit /etc/profile file, set Java and Hadoop environment variables, so that the system can find the installation path of JDK and Hadoop. 2. Security configuration: SSH password-free login to generate SSH key: Use the ssh-keygen command on each node

To stop an Oracle database, perform the following steps: 1. Connect to the database; 2. Shutdown immediately; 3. Shutdown abort completely.
