search
HomeDatabaseMysql TutorialOracle 10g 裸设备数据文件恢复,ORA-19501、ORA-27063

Oracle10g 裸设备数据文件恢复,ORA-19501、ORA-27063

环境说明:
OS:aix 6.1
DB:Oracle 10gR2  裸设备

使用rman备份整个数据库备份失败,,提示71数据文件失败,单独备份这个数据文件
$ rman target /

Recovery Manager: Release 10.2.0.1.0 - Production on Thu Nov 7 09:14:31 2013

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

connected to target database: ORCL (DBID=1237792397, not open)

RMAN>  backup as copy datafile 71 format '/backup_dir/in71_%U';

Starting backup at 07-NOV-13
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=1086 devtype=DISK
channel ORA_DISK_1: starting datafile copy
input datafile fno=00071 name=/dev/rdata_03
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 11/07/2013 09:18:10
ORA-19501: read error on file "/dev/rdata_03", blockno 178305 (blocksize=8192)
ORA-27063: number of bytes read/written is incorrect
IBM AIX RISC System/6000 Error: 5: I/O error
Additional information: -1
Additional information: 1048576

RMAN> backup check logical validate datafile 71;

Starting backup at 07-NOV-13
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00071 name=/dev/rdata_03
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 11/07/2013 09:47:03
ORA-19501: read error on file "/dev/rdata_03", blockno 178305 (blocksize=8192)
ORA-27063: number of bytes read/written is incorrect
IBM AIX RISC System/6000 Error: 5: I/O error
Additional information: -1
Additional information: 1048576

查询坏块个数
SQL> select * from  v$database_block_corruption;

no rows selected

没有查询到逻辑坏块,猜测为物理坏块,数据库层面还认为是好的数据库造成了读的时候提示I/O error


检查71号文件的数据块个数
SQL> select bytes/8192 from v$datafile where file#=71;

BYTES/8192
----------
  1280000
 
 
验证裸设备是否可以读
$ dbv file=/dev/rdata_03 blocksize=8192

DBVERIFY: Release 10.2.0.1.0 - Production on Thu Nov 7 09:48:08 2013

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

DBVERIFY - Verification starting : FILE = /dev/rdata_03

DBV-00102: File I/O error on FILE (/dev/rdata_03) during verification read operation (-2)

 

找出坏块,使用Oracle自带的工具
$ dbv file=/dev/rdata_03 blocksize=8192

DBVERIFY: Release 10.2.0.1.0 - Production on Thu Nov 7 09:48:08 2013

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

DBVERIFY - Verification starting : FILE = /dev/rdata_03

DBV-00102: File I/O error on FILE (/dev/rdata_03) during verification read operation (-2)
同时在另一个窗口中查看
$ ps -ef | grep dbv                   
  oracle  598170  593980  38 09:57:42  pts/1  0:00 dbv file=/dev/rdata_03 blocksize=8192
  oracle 1712282  581750  0 09:57:46  pts/0  0:00 grep dbv
$ truss -faieo /tmp/strace.out -p 598170


598170: klseek(5, 746045440, 0, 0x0FFFFFFFFFFF9530)    = 0
...skipping...
598170: kread(5, " ( 0\011 ???D 5 ??.., 8192)    = 8192
598170: klseek(5, 1461190656, 0, 0x0FFFFFFFFFFF9530)    = 0
598170: kread(5, " ( 0\011 ???D 5 ??.., 8192)    Err#5  EIO
598170: kwrite(2, "\n D B V - 0 0 1 0 2 :  ", 12)      = 12
598170: kwrite(2, " F i l e  I / O  e r r".., 24)    = 24
598170: kwrite(2, " / d e v / r d a t a _ c".., 15)    = 15
598170: kwrite(2, " )  d u r i n g  ", 9)              = 9
598170: kwrite(2, " v e r i f i c a t i o n".., 17)    = 17
598170: kwrite(2, "  o p e r a t i o n  (", 12)      = 12
598170: kwrite(2, " -", 1)                              = 1
598170: kwrite(2, " 2", 1)                              = 1
598170: kwrite(2, " )", 1)                              = 1
598170: kwrite(2, "\n", 1)                              = 1
598170: close(5)                                        = 0
598170: close(4)                                        = 0
598170: kfcntl(1, F_GETFL, 0x00000000101A2087)          = 67110914
598170: kfcntl(2, F_GETFL, 0x00000000101A2087)          = 67110914
598170: _exit(1)
...skipping...
598170: kread(5, " ( 0\011 ???D 5 ??.., 8192)    = 8192
598170: klseek(5, 1461190656, 0, 0x0FFFFFFFFFFF9530)    = 0
598170: kread(5, " ( 0\011 ???D 5 ??.., 8192)    Err#5  EIO
598170: kwrite(2, "\n D B V - 0 0 1 0 2 :  ", 12)      = 12
598170: kwrite(2, " F i l e  I / O  e r r".., 24)    = 24
598170: kwrite(2, " / d e v / r d a t a _ c".., 15)    = 15
598170: kwrite(2, " )  d u r i n g  ", 9)              = 9
598170: kwrite(2, " v e r i f i c a t i o n".., 17)    = 17
598170: kwrite(2, "  o p e r a t i o n  (", 12)      = 12
598170: kwrite(2, " -", 1)                              = 1
598170: kwrite(2, " 2", 1)                              = 1
598170: kwrite(2, " )", 1)                              = 1
598170: kwrite(2, "\n", 1)                              = 1
598170: close(5)                                        = 0
598170: close(4)                                        = 0
598170: kfcntl(1, F_GETFL, 0x00000000101A2087)          = 67110914
598170: kfcntl(2, F_GETFL, 0x00000000101A2087)          = 67110914
598170: _exit(1)
找到开始的坏块
1461190656/8192=178368
说明第一个坏块为178368,验证最后的坏块,最大的数据块是1280000

$ dbv file=/dev/rdata_03 blocksize=8192 start=1461190656

DBVERIFY: Release 10.2.0.1.0 - Production on Thu Nov 7 10:10:58 2013

Copyright (c) 1982, 2005, Oracle.  All rights reserved.


DBV-00102: File I/O error on FILE (/dev/rdata_03) during start read operation (-2)

$ dbv file=/dev/rdata_03 blocksize=8192 start=194719

DBVERIFY: Release 10.2.0.1.0 - Production on Thu Nov 7 10:52:56 2013

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

DBVERIFY - Verification starting : FILE = /dev/rdata_03


DBVERIFY - Verification complete

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
Reduce the use of MySQL memory in DockerReduce the use of MySQL memory in DockerMar 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 libraryHow to solve the problem of mysql cannot open shared libraryMar 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 overviewWhat is SQLite? Comprehensive overviewMar 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 guideRunning multiple MySQL versions on MacOS: A step-by-step guideMar 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

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 agoBy尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),