丢失所有控制文件,还原所有数据文件,不还原控制文件,recoverd
说明:创建表test03,切换日志,创建表test04,切换日志,删除所有数据文件,还原备份的所有数据文件,不需要还原控制文件;test03的归档日志没有丢失,test04的归档日志丢失,不能恢复test04 1、数据库所有控制文件丢失 2、还原备份之前的控制文件,数据文
说明:创建表test03,切换日志,创建表test04,切换日志,删除所有数据文件,还原备份的所有数据文件,不需要还原控制文件;test03的归档日志没有丢失,test04的归档日志丢失,不能恢复test04
1、数据库所有控制文件丢失 2、还原备份之前的控制文件,数据文件没做还原 3、until cancel using bakup controlfile跑部分归档日志
(1)一致性的全备
SQL> shutdown immediate;
# mkdir -p /oradata/bossbak/20140609allbackup
# cp -rf $ORACLE_BASE/oradata/boss/*.dbf /oradata/bossbak/20140609allbackup
# cp -rf $ORACLE_BASE/oradata/boss/*.ctl /oradata/bossbak/20140609allbackup
# cp -rf $ORACLE_HOME/dbs/spfileboss.ora /oradata/bossbak/20140609
# cd /oracle/flash_recovery_area/BOSS/archivelog/2014_06_09/
# rm -rf *
(2)查看数据库的信息
SQL> select tablespace_name,status from dba_tablespaces;
TABLESPACE_NAME STATUS
------------------------------ ---------
SYSTEM ONLINE
UNDOTBS1 ONLINE
SYSAUX ONLINE
TEMP ONLINE
USERS ONLINE
EXAMPLE ONLINE
TESTTBS01 ONLINE
TESTTBS02 OFFLINE
TESTTBS03 READ ONLY
SQL> select table_name,status,tablespace_name from user_tables where tablespace_name like 'TESTTBS%';
TABLE_NAME STATUS TABLESPACE_NAME
------------------------------ -------- ------------------------------
TEST01 VALID TESTTBS01
BOSS_NEW_TEST VALID TESTTBS01
(3)创建表test03,插入数据
SQL> create table test03 (id number, name varchar2(30)) tablespace testtbs01;
SQL> insert into test03 values(1, '11111');
SQL> insert into test03 values(2,'22222');
SQL> insert into test03 values(3,'33333');
SQL> insert into test03 values(1, '11111');
SQL> insert into test03 values(2,'22222');
SQL> insert into test03 values(3,'33333');
SQL> commit;
(4)进行日志切换
SQL> alter system switch logfile;
SQL> select group#,members,sequence#,archived,status,first_change# from v$log;
GROUP# MEMBERS SEQUENCE# ARC STATUS FIRST_CHANGE#
---------- ---------- ---------- --- ---------------- -------------
1 1 2 YES INACTIVE 675131
2 1 4 NO CURRENT 700583
3 1 3 YES ACTIVE 699759
SQL> alter system switch logfile;
SQL> alter system switch logfile;
SQL> create table test04 (id number, name varchar2(30)) tablespace testtbs01;
SQL> insert into test04 values(1, '11111');
SQL> insert into test04 values(2,'22222');
SQL> insert into test04 values(3,'33333');
SQL> commit;
SQL> alter system switch logfile;
SQL> alter system switch logfile;
SQL> alter system switch logfile;
SQL> select group#,members,sequence#,archived,status,first_change# from v$log;
GROUP# MEMBERS SEQUENCE# ARC STATUS FIRST_CHANGE#
---------- ---------- ---------- --- ---------------- -------------
1 1 8 YES INACTIVE 704201
2 1 7 YES INACTIVE 704199
3 1 9 NO CURRENT 704204
(5)备份全备后所有的归档日志
# pwd
/oracle/flash_recovery_area/BOSS/archivelog/2014_06_09
# cp -rf *.arc /oradata/bossbak/20140609
(6)删除全部归档,删除全部数据文件
# rm -rf *.arc
(7)关闭数据库
SQL> shutdown abort;
ORACLE instance shut down.
SQL> startup open;
ORA-01157: cannot identify/lock data file 1 - see DBWR trace file
ORA-01110: data file 1: '/oracle/oradata/boss/system01.dbf'
(8)还原备份的数据文件,不需要恢复控制文件
$ cp -rf *.dbf /oracle/oradata/boss
SQL> col "文件名" for a40
SQL> set linesize 150
SQL> select
2 ts.name "表空间名"
3 , df.file# "文件号"
4 , df.checkpoint_change# "检查点"
5 , df.name "文件名"
6 , df.status "在线状态"
7 , rf.error "恢复原因"
8 , rf.change# "系统变更号"
9 , rf.time
10 from v$tablespace ts,v$datafile df,v$recover_file rf
11 where ts.ts#=df.ts# and df.file#=rf.file#
12 order by df.file#;
#####最近一次数据库正常启动后的scn
表空间名 文件号 检查点 文件名 在线状 恢复原因 系统变更号 TIME
------------------------------ ---------- ---------- ---------------------------------------- ------- ------------------ ---------- ------------
SYSTEM 1 704204 /oracle/oradata/boss/system01.dbf SYSTEM FILE NOT FOUND 0
UNDOTBS1 2 704204 /oracle/oradata/boss/undotbs01.dbf ONLINE FILE NOT FOUND 0
SYSAUX 3 704204 /oracle/oradata/boss/sysaux01.dbf ONLINE FILE NOT FOUND 0
USERS 4 704204 /oracle/oradata/boss/users01.dbf ONLINE FILE NOT FOUND 0
EXAMPLE 5 704204 /oracle/oradata/boss/example01.dbf ONLINE FILE NOT FOUND 0
TESTTBS01 6 704204 /oracle/oradata/boss/testtbs01_01.dbf ONLINE FILE NOT FOUND 0
TESTTBS01 7 704204 /oracle/oradata/boss/testtbs01_02.dbf ONLINE FILE NOT FOUND 0
TESTTBS02 8 652783 /oracle/oradata/boss/testtbs02_01.dbf OFFLINE OFFLINE NORMAL 0
TESTTBS03 9 652799 /oracle/oradata/boss/testtbs03_01.dbf ONLINE FILE NOT FOUND 0
SQL> col name for a40
SQL> select file#,name,status,CHECKPOINT_CHANGE#,recover from v$datafile_header;
FILE# NAME STATUS CHECKPOINT_CHANGE# REC
---------- ---------------------------------------- ------- ------------------ ---
1 ONLINE 0
2 ONLINE 0
3 ONLINE 0
4 ONLINE 0
5 ONLINE 0
6 ONLINE 0
7 ONLINE 0
8 OFFLINE 0
9 ONLINE 0
(9)复制部分的归档日志,基于终止恢复
# cp -rf o1_mf_1_3_9sbbrfsx_.arc o1_mf_1_4_9sbbsn5j_.arc /oracle/flash_recovery_area/BOSS/archivelog/2014_06_09/
# cat boss_dbw0_8622.trc
ORA-01157: cannot identify/lock data file 1 - see DBWR trace file
ORA-01110: data file 1: '/oracle/oradata/boss/system01.dbf'
ORA-27041: unable to open file
Linux Error: 13: Permission denied
SQL> col name for a40;
SQL> set linesize 120;
SQL> select file#,name,status,CHECKPOINT_CHANGE#,recover from v$datafile_header;
FILE# NAME STATUS CHECKPOINT_CHANGE# REC
---------- ---------------------------------------- ------- ------------------ ---
1 /oracle/oradata/boss/system01.dbf ONLINE 700222 YES
2 /oracle/oradata/boss/undotbs01.dbf ONLINE 700222 YES
3 /oracle/oradata/boss/sysaux01.dbf ONLINE 700222 YES
4 /oracle/oradata/boss/users01.dbf ONLINE 700222 YES
5 /oracle/oradata/boss/example01.dbf ONLINE 700222 YES
6 /oracle/oradata/boss/testtbs01_01.dbf ONLINE 700222 YES
7 /oracle/oradata/boss/testtbs01_02.dbf ONLINE 700222 YES
8 OFFLINE 0
9 /oracle/oradata/boss/testtbs03_01.dbf ONLINE 652799
SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01113: file 1 needs media recovery
ORA-01110: data file 1: '/oracle/oradata/boss/system01.dbf'
SQL> recover database until cancel;
ORA-00279: change 700222 generated at 06/09/2014 11:16:10 needed for thread 1
ORA-00289: suggestion : /oracle/flash_recovery_area/BOSS/archivelog/2014_06_09/o1_mf_1_3_%u_.arc
ORA-00280: change 700222 for thread 1 is in sequence #3
Specify log: {
# ll
总用量 1047064
-rw-r----- 1 oracle oinstall 7094272 6月 9 11:21 control02.ctl
-rw-r----- 1 oracle oinstall 7094272 6月 9 11:21 control03.ctl
-rw-r----- 1 oracle oinstall 104865792 6月 9 11:19 example01.dbf
-rw-r----- 1 oracle oinstall 622080 6月 9 12:38 o1_mf_1_3_9sbbrfsx_.arc
-rw-r----- 1 oracle oinstall 11264 6月 9 12:38 o1_mf_1_4_9sbbsn5j_.arc
-rw-r----- 1 oracle oinstall 2560 6月 9 12:38 o1_mf_1_5_9sbbst96_.arc
-rw-r----- 1 oracle oinstall 4336640 6月 9 12:38 o1_mf_1_6_9sbgg5or_.arc
-rw-r----- 1 oracle oinstall 1024 6月 9 12:38 o1_mf_1_7_9sbgg862_.arc
-rw-r----- 1 oracle oinstall 2560 6月 9 12:38 o1_mf_1_8_9sbggfm7_.arc
# cp -rf o1_mf_1_3_9sbbrfsx_.arc o1_mf_1_4_9sbbsn5j_.arc /oracle/flash_recovery_area/BOSS/archivelog/2014_06_09/
SQL> recover database until cancel;
ORA-00279: change 700222 generated at 06/09/2014 11:16:10 needed for thread 1
ORA-00289: suggestion : /oracle/flash_recovery_area/BOSS/archivelog/2014_06_09/o1_mf_1_3_%u_.arc
ORA-00280: change 700222 for thread 1 is in sequence #3
Specify log: {
auto
ORA-00279: change 700583 generated at 06/09/2014 11:33:33 needed for thread 1
ORA-00289: suggestion : /oracle/flash_recovery_area/BOSS/archivelog/2014_06_09/o1_mf_1_4_%u_.arc
ORA-00280: change 700583 for thread 1 is in sequence #4
ORA-00278: log file '/oracle/flash_recovery_area/BOSS/archivelog/2014_06_09/o1_mf_1_3_9sbbrfsx_.arc' no longer needed
for this recovery
ORA-00279: change 700603 generated at 06/09/2014 11:34:12 needed for thread 1
ORA-00289: suggestion : /oracle/flash_recovery_area/BOSS/archivelog/2014_06_09/o1_mf_1_5_%u_.arc
ORA-00280: change 700603 for thread 1 is in sequence #5
ORA-00278: log file '/oracle/flash_recovery_area/BOSS/archivelog/2014_06_09/o1_mf_1_4_9sbbsn5j_.arc' no longer needed
for this recovery
ORA-00308: cannot open archived log '/oracle/flash_recovery_area/BOSS/archivelog/2014_06_09/o1_mf_1_5_9sbbst96_.arc'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
SQL> recover database until cancel;
ORA-00279: change 700603 generated at 06/09/2014 11:34:12 needed for thread 1
ORA-00289: suggestion : /oracle/flash_recovery_area/BOSS/archivelog/2014_06_09/o1_mf_1_5_%u_.arc
ORA-00280: change 700603 for thread 1 is in sequence #5
Specify log: {
cancel
Media recovery cancelled.
SQL> alter database open resetlogs;
SQL> select * from test03;
ID NAME
---------- ----------------------------------------
1 11111
2 22222
3 33333
SQL> select * from test04;
select * from test04
*
ERROR at line 1:
ORA-00942: table or view does not exist

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

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

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

Recently, many netizens have asked the editor, what is the file hiberfil.sys? Can hiberfil.sys take up a lot of C drive space and be deleted? The editor can tell you that the hiberfil.sys file can be deleted. Let’s take a look at the details below. hiberfil.sys is a hidden file in the Windows system and also a system hibernation file. It is usually stored in the root directory of the C drive, and its size is equivalent to the size of the system's installed memory. This file is used when the computer is hibernated and contains the memory data of the current system so that it can be quickly restored to the previous state during recovery. Since its size is equal to the memory capacity, it may take up a larger amount of hard drive space. hiber

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

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

I cry to death. The world is madly building big models. The data on the Internet is not enough. It is not enough at all. The training model looks like "The Hunger Games", and AI researchers around the world are worrying about how to feed these data voracious eaters. This problem is particularly prominent in multi-modal tasks. At a time when nothing could be done, a start-up team from the Department of Renmin University of China used its own new model to become the first in China to make "model-generated data feed itself" a reality. Moreover, it is a two-pronged approach on the understanding side and the generation side. Both sides can generate high-quality, multi-modal new data and provide data feedback to the model itself. What is a model? Awaker 1.0, a large multi-modal model that just appeared on the Zhongguancun Forum. Who is the team? Sophon engine. Founded by Gao Yizhao, a doctoral student at Renmin University’s Hillhouse School of Artificial Intelligence.

Recently, the military circle has been overwhelmed by the news: US military fighter jets can now complete fully automatic air combat using AI. Yes, just recently, the US military’s AI fighter jet was made public for the first time and the mystery was unveiled. The full name of this fighter is the Variable Stability Simulator Test Aircraft (VISTA). It was personally flown by the Secretary of the US Air Force to simulate a one-on-one air battle. On May 2, U.S. Air Force Secretary Frank Kendall took off in an X-62AVISTA at Edwards Air Force Base. Note that during the one-hour flight, all flight actions were completed autonomously by AI! Kendall said - "For the past few decades, we have been thinking about the unlimited potential of autonomous air-to-air combat, but it has always seemed out of reach." However now,
