RMan

oracle 备份恢复 06ramn完全恢复

核能气质少年 提交于 2019-11-27 11:25:10
一、搭建实验环境 1.创建8张表scott.lxtb1-lxtb8 create table scott.lxtb9 tablespace lxtb as select * from scott.emp; 2.3DML操作 insert into scott.lxtb9 select * from scott.emp; commit; alter system archive log current; insert into scott.lxtb9 select * from scott.emp; commit; insert into scott.lxtb9 select * from scott.emp; select count(1) from scott.lxtb9; 3.热备脚本 run{ sql 'alter system switch logfile'; allocate channel c1 type disk; allocate channel c2 type disk; backup database format '/u01/app/backdir/rman/hot_bak/hot_%d_%s_%p.bak' include current controlfile plus archivelog delete input format '/u01/app

oracle 备份恢复 07rman不完全恢复

牧云@^-^@ 提交于 2019-11-27 11:24:58
不完全恢复:将数据库恢复到过去的某个时间点或者SCN点 一、实验环境 1.开归档 2.实验操作 create table scott.lxtb3 tablespace lxtb as select * from scott.emp; insert into scott.lxtb3 select * from scott.emp where rownum <=3; select count(1) from scott.lxtb3; 3.利用LOGMNR挖掘日志,找到对应操作的时间点和SCN 4.RMAN热备全库 二、备份恢复实验 1.不完全恢复至某DML语句前 DML-查日志(v$log,v$logfile,v$archived_log)-logmnr找到操作的时间点和SCN-查数据文件-关库-RMAN不完全恢复至指定SCN; 7159512 2015-11-05 14:04:21 RMAN> startup mount; run{ set until scn 7159512; allocate channel c1 type disk; allocate channel c2 type disk; restore database; recover database; alter database open resetlogs; } 2.不完全恢复至某DDL语句 DDL-查日志(v

使用recovery catalog查看数据库过去的定义

梦想的初衷 提交于 2019-11-26 20:13:05
我们平时通过report schema看到的是当前数据库的定义信息, 如果使用 recovery catalog的情况下,我们可以看到数据库以前的数据结构的信息 比如: 1.增加表空间前的情况: [oracle@dbserver ~]$ rman target / catalog rman/rman@192.168.133.1:1521/orcl Recovery Manager: Release 11.2.0.4.0 - Production on Wed Aug 29 11:41:49 2018 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. connected to target database: SZTECH1 (DBID=3253410194) connected to recovery catalog database RMAN> report schema; Report of database schema for database with db_unique_name SZTECH1 List of Permanent Datafiles =========================== File Size(MB) Tablespace RB