Home Database Mysql Tutorial Oracle知识:ORA-16014错误和flash空间满

Oracle知识:ORA-16014错误和flash空间满

Jun 07, 2016 pm 04:59 PM

SQLgt; alter database open;alter database open*第 1 行出现错误:ORA-16014: 日志 2 的序列号 27 未归档, 没有可用的目的地OR

ORA-16014错误和flash空间满

昨天创建一个表 create table user as select name from  t_userinfo
t_userinfo 这个表很大. 过了一段时间一直在读写硬盘.持续了有3个小时.
PL/SQL DEVELOPER 也无法中断.
通过查v$sqlarea 的sql_fulltext 找到了 sql_Id=gutz8yut71m22
然后在v$session找到了 session_id=646 serial#=57
然后alter system kill session '646,57' 无法删除.
查v$session_wait 的event 发现是log siwtch
shutdown immediate 也无法关闭.只好在windows下关闭了Oracle服务.
再次启动时候,很怕数据库做回滚操作,因为我已经把归档日志删除了1.1G,也害怕无法恢复.

1.问题以及解决过程

SQL> select status from v$instance;

STATUS
------------
MOUNTED

SQL> alter database open;
alter database open
*
第 1 行出现错误:
ORA-16014: 日志 2 的序列号 27 未归档, 没有可用的目的地
ORA-00312: 联机日志 2 线程 1:
'D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO02.LOG'


SQL> show parameter db_recovery_file

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest                string      D:\oracle\product\10.2.0/flash
                                                 _recovery_area
db_recovery_file_dest_size           big integer 2G

SQL> alter system archive log current;
alter system archive log current
*
第 1 行出现错误:
ORA-01109: 数据库未打开


SQL> alter system switch logfile;
alter system switch logfile
*
第 1 行出现错误:
ORA-01109: 数据库未打开

SQL> show parameter db_recovery

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest                string      C:\oracle\product\10.2.0/flash
                                                 _recovery_area
db_recovery_file_dest_size           big integer 2G

SQL> alter system set db_recovery_file_dest_size=3G scope=both;

系统已更改。

SQL> alter database open;

数据库已更改。

(1).检查flash recovery area的使用情况:

SQL> select * from v$flash_recovery_area_usage;

FILE_TYPE    PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES
------------ ------------------ ------------------------- ---------------
CONTROLFILE                   0                         0               0
ONLINELOG                     0                         0               0
ARCHIVELOG                 7.23                         0               48
BACKUPPIECE                   0                         0               0
IMAGECOPY                     0                         0               0
FLASHBACKLOG                  0                         0               0

已选择6行。

SQL>

(2).计算flash recovery area已经占用的空间:

SQL> select sum(percent_space_used)*3/100 from v$flash_recovery_area_usage;

SUM(PERCENT_SPACE_USED)*3/100
-----------------------------
                       2.1369

也可以用下面的语句检查
SELECT substr(name, 1, 30) name, space_limit AS quota,space_used AS used,space_reclaimable

AS reclaimable, number_of_files  AS files 
FROM  v$recovery_file_dest ;

create table as 语句产生了很多归档导致 online redo log无法归档,在这里,我们通过设置

db_recovery_file_dest_size参数,增大了flash recovery area来解决这个问题。

(3).也可以通过删除flash recovery area中不必要的备份来释放flash recovery area空间来解决这个问

题:

c:\RMAN
rman> connect target sys/pwd@test
(1). delete obsolete;
(2). crosscheck backupset;   delete expired backupset;
(3). crosscheck archivelog all; delete expired archivelog all;
Oracle指出,我们可以通过执行以下命令:
RMAN> backup recovery area;
将闪回区的内容备份到第三方介质,,也同样可以解决这个问题。
是以为记。

linux

Statement of this Website
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

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

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Reduce the use of MySQL memory in Docker Reduce the use of MySQL memory in Docker Mar 04, 2025 pm 03:52 PM

This article explores optimizing MySQL memory usage in Docker. It discusses monitoring techniques (Docker stats, Performance Schema, external tools) and configuration strategies. These include Docker memory limits, swapping, and cgroups, alongside

How to solve the problem of mysql cannot open shared library How to solve the problem of mysql cannot open shared library Mar 04, 2025 pm 04:01 PM

This article addresses MySQL's "unable to open shared library" error. The issue stems from MySQL's inability to locate necessary shared libraries (.so/.dll files). Solutions involve verifying library installation via the system's package m

How do you alter a table in MySQL using the ALTER TABLE statement? How do you alter a table in MySQL using the ALTER TABLE statement? Mar 19, 2025 pm 03:51 PM

The article discusses using MySQL's ALTER TABLE statement to modify tables, including adding/dropping columns, renaming tables/columns, and changing column data types.

Run MySQl in Linux (with/without podman container with phpmyadmin) Run MySQl in Linux (with/without podman container with phpmyadmin) Mar 04, 2025 pm 03:54 PM

This article compares installing MySQL on Linux directly versus using Podman containers, with/without phpMyAdmin. It details installation steps for each method, emphasizing Podman's advantages in isolation, portability, and reproducibility, but also

What is SQLite? Comprehensive overview What is SQLite? Comprehensive overview Mar 04, 2025 pm 03:55 PM

This article provides a comprehensive overview of SQLite, a self-contained, serverless relational database. It details SQLite's advantages (simplicity, portability, ease of use) and disadvantages (concurrency limitations, scalability challenges). C

Running multiple MySQL versions on MacOS: A step-by-step guide Running multiple MySQL versions on MacOS: A step-by-step guide Mar 04, 2025 pm 03:49 PM

This guide demonstrates installing and managing multiple MySQL versions on macOS using Homebrew. It emphasizes using Homebrew to isolate installations, preventing conflicts. The article details installation, starting/stopping services, and best pra

How do I configure SSL/TLS encryption for MySQL connections? How do I configure SSL/TLS encryption for MySQL connections? Mar 18, 2025 pm 12:01 PM

Article discusses configuring SSL/TLS encryption for MySQL, including certificate generation and verification. Main issue is using self-signed certificates' security implications.[Character count: 159]

What are some popular MySQL GUI tools (e.g., MySQL Workbench, phpMyAdmin)? What are some popular MySQL GUI tools (e.g., MySQL Workbench, phpMyAdmin)? Mar 21, 2025 pm 06:28 PM

Article discusses popular MySQL GUI tools like MySQL Workbench and phpMyAdmin, comparing their features and suitability for beginners and advanced users.[159 characters]

See all articles