search
HomeDatabaseMysql TutorialRMAN异机恢复备份集权限问题

RMAN异机恢复mdash;mdash;备份集权限问题

今天早上收邮件,看到师父发的rman恢复失败的邮件。

 

内容如下:

 

数据都已经解压完毕。 在/orabak/Oracle_bak 下

但恢复时读取备份片总是报错

channel dev1: reading from backup piece/orabak/oracle_bak/fullrac_EPTDB_820_1_20130802

ORA-19870: error reading backup piece/orabak/oracle_bak/fullrac_EPTDB_821_1_20130802

ORA-19587: error occurred reading 0 bytesat block number 1

ORA-27091: unable to queue I/O

ORA-27067: size of I/O buffer is invalid

Additional information: 2

ORA-19870: error reading backup piece/orabak/oracle_bak/fullrac_EPTDB_820_1_20130802

ORA-19587: error occurred reading 0 bytesat block number 1

ORA-27091: unable to queue I/O

ORA-27067: size of I/O buffer is invalid

Additional information: 2

 

系统日志中也可以看到

Fri Aug 9 00:30:04 2013

Corrupt block 1 found during reading backuppiece, file=/orabak/oracle_bak/fullrac_EPTDB_820_1_20130802, corr_type=1

Fri Aug 9 00:30:41 2013

Corrupt block 1 found during reading backuppiece, file=/orabak/oracle_bak/fullrac_EPTDB_819_1_20130802, corr_type=1

Fri Aug 9 00:30:41 2013

 

确认传输过程中没有问题。

 

似乎在这台机器上,RMAN没有办法正确读取备份片。。。

 

晕了。

 

我第一反应是备份集的问题,于是去备份目录下看了下。

-r--r--r-- 1 oracle oinstall 20611072 Aug 08 16:41 ctl_EPTDB_824_1_20130802
-r--r--r-- 1 oracle oinstall 21474836480 Aug 08 16:42 fullrac_EPTDB_818_1_20130802
-r--r--r-- 1 oracle oinstall 21474836480 Aug 08 16:45 fullrac_EPTDB_818_2_20130802

--都是只读权限,我觉得有问题,可想了下,rman备份是读取备份集,不用写应该不造成什么影响吧,但想是这么想,总觉得怪怪的。

 

于是查了下MOS,,果然是权限的问题:

 

APPLIES TO:

Oracle Database - Enterprise Edition - Version 10.2.0.1 to 10.2.0.4 [Release 10.2]
Oracle Database - Enterprise Edition - Version 10.1.0.2 to 10.2.0.1 [Release 10.1 to 10.2]
Information in this document applies to any platform.
***Checked for relevance on 06-May-2013***


SYMPTOMS

 

RMAN restore of read only backuppieces fails as follows:
.

ORA-19870: error reading backup piece
/bugmnt/am/ceaixcb5/tar5619852.992/app/oracle/oradata/TARCS/bkup_03hp58dk_1_1
ORA-19587: error occurred reading 0 bytes at block number 1
ORA-27091: unable to queue I/O
ORA-27067: size of I/O buffer is invalid
Additional information: 2
failover to previous backup
.
RMAN-571: ===========================================================
RMAN-569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-571: ===========================================================
RMAN-3002: failure of restore command at 07/26/2006 13:13:17
RMAN-6026: some targets not found - aborting restore
RMAN-6023: no backup or copy of datafile 4 found to restore

CAUSE

The backuppiece is in read only status at the operating system level.

SOLUTION

Make the RMAN backuppiece not only readable but also writable. See Bug 5412531 for other details.

--确实需要写的权限!

REFERENCES

BUG:5412531 - RMAN FAILS RESTORING READONLY BACKUPS: ORA-19870 ORA-19587 ORA-27091 ORA-27067

 

解决:赋予写的权限即可。

 

经过修改权限后,进行验证就不会报错了。

cd/orabak/oracle_bak

chmod775 *20130802

 

RMAN>restore controlfile validate;

 

Startingrestore at 09-AUG-13

usingchannel ORA_DISK_1

 

channelORA_DISK_1: starting validation of datafile backupset

channelORA_DISK_1: reading from backup piece/orabak/oracle_bak/ctl_EPTDB_824_1_20130802

channelORA_DISK_1: restored backup piece 1

piecehandle=/orabak/oracle_bak/ctl_EPTDB_824_1_20130802 tag=TAG20130802T210600

channelORA_DISK_1: validation complete, elapsed time: 00:00:02

Finishedrestore at 09-AUG-13

 

之后的恢复也没有问题。

 

注意:中间恢复失败,或者手工停止后,要将rman相关进程杀干净再重新恢复,否则后面会有问题。说不定在第二次恢复过程中,第一次的进程才停止,然后把相关文件删除,其实删除的是第二次才恢复的文件(因为文件名相同)。

推荐阅读:

Oracle基础教程之通过RMAN复制数据库

RMAN备份策略制定参考内容

RMAN备份学习笔记

Oracle数据库备份加密 RMAN加密

linux

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

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

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.

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

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),

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment