oracle闪回技术总结之闪回数据库
[实施步骤]
步骤一、设置如下的初始化参数:
Sql>小时:以分钟为单位
SQL> 点00分左右发现表被删除
切了几个归档
22:00:38SQL>:06:05 SQL> :07:01 SQL> 2015_11_24 21:52:11 drop table emp2 purge;
Sql>
SQL> selectname,scn,time from v$restore_point;
NAME SCN TIME
------------------------------ -----------------------------------
RS_PT 103371424-NOV-15 10.27.58.000000000 PM
SQL> shutdownimmediate
SQL>startupmount
SQL>flashbackdatabase to restore point rs_pt;
#flashback databaseto timestamp sysdate-15/1440; (当前的系统时间之前的 15 分钟)
Flashback complete.
步骤四、以readonly 方式打开数据库
SQL> alterdatabase open read only;
Database altered.
SQL> connscott/tiger
Connected.
SQL> select *from tab;
TNAME TABTYPE CLUSTERID
------------------------------------- ----------
BONUS TABLE
DEPT TABLE
DEPT1 TABLE
EMP TABLE
EMP2 TABLE
SALGRADE TABLE
6 rows selected.
步骤五、导出dept1表
[oracle@HE1 bin]$exp scott/tiger file=/u01/apps/scott.dp1 log=scottdp1.logindexes=n tables=dept1
Export:Release 11.2.0.1.0 - Production on Tue Nov 24 22:33:53 2015
Copyright(c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Connectedto: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bitProduction
With thePartitioning, OLAP, Data Mining and Real Application Testing options
Exportdone in ZHS16GBK character set and AL16UTF16 NCHAR character set
Note:indexes on tables will not be exported
About toexport specified tables via Conventional Path ...
. .exporting table DEPT1 4 rows exported
Exportterminated successfully without warnings.
22:34:51 SQL> shutdown immediate
Databaseclosed.
Databasedismounted.
ORACLEinstance shut down.
22:35:13 SQL> startup mount;
ORACLEinstance started.
TotalSystem Global Area 780824576 bytes
FixedSize 2217424 bytes
VariableSize 465570352 bytes
DatabaseBuffers 310378496 bytes
RedoBuffers 2658304 bytes
Databasemounted.
步骤六、恢复数据库recoverdatabase
22:35:37 SQL>recover database;
Mediarecovery complete.
步骤七、打开数据库
22:35:40 SQL>alterdatabase open;
Databasealtered.
22:35:47 SQL> conn scott/tiger
Connected.
22:36:01 SQL> select *from tab;
TNAME TABTYPE CLUSTERID
------------------------------------- ----------
BONUS TABLE
DEPT TABLE
DEPT2 TABLE
EMP TABLE
EMP2 TABLE
SALGRADE TABLE
TEST TABLE
7 rowsselected.
步骤八、导入dept1表
[oracle@HE1 bin]$impscott/tiger file=/u01/apps/scott.dp1 tables=dept1 fromuser=scott touser=scottignore=y
Import:Release 11.2.0.1.0 - Production on Tue Nov 24 22:39:06 2015
Copyright(c) 1982, 2009, Oracle and/or its affiliates. All rights reserved
Connectedto: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bitProduction
With thePartitioning, OLAP, Data Mining and Real Application Testing options
Exportfile created by EXPORT:V11.02.00 via conventional path
importdone in ZHS16GBK character set and AL16UTF16 NCHAR character set
.importing SCOTT's objects into SCOTT
. .importing table "DEPT1" 4 rowsimported
Importterminated successfully without warnings.
22:36:05 SQL> select * from tab;
TNAME TABTYPE CLUSTERID
------------------------------------- ----------
BONUS TABLE
DEPT TABLE
DEPT1 TABLE
DEPT2 TABLE
EMP TABLE
EMP2 TABLE
SALGRADE TABLE
TEST TABLE
8 rowsselected.
闪回数据库完成
oracle闪回技术总结之闪回数据库的更多相关文章
- Oracle闪回技术
(一)闪回技术概要 闪回技术是数据库备份与恢复的重要补充手段,主要包括以下7种特性: 特性 原理 数据库支持 闪回查询(Flashback Query) 利用undo表空间中的回退信息,查询过去某个时 ...
- OCP读书笔记(10) - 使用闪回技术I
使用闪回技术查询数据 闪回查询:就是查询表在过去某个时间点的数据,所用到的技术就是undo数据 SQL> conn scott/tiger 创建测试表 SQL> create table ...
- 己亥清爽恢复系列之数据文件4篇:DROP表后如何恢复(非闪回技术)
己亥清爽系列说明:清爽系列是作为恢复系列的基础篇,基于FS(File System)文件系统的手工还原恢复,也叫基于用户管理的还原恢复,来自于博客园AskScuti. 实验说明:你不小心Drop掉了一 ...
- Oracle闪回技术详解
概述: 闪回技术是Oracle强大数据库备份恢复机制的一部分,在数据库发生逻辑错误的时候,闪回技术能提供快速且最小损失的恢复(多数闪回功能都能在数据库联机状态下完成).需要注意的是,闪回技术旨在快速 ...
- Oracle闪回技术(Flashback)
闪回技术有闪回表.闪回删除.闪回查询.闪回事务查询.闪回事务.闪回数据库.闪回数据归档.其中,闪回查询.闪回事务查询用来“观察”过去:闪回数据归档并不是一个独立的功能,其功能是扩展闪回查询的时间窗口: ...
- Oracle 六闪回技术,flashback
Flashback 技术基于Undo segment基于内容的, 因此,限制UNDO_RETENTON参数. 要使用flashback 特征,您必须启用自己主动撤销管理表空间. 在Oracle 11g ...
- Oracle 的闪回技术 --flashback
SQL Fundamentals: 表的创建和管理 如何开启数据库闪回? SQL> shutdown immediate; ORA-01109: database not open Databa ...
- oracle 单实例DG(闪回技术四)
一,flashback Oracle Flashback技术是一组数据库特性,它可以让你查看数据库对象的过去状态,或者将数据库对象返回到以前的状态,而无需使用基于时间点的介质恢复.根据数据库的变化,闪 ...
- Oracle Flashback Technology【闪回技术】
-------------------------与其他数据库相比,Oracle的闪回让开发者多了一条选择的路. Flashback的目的 先看下Oracle官方文档中的解释: Oracle Flas ...
随机推荐
- java source map
Chrome 更新后出现了 jquery.min.map 404 (Not Found) 的信息 这个到底是什么东西?查询了一下,得到了以下资料 JQuery 官方解释 摘录一下內容 从 jQuer ...
- 线段树扫描线 HDU 1542
n个矩形 问他们覆盖的面积重复的就算一次 x数组存线段 然后根据横坐标排一下 z 线段树 l - r 就是1 ~ 2*n #include<stdio.h> #include< ...
- CodeForces 605A Sorting Railway Cars
求一下最长数字连续上升的子序列长度,n-长度就是答案 O(n)可以出解,dp[i]=dp[i-1]+1,然后找到dp数组最大的值. #include<cstdio> #include< ...
- codeforce 611C New Year and Domino
n*n预处理. 询问的时候用容斥,再删除边界. #include<cstdio> #include<cstring> #include<cmath> #includ ...
- NSString之Format
三点用法总结: 类型转换:基本类型到对象类型 需要调用NSString的fotmat方法 NSString *location = [NSString stringWithFormat:@&quo ...
- 基于Apache搭建Nagios图形监控
基于apache 的稍微简单一点么?实验一下子就OK了... 环境: System: [root@losnau etc]# cat /etc/issueRed Hat Enterprise Linux ...
- iOS10适配——错误:Code=3000
error : Error Domain=NSCocoaErrorDomain Code=3000 "未找到应用程序的“aps-environment”的权利字符串" UserIn ...
- JAVA基础--适配器模式
interface Window{ // 定义Window接口,表示窗口操作 public void open() ; // 打开 public void close() ; // 关闭 public ...
- Spring自学教程-ssh整合(六)
以下是本人原创,如若转载和使用请注明转载地址.本博客信息切勿用于商业,可以个人使用,若喜欢我的博客,请关注我,谢谢!博客地址 感谢您支持我的博客,我的动力是您的支持和关注!如若转载和使用请注明转载地址 ...
- TcpView 查看端口的小工具(推荐)
介绍: TCPView是一个Windows程序,将显示你的详细清单的所有TCP和UDP端点在您的系统,包括拥有进程名称,远程地址和状态的TCP连接. 打开下面的链接就可以下载了. https://te ...