搜尋
首頁資料庫mysql教程【执行灾难性恢复-1】

执行灾难恢复: [oracle@oracle ~]$ sqlplus / as sysdbaSQL*Plus: Release 10.2.0.5.0 - Production on Thu Nov 6 20:23:30 2014Copyright (c) 1982, 2010, Oracle. All Rights Reserved.Connected to:Oracle Database 10g Enterprise Edition Release 10.2.

执行灾难恢复:
[oracle@oracle ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.5.0 - Production on Thu Nov 6 20:23:30 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> shutdown abort
ORACLE instance shut down.
SQL> exit
Disconnected from 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
[oracle@oracle ~]$ rm /u01/oracle/oradata/jadl10g/ -rf
[oracle@oracle ~]$ rm /u01/oracle/admin/jadl10g/ -rf
[oracle@oracle ~]$ rm /u01/oracle/flash_recovery_area/jadl10g/ -rf
[oracle@oracle ~]$ ls /u01/oracle/10g/dbs/
ab_+ASM.dat hc_jadl10g.dat init.ora orapw+ASM snapcf_jadl10g.f
alert_jadl10g.log initd10g.ora lk+ASM orapwd10g spfile+ASM.ora
hc_+ASM.dat initdw.ora lkJADL10G orapwjadl10g spfilejadl10g.ora
[oracle@oracle ~]$ rm /u01/oracle/10g/dbs/*jadl10g* -rf
***注意该文件不能删除,如果删除了就不能恢复了***
[oracle@oracle ~]$ ls /u01/oracle/flash_recovery_area/JADL10G/
archivelog backupset datafile onlinelog

故障模拟完毕:开始执行恢复操作;

[oracle@oracle ~]$ rman target /
Recovery Manager: Release 10.2.0.5.0 - Production on Thu Nov 6 20:30:19 2014
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database (not started)

RMAN> startup nomount
startup failed: ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/u01/oracle/10g/dbs/initjadl10g.ora'
starting Oracle instance without parameter file for retrival of spfile
Oracle instance started
Total System Global Area 159383552 bytes
Fixed Size 2094736 bytes
Variable Size 67111280 bytes
Database Buffers 83886080 bytes
Redo Buffers 6291456 bytes

RMAN> restore spfile from '/u01/oracle/flash_recovery_area/JADL10G/backupset/2014_11_06/o1_mf_ncsnf_TAG20141106T202102_b5psyngf_.bkp';
Starting restore at 06-NOV-14
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=36 devtype=DISK
channel ORA_DISK_1: autobackup found: /u01/oracle/flash_recovery_area/JADL10G/backupset/2014_11_06/o1_mf_ncsnf_TAG20141106T202102_b5psyngf_.bkp
channel ORA_DISK_1: SPFILE restore from autobackup complete
Finished restore at 06-NOV-14

RMAN> shutdown abort;
Oracle instance shut down

RMAN> exit
Recovery Manager complete.
[oracle@oracle ~]$ strings $ORACLE_HOME/dbs/spfilejadl10g.ora
jadl10g.__db_cache_size=427819008
jadl10g.__java_pool_size=4194304
jadl10g.__large_pool_size=4194304
jadl10g.__shared_pool_size=155189248
jadl10g.__streams_pool_size=0
*.audit_file_dest='/u01/oracle/admin/jadl10g/adump'
*.background_dump_dest='/u01/oracle/admin/jadl10g/bdump'
*.compatible='10.2.0.5.0'
*.control_files='/u01/oracle/oradata/jadl10g/control01.ctl','/u01/oracle/flash_recovery_area/jadl10g/control02.ctl'#Restore Controlfile
*.core_dump_dest='/u01/oracle/admin/jadl10g/cdump'
*.db_block_size=8192
*.db_domain=''
*.db_file_multiblock_read_count=16
*.db_name='jadl10g'
*.db_recovery_file_dest='/u01/oracle/flash_recovery_area'
*.db_recovery_file_dest_size=2147483648
*.dispatchers='(PROTOCOL=TCP) (SERVICE=jadl10gXDB)'
*.job_queue_processes=10
*.log_archive_format='%t_%s_%r.dbf'
*.open_cursors=300
*.pga_aggregate_target=199229440
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.sga_target=597688320
*.undo_management='AUTO'
*.undo_tablespace='UNDOTBS1'
*.user_dump_dest='/u01/oracle/admin/jadl10g/udump'
[oracle@oracle ~]$ mkdir /u01/oracle/admin/jadl10g/{a,b,c,u}dump -p
[oracle@oracle ~]$ mkdir /u01/oracle/oradata/jadl10g
[oracle@oracle ~]$ mkdir /u01/oracle/flash_recovery_area/jadl10g
[oracle@oracle ~]$ rman target /
Recovery Manager: Release 10.2.0.5.0 - Production on Thu Nov 6 20:35:03 2014
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database (not started)
RMAN> startup nomount
connected to target database (not started)
Oracle instance started
Total System Global Area 599785472 bytes
Fixed Size 2098112 bytes
Variable Size 163580992 bytes
Database Buffers 427819008 bytes
Redo Buffers 6287360 bytes

RMAN> restore controlfile from '/u01/oracle/flash_recovery_area/JADL10G/backupset/2014_11_06/o1_mf_ncsnf_TAG20141106T202102_b5psyngf_.bkp';
Starting restore at 06-NOV-14
using channel ORA_DISK_1
channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
output filename=/u01/oracle/oradata/jadl10g/control01.ctl
output filename=/u01/oracle/flash_recovery_area/jadl10g/control02.ctl
Finished restore at 06-NOV-14

RMAN> alter database mount;
database mounted
released channel: ORA_DISK_1

RMAN> restore database;
Starting restore at 06-NOV-14
Starting implicit crosscheck backup at 06-NOV-14
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK
Crosschecked 1 objects
Finished implicit crosscheck backup at 06-NOV-14
Starting implicit crosscheck copy at 06-NOV-14
using channel ORA_DISK_1
Crosschecked 1 objects
Finished implicit crosscheck copy at 06-NOV-14
searching for all files in the recovery area
cataloging files...
cataloging done
List of Cataloged Files
=======================
File Name: /u01/oracle/flash_recovery_area/JADL10G/backupset/2014_11_06/o1_mf_ncsnf_TAG20141106T202102_b5psyngf_.bkp
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /u01/oracle/oradata/jadl10g/system01.dbf
restoring datafile 00002 to /u01/oracle/oradata/jadl10g/undotbs01.dbf
restoring datafile 00003 to /u01/oracle/oradata/jadl10g/sysaux01.dbf
restoring datafile 00004 to /u01/oracle/oradata/jadl10g/users01.dbf
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_TAG20141106T202102_b5psxhko_.bkp
channel ORA_DISK_1: restored backup piece 1
piece handle=/u01/oracle/flash_recovery_area/JADL10G/backupset/2014_11_06/o1_mf_nnndf_TAG20141106T202102_b5psxhko_.bkp tag=TAG20141106T202102
channel ORA_DISK_1: restore complete, elapsed time: 00:00:35
Finished restore at 06-NOV-14

RMAN> recover database;
Starting recover at 06-NOV-14
using channel ORA_DISK_1
starting media recovery
unable to find archive log
archive log thread=1 sequence=1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 11/06/2014 20:39:55
RMAN-06054: media recovery requesting unknown log: thread 1 seq 1 lowscn 485958

RMAN> recover database until scn 485958;
Starting recover at 06-NOV-14
using channel ORA_DISK_1
starting media recovery
unable to find archive log
archive log thre【本文来自鸿网互联 (http://www.68idc.cn)】ad=1 sequence=1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 11/06/2014 20:40:17
RMAN-06054: media recovery requesting unknown log: thread 1 seq 1 lowscn 485958

RMAN> recover database noredo;
Starting recover at 06-NOV-14
using channel ORA_DISK_1
Finished recover at 06-NOV-14

RMAN> alter database open resetlogs;
database opened

RMAN> exit
Recovery Manager complete.
[oracle@oracle ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.5.0 - Production on Thu Nov 6 20:47:03 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 name from v$datafile;
NAME
--------------------------------------------------------------------------------
/u01/oracle/oradata/jadl10g/system01.dbf
/u01/oracle/oradata/jadl10g/undotbs01.dbf
/u01/oracle/oradata/jadl10g/sysaux01.dbf
/u01/oracle/oradata/jadl10g/users01.dbf
/u01/oracle/oradata/jadl10g/example01.dbf


备份文件 不用删除 在备份设备上保留冗余备份
归档日志 不要删除 在备份设备上保留归档日志
日志文件一定要分开放,不要造成日志文件组成员全部丢失
数据文件丢失有故障,是可以恢复的
使用重建控制文件,备份控制文件恢复,resetlogs打开数据库都需要重新备份backup database;
陳述
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
如何恢复您的 Steam 云存档如何恢复您的 Steam 云存档May 28, 2023 pm 10:25 PM

Steam会在您玩游戏时保存您的游戏进度并将其存储在Steam云中。当您在多台设备上玩Steam游戏时,此功能非常有用。只需在所有设备上使用您的Steam凭据登录,安装游戏即可!所有用户设置、游戏保存数据、您朋友的聊天框等等。修复1–检查游戏是否受支持所有Steam游戏均不支持Steam云存档功能。因此,您必须检查游戏是否真的支持此功能。1.在您的系统上打开Steam应用程序。2.现在,您必须使用您的凭据登录Steam。3.然后,输入您的用户名和密码,然后点击“登录

每5分钟执行一次的Python脚本每5分钟执行一次的Python脚本Sep 10, 2023 pm 03:33 PM

自动化和任务调度在简化软件开发中的重复任务方面发挥着至关重要的作用。想象一下,有一个Python脚本需要每5分钟执行一次,例如从API获取数据、执行数据处理或发送定期更新。如此频繁地手动运行脚本可能非常耗时并且容易出错。这就是任务调度的用武之地。在这篇博文中,我们将探讨如何安排Python脚本每5分钟执行一次,确保它自动运行而无需手动干预。我们将讨论可用于实现此目标的不同方法和库,使您能够有效地自动化任务。使用time.sleep()函数每5分钟运行一次Python脚本的一种简单方法是利用tim

Windows 11 Recovery USB:下载、安装和创建Windows 11 Recovery USB:下载、安装和创建Jul 05, 2023 pm 01:05 PM

您的PC有时会遇到问题,导致难以正常启动。在这种情况下,您可以使用Windows11恢复USB恢复它。虽然这一切看起来简单明了,但您仍然需要知道如何创建和使用恢复USB。在本指南中,我们将引导您完成轻松执行此任务所需的步骤。我可以下载Windows11恢复USB吗?如果您的操作系统完全崩溃,您可以从另一台运行良好的PC下载Windows11恢复USB。但是,要从中创建恢复驱动器的电脑必须与你的电脑具有相同的体系结构。最好的选择仍然是在PC正常运行时从PC创建USB。这消除了任何兼容性风险。或者,

如何使用Python在Linux中进行脚本编写和执行如何使用Python在Linux中进行脚本编写和执行Oct 05, 2023 am 11:45 AM

如何使用Python在Linux中进行脚本编写和执行在Linux操作系统中,我们可以使用Python编写并执行各种脚本。Python是一种简洁而强大的编程语言,它提供了丰富的库和工具,使得脚本编写变得更加简单和高效。下面我们将介绍在Linux中如何使用Python进行脚本编写和执行的基本步骤,同时提供一些具体的代码示例来帮助你更好地理解和运用。安装Pytho

怎样在浏览器中编写PHP代码并保持代码不被执行?怎样在浏览器中编写PHP代码并保持代码不被执行?Mar 10, 2024 pm 02:27 PM

怎样在浏览器中编写PHP代码并保持代码不被执行?随着互联网的普及,越来越多的人开始接触网页开发,其中对于PHP的学习也越来越受到关注。PHP是一种在服务器端运行的脚本语言,通常用于编写动态网页。然而,在练习阶段,我们希望能够在浏览器中编写PHP代码并查看结果,但又不希望代码被执行。那么,如何实现在浏览器中编写PHP代码并保持不被执行呢?下面将详细介绍。首先,

如何使用ThinkPHP6实现数据库备份与恢复如何使用ThinkPHP6实现数据库备份与恢复Jun 20, 2023 pm 07:25 PM

在开发业务系统过程中,数据库是非常重要的一环。因此,对数据库进行备份和恢复是非常必要的操作。本文将结合ThinkPHP6框架实例,介绍如何使用ThinkPHP6实现数据库备份与恢复。一、数据库备份1.1环境准备在进行数据库备份之前,需要确认如下几点:1、需要设置好mysql数据库的bin目录地址,并把其路径加入系统Path变量中;2、需要安装好mysqld

如何在Python中执行Brown-Forsythe检验如何在Python中执行Brown-Forsythe检验Aug 31, 2023 pm 11:53 PM

Brown-Forsythe检验是一种统计检验,用于确定两个或多个组的方差是否相等。Levene检验使用与均值的绝对偏差,而Brown-Forsythe检验则使用与中位数的偏差。检验中使用的原假设如下-H0:组(总体)的方差相等备择假设是方差不相等-H1:组(群体)的方差不相等为了执行测试,我们计算每组的中位数以及与中位数的绝对偏差。然后我们根据这些偏差的方差计算F统计量。假设计算出的F统计量大于F分布表中的临界值。在这种情况下,我们拒绝原假设并得出结论:各组的方差不相等。在Python中,sc

如何应对Linux系统中的文件系统损坏和恢复问题如何应对Linux系统中的文件系统损坏和恢复问题Jun 29, 2023 pm 08:01 PM

如何应对Linux系统中的文件系统损坏和恢复问题在使用Linux系统时,由于各种原因,文件系统可能会遭受损坏,这可能导致数据丢失和系统无法正常运行。因此,我们需要知道如何应对文件系统损坏和恢复问题,以保护我们的数据和系统的稳定性。如何判断文件系统是否损坏?当文件系统受损时,将会出现一些明显的迹象。例如,文件或文件夹无法访问、文件大小异常、系统启动慢或无法启动

See all articles

熱AI工具

Undresser.AI Undress

Undresser.AI Undress

人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover

AI Clothes Remover

用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool

Undress AI Tool

免費脫衣圖片

Clothoff.io

Clothoff.io

AI脫衣器

AI Hentai Generator

AI Hentai Generator

免費產生 AI 無盡。

熱門文章

R.E.P.O.能量晶體解釋及其做什麼(黃色晶體)
2 週前By尊渡假赌尊渡假赌尊渡假赌
倉庫:如何復興隊友
1 個月前By尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island冒險:如何獲得巨型種子
4 週前By尊渡假赌尊渡假赌尊渡假赌

熱工具

Dreamweaver Mac版

Dreamweaver Mac版

視覺化網頁開發工具

SublimeText3 Linux新版

SublimeText3 Linux新版

SublimeText3 Linux最新版

SublimeText3漢化版

SublimeText3漢化版

中文版,非常好用

SublimeText3 英文版

SublimeText3 英文版

推薦:為Win版本,支援程式碼提示!

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

強大的PHP整合開發環境