【非关键性数据文件丢失(可以脱机数据文件的丢失)-恢复-1】
非关键性数据文件丢失(可以脱机数据文件的丢失): run{sql alter database datafile offline;restore datafile ;recover datafile ;slq alter database datafile online;} 除了system、undo_tablespace参数后值对应的表空间都可以采用以上的办法恢复。 [oracl
非关键性数据文件丢失(可以脱机数据文件的丢失):run{ sql 'alter database datafile <> offline'; restore datafile <>; recover datafile <>; slq 'alter database datafile <> online'; }
除了system、undo_tablespace参数后值对应的表空间都可以采用以上的办法恢复。
[oracle@oracle ~]$ ls /u01/oracle/oradata/jadl10g/ control01.ctl control03.ctl redo01.log redo03.log system01.dbf undotbs01.dbf control02.ctl example01.dbf redo02.log sysaux01.dbf temp01.dbf users01.dbf [oracle@oracle ~]$ rm /u01/oracle/oradata/jadl10g/example01.dbf [oracle@oracle ~]$ sqlplus / as sysdba SQL*Plus: Release 10.2.0.5.0 - Production on Thu Nov 6 15:23:57 2014 Copyright (c) 1982, 2010, Oracle. All Rights Reserved. Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production With the Partitioning, Oracle Label Security, OLAP, Data Mining Scoring Engine and Real Application Testing options SQL> select * from hr.employees; select * from hr.employees * ERROR at line 1: ORA-01116: error in opening database file 5 ORA-01110: data file 5: '/u01/oracle/oradata/jadl10g/example01.dbf' ORA-27041: unable to open file Linux-x86_64 Error: 2: No such file or directory Additional information: 3 [oracle@oracle ~]$ vi /tmp/1.rman
创建一个恢复的脚本:
[oracle@oracle ~]$ cat /tmp/1.rman run{ sql 'alter database datafile 5 offline'; restore datafile 5; recover datafile 5; sql 'alter database datafile 5 online'; }
rman利用建立的脚本恢复数据库的数据:
[oracle@oracle ~]$ rman target / cmdfile=/tmp/1.rman Recovery Manager: Release 10.2.0.5.0 - Production on Thu Nov 6 15:29:28 2014 Copyright (c) 1982, 2007, Oracle. All rights reserved. connected to target database: JADL10G (DBID=2011530396) RMAN> run{ 2> sql 'alter database datafile 5 offline'; 3> restore datafile 5; 4> recover datafile 5; 5> sql 'alter database datafile 5 online'; 6> } 7> using target database control f【本文来自鸿网互联 (http://www.68idc.cn)】ile instead of recovery catalog sql statement: alter database datafile 5 offline Starting restore at 06-NOV-14 allocated channel: ORA_DISK_1 channel ORA_DISK_1: sid=159 devtype=DISK channel ORA_DISK_1: starting datafile backupset restore channel ORA_DISK_1: specifying datafile(s) to restore from backup set restoring datafile 00005 to /u01/oracle/oradata/jadl10g/example01.dbf channel ORA_DISK_1: reading from backup piece /u01/oracle/flash_recovery_area/JADL10G/backupset/2014_11_06/o1_mf_nnndf_TAG20141106T135107_b5p32dhf_.bkp channel ORA_DISK_1: restored backup piece 1 piece handle=/u01/oracle/flash_recovery_area/JADL10G/backupset/2014_11_06/o1_mf_nnndf_TAG20141106T135107_b5p32dhf_.bkp tag=TAG20141106T135107 channel ORA_DISK_1: restore complete, elapsed time: 00:00:07 Finished restore at 06-NOV-14 Starting recover at 06-NOV-14 using channel ORA_DISK_1 starting media recovery media recovery complete, elapsed time: 00:00:00 Finished recover at 06-NOV-14 sql statement: alter database datafile 5 online Recovery Manager complete.
此时执行查询就不会出现错误了。
system/example 都丢失该如何处理?
shutdowm abort
restore datafile 1,5;
recover database;
alter database open;
这样操作后,不需要重新备份数据库 ,以前的备份是有效的。
恢复映像副本
RMAN> backup as copy datafile 5; Starting backup at 06-NOV-14 using target database control file instead of recovery catalog allocated channel: ORA_DISK_1 channel ORA_DISK_1: sid=159 devtype=DISK channel ORA_DISK_1: starting datafile copy input datafile fno=00005 name=/u01/oracle/oradata/jadl10g/example01.dbf output filename=/u01/oracle/flash_recovery_area/JADL10G/datafile/o1_mf_example_b5pbo2pc_.dbf tag=TAG20141106T160034 recid=10 stamp=862934437 channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03 Finished backup at 06-NOV-14 RMAN> recover copy of datafile 5; ---改命令就是对上面的数据文件做增量的修改, Starting recover at 06-NOV-14 using channel ORA_DISK_1 no copy of datafile 5 found to recover Finished recover at 06-NOV-14
数据文件从一个路径迁移到新的路径
数据文件从文件系统到ASM
数据文件从ASM到文件系统
实施以上需求的办法:
set newname for datafile '...' to '...';
restore ...
switch datafile all;
recover ....
将数据文件迁移到ASM:
SQL> select name from v$asm_diskgroup; vi a.rman run{ sql 'alter tablespace a1 offline immediate'; set newname for datafile 7 to '+DB'; restore datafile 7; switch datafile all; ---交换文件 recover datafile 7; slq 'alter tablespace a1 online'; }
在rman执行该脚本;
12c是比较特殊的:
alter database datafile 13 move '/u01/......';----移动到新的路径

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











DDREASE is a tool for recovering data from file or block devices such as hard drives, SSDs, RAM disks, CDs, DVDs and USB storage devices. It copies data from one block device to another, leaving corrupted data blocks behind and moving only good data blocks. ddreasue is a powerful recovery tool that is fully automated as it does not require any interference during recovery operations. Additionally, thanks to the ddasue map file, it can be stopped and resumed at any time. Other key features of DDREASE are as follows: It does not overwrite recovered data but fills the gaps in case of iterative recovery. However, it can be truncated if the tool is instructed to do so explicitly. Recover data from multiple files or blocks to a single

0.What does this article do? We propose DepthFM: a versatile and fast state-of-the-art generative monocular depth estimation model. In addition to traditional depth estimation tasks, DepthFM also demonstrates state-of-the-art capabilities in downstream tasks such as depth inpainting. DepthFM is efficient and can synthesize depth maps within a few inference steps. Let’s read about this work together ~ 1. Paper information title: DepthFM: FastMonocularDepthEstimationwithFlowMatching Author: MingGui, JohannesS.Fischer, UlrichPrestel, PingchuanMa, Dmytr

On Douyin, a short video platform full of creativity and vitality, we can not only enjoy a variety of exciting content, but also have in-depth communications with like-minded friends. Among them, chat sparks are an important indicator of the intensity of interaction between the two parties, and they often inadvertently ignite the emotional bonds between us and our friends. However, sometimes due to some reasons, the chat spark may be disconnected. So what should we do if we want to restore the chat spark? This tutorial guide will bring you a detailed introduction to the content strategy, hoping to help everyone. How to restore the spark of Douyin chat? 1. Open the Douyin message page and select a friend to chat. 2. Send messages and chat to each other. 3. If you send messages continuously for 3 days, you can get the spark logo. On a 3-day basis, send pictures or videos to each other

The performance of JAX, promoted by Google, has surpassed that of Pytorch and TensorFlow in recent benchmark tests, ranking first in 7 indicators. And the test was not done on the TPU with the best JAX performance. Although among developers, Pytorch is still more popular than Tensorflow. But in the future, perhaps more large models will be trained and run based on the JAX platform. Models Recently, the Keras team benchmarked three backends (TensorFlow, JAX, PyTorch) with the native PyTorch implementation and Keras2 with TensorFlow. First, they select a set of mainstream

When deleting or decompressing a folder on your computer, sometimes a prompt dialog box "Error 0x80004005: Unspecified Error" will pop up. How should you solve this situation? There are actually many reasons why the error code 0x80004005 is prompted, but most of them are caused by viruses. We can re-register the dll to solve the problem. Below, the editor will explain to you the experience of handling the 0x80004005 error code. Some users are prompted with error code 0X80004005 when using their computers. The 0x80004005 error is mainly caused by the computer not correctly registering certain dynamic link library files, or by a firewall that does not allow HTTPS connections between the computer and the Internet. So how about

Facing lag, slow mobile data connection on iPhone? Typically, the strength of cellular internet on your phone depends on several factors such as region, cellular network type, roaming type, etc. There are some things you can do to get a faster, more reliable cellular Internet connection. Fix 1 – Force Restart iPhone Sometimes, force restarting your device just resets a lot of things, including the cellular connection. Step 1 – Just press the volume up key once and release. Next, press the Volume Down key and release it again. Step 2 – The next part of the process is to hold the button on the right side. Let the iPhone finish restarting. Enable cellular data and check network speed. Check again Fix 2 – Change data mode While 5G offers better network speeds, it works better when the signal is weaker

The latest video of Tesla's robot Optimus is released, and it can already work in the factory. At normal speed, it sorts batteries (Tesla's 4680 batteries) like this: The official also released what it looks like at 20x speed - on a small "workstation", picking and picking and picking: This time it is released One of the highlights of the video is that Optimus completes this work in the factory, completely autonomously, without human intervention throughout the process. And from the perspective of Optimus, it can also pick up and place the crooked battery, focusing on automatic error correction: Regarding Optimus's hand, NVIDIA scientist Jim Fan gave a high evaluation: Optimus's hand is the world's five-fingered robot. One of the most dexterous. Its hands are not only tactile

New SOTA for multimodal document understanding capabilities! Alibaba's mPLUG team released the latest open source work mPLUG-DocOwl1.5, which proposed a series of solutions to address the four major challenges of high-resolution image text recognition, general document structure understanding, instruction following, and introduction of external knowledge. Without further ado, let’s look at the effects first. One-click recognition and conversion of charts with complex structures into Markdown format: Charts of different styles are available: More detailed text recognition and positioning can also be easily handled: Detailed explanations of document understanding can also be given: You know, "Document Understanding" is currently An important scenario for the implementation of large language models. There are many products on the market to assist document reading. Some of them mainly use OCR systems for text recognition and cooperate with LLM for text processing.
