粗心导致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

AI Hentai Generator
Generate AI Hentai for free.

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



To query the Oracle tablespace size, follow the following steps: Determine the tablespace name by running the query: SELECT tablespace_name FROM dba_tablespaces; Query the tablespace size by running the query: SELECT sum(bytes) AS total_size, sum(bytes_free) AS available_space, sum(bytes) - sum(bytes_free) AS used_space FROM dba_data_files WHERE tablespace_

There are three ways to view instance names in Oracle: use the "sqlplus" and "select instance_name from v$instance;" commands on the command line. Use the "show instance_name;" command in SQL*Plus. Check environment variables (ORACLE_SID on Linux) through the operating system's Task Manager, Oracle Enterprise Manager, or through the operating system.

Oracle View Encryption allows you to encrypt data in the view, thereby enhancing the security of sensitive information. The steps include: 1) creating the master encryption key (MEk); 2) creating an encrypted view, specifying the view and MEk to be encrypted; 3) authorizing users to access the encrypted view. How encrypted views work: When a user querys for an encrypted view, Oracle uses MEk to decrypt data, ensuring that only authorized users can access readable data.

There are the following methods to get time in Oracle: CURRENT_TIMESTAMP: Returns the current system time, accurate to seconds. SYSTIMESTAMP: More accurate than CURRENT_TIMESTAMP, to nanoseconds. SYSDATE: Returns the current system date, excluding the time part. TO_CHAR(SYSDATE, 'YYY-MM-DD HH24:MI:SS'): Converts the current system date and time to a specific format. EXTRACT: Extracts a specific part from a time value, such as a year, month, or hour.

Uninstall method for Oracle installation failure: Close Oracle service, delete Oracle program files and registry keys, uninstall Oracle environment variables, and restart the computer. If the uninstall fails, you can uninstall manually using the Oracle Universal Uninstall Tool.

Data import method: 1. Use the SQLLoader utility: prepare data files, create control files, and run SQLLoader; 2. Use the IMP/EXP tool: export data, import data. Tip: 1. Recommended SQL*Loader for big data sets; 2. The target table should exist and the column definition matches; 3. After importing, data integrity needs to be verified.

To create a user in Oracle, follow these steps: Create a new user using the CREATE USER statement. Grant the necessary permissions using the GRANT statement. Optional: Use the RESOURCE statement to set the quota. Configure other options such as default roles and temporary tablespaces.

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.
