几种RMAN恢复场景

3 篇文章 0 订阅
前期准备:
做一次全库备份:
[oracle@localhost ~]$ rman target /

Recovery Manager: Release 11.2.0.4.0 - Production on Thu Sep 8 11:15:52 2016

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to target database: ORCL (DBID=1448371606)

RMAN> backup database;

Starting backup at 08-SEP-16
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=30 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/u01/app/oracle/oradata/orcl/system01.dbf
input datafile file number=00002 name=/u01/app/oracle/oradata/orcl/sysaux01.dbf
input datafile file number=00005 name=/u01/app/oracle/oradata/orcl/example01.dbf
input datafile file number=00003 name=/u01/app/oracle/oradata/orcl/undotbs01.dbf
input datafile file number=00004 name=/u01/app/oracle/oradata/orcl/user01.dbf
channel ORA_DISK_1: starting piece 1 at 08-SEP-16
channel ORA_DISK_1: finished piece 1 at 08-SEP-16
piece handle=/u01/app/oracle/fast_recovery_area/ORCL/backupset/2016_09_08/o1_mf_nnndf_TAG20160908T111600_cx1ozkdb_.bkp tag=TAG20160908T111600 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:15
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 08-SEP-16
channel ORA_DISK_1: finished piece 1 at 08-SEP-16
piece handle=/u01/app/oracle/fast_recovery_area/ORCL/backupset/2016_09_08/o1_mf_ncsnf_TAG20160908T111600_cx1p208k_.bkp tag=TAG20160908T111600 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
Finished backup at 08-SEP-16

RMAN> list backupset;


List of Backup Sets
===================


BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
14      Full    1.11G      DISK        00:01:07     08-SEP-16      
        BP Key: 14   Status: AVAILABLE  Compressed: NO  Tag: TAG20160908T111600
        Piece Name: /u01/app/oracle/fast_recovery_area/ORCL/backupset/2016_09_08/o1_mf_nnndf_TAG20160908T111600_cx1ozkdb_.bkp
  List of Datafiles in backup set 14
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  1       Full 1070506    08-SEP-16 /u01/app/oracle/oradata/orcl/system01.dbf
  2       Full 1070506    08-SEP-16 /u01/app/oracle/oradata/orcl/sysaux01.dbf
  3       Full 1070506    08-SEP-16 /u01/app/oracle/oradata/orcl/undotbs01.dbf
  4       Full 1070506    08-SEP-16 /u01/app/oracle/oradata/orcl/user01.dbf
  5       Full 1070506    08-SEP-16 /u01/app/oracle/oradata/orcl/example01.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
15      Full    9.36M      DISK        00:00:04     08-SEP-16      
        BP Key: 15   Status: AVAILABLE  Compressed: NO  Tag: TAG20160908T111600
        Piece Name: /u01/app/oracle/fast_recovery_area/ORCL/backupset/2016_09_08/o1_mf_ncsnf_TAG20160908T111600_cx1p208k_.bkp
  SPFILE Included: Modification time: 08-SEP-16
  SPFILE db_unique_name: ORCL
  Control File Included: Ckp SCN: 1070546      Ckp time: 08-SEP-16

丢失spfile的恢复

删除spfile。
[oracle@localhost ~]$ cd /u01/app/oracle/product/11.2.0/dbhome_1/dbs/
[oracle@localhost dbs]$ ls
hc_orcl.dat  init.ora  lkORCL  orapworcl  snapcf_orcl.f  spfileorcl.ora
[oracle@localhost dbs]$ rm spfileorcl.ora 
[oracle@localhost dbs]$ 
开始恢复
RMAN> restore spfile from autobackup;

Starting restore at 08-SEP-16
using channel ORA_DISK_1

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 09/08/2016 11:20:48
RMAN-06564: must use the TO clause when the instance is started with SPFILE
--其实这个时候如果实例还在启动,可以不用关库恢复,从memory中恢复。
RMAN> shutdown immediate

database closed
database dismounted
Oracle instance shut down
RMAN> startup nomount
connected to target database (not started)
startup failed: ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/initorcl.ora'

starting Oracle instance without parameter file for retrieval of spfile
Oracle instance started

Total System Global Area    1068937216 bytes

Fixed Size                     2260088 bytes
Variable Size                281019272 bytes
Database Buffers             780140544 bytes
Redo Buffers                   5517312 bytes

RMAN> restore spfile from autobackup;

Starting restore at 08-SEP-16
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=19 device type=DISK

channel ORA_DISK_1: looking for AUTOBACKUP on day: 20160908
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20160907
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20160906
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20160905
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20160904
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20160903
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20160902
channel ORA_DISK_1: no AUTOBACKUP in 7 days found
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 09/08/2016 11:21:42
RMAN-06172: no AUTOBACKUP found or specified handle is not a valid copy or piece

RMAN> restore spfile from '/u01/app/oracle/fast_recovery_area/ORCL/backupset/2016_09_08/o1_mf_ncsnf_TAG20160908T111600_cx1p208k_.bkp';

Starting restore at 08-SEP-16
using channel ORA_DISK_1

channel ORA_DISK_1: restoring spfile from AUTOBACKUP /u01/app/oracle/fast_recovery_area/ORCL/backupset/2016_09_08/o1_mf_ncsnf_TAG20160908T111600_cx1p208k_.bkp
channel ORA_DISK_1: SPFILE restore from AUTOBACKUP complete
Finished restore at 08-SEP-16

RMAN> shutdown immediate

Oracle instance shut down

RMAN> startup open

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "open": expecting one of: "dba, force, mount, newline, nomount, pfile, ;"
RMAN-01007: at line 1 column 9 file: standard input

RMAN> startup

connected to target database (not started)
Oracle instance started
database mounted
database opened

Total System Global Area     768294912 bytes

Fixed Size                     2257192 bytes
Variable Size                486543064 bytes
Database Buffers             276824064 bytes
Redo Buffers                   2670592 bytes
演示从memory恢复。
[oracle@localhost 2016_09_08]$ cd /u01/app/oracle/product/11.2.0/dbhome_1/dbs/
[oracle@localhost dbs]$ ls
hc_orcl.dat  init.ora  lkORCL  orapworcl  snapcf_orcl.f  spfileorcl.ora
[oracle@localhost dbs]$ rm spfileorcl.ora
[oracle@localhost ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Thu Sep 8 11:26:24 2016

Copyright (c) 1982, 2013, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> create spfile from memory;
create spfile from memory
*
ERROR at line 1:
ORA-32002: cannot create SPFILE already being used by the instance


SQL> alter system set db_files = 2000 scope = spfile;
alter system set db_files = 2000 scope = spfile
*
ERROR at line 1:
ORA-01565: error in identifying file
'/u01/app/oracle/product/11.2.0/dbhome_1/dbs/spfileorcl.ora'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3


SQL> create spfile from memory;
create spfile from memory
*
ERROR at line 1:
ORA-32002: cannot create SPFILE already being used by the instance


SQL> create spfile = '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/spfileorcl.ora' from memory;
create spfile = '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/spfileorcl.ora' from memory
*
ERROR at line 1:
ORA-32002: cannot create SPFILE already being used by the instance


SQL> create spfile='/u01/app/oracle/product/11.2.0/dbhome_1/dbs/spfileORCL.ora' from memory;

File created.

SQL> alter system set db_files = 2000 scope = spfile;
alter system set db_files = 2000 scope = spfile
*
ERROR at line 1:
ORA-01565: error in identifying file
'/u01/app/oracle/product/11.2.0/dbhome_1/dbs/spfileorcl.ora'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
这个时候我把之前的创建的新的spfileORCL.ora改名字
[oracle@localhost dbs]$ pwd
/u01/app/oracle/product/11.2.0/dbhome_1/dbs
[oracle@localhost dbs]$ mv spfileORCL.ora spfileorcl.ora
重新执行下面命令
SQL> alter system set db_files = 2000 scope = spfile;

System altered.

spfile和pfile都是在数据库实例启动的时候才会用到,同时也是在数据库做一些修改的时候才会用到,所以,可以在中途移动这些文件。

丢失控制文件的恢复

[oracle@localhost dbs]$ cd /u01/app/oracle/oradata/orcl/
[oracle@localhost orcl]$ ls
control01.ctl  redo01.log  redo03.log    system01.dbf  undotbs01.dbf
example01.dbf  redo02.log  sysaux01.dbf  temp01.dbf    user01.dbf
[oracle@localhost orcl]$ rm control01.ctl 
[oracle@localhost orcl]$ cd /u01/app/oracle/fast_recovery_area/orcl/
[oracle@localhost orcl]$ rm control02.ctl
这里面如果在linux环境下,可以不用备份恢复。
首先看看数据库状态。
[oracle@localhost fd]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Thu Sep 8 14:28:02 2016

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select open_mode from v$database;

OPEN_MODE
--------------------
READ WRITE
这个时候我们删除控制文件。
[oracle@localhost ~]$ rm /u01/app/oracle/oradata/orcl/control01.ctl 
[oracle@localhost ~]$ rm /u01/app/oracle/fast_recovery_area/orcl/control02.ctl 
[oracle@localhost ~]$ 
其实我们能发现,linux中数据库依然能做操作。,并没有宕机。windows则会宕机。
windows
C:\Users\Csong>sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on 星期四 9月 8 14:35:05 2016

Copyright (c) 1982, 2013, Oracle.  All rights reserved.


连接到:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select open_mode from v$datbase;
select open_mode from v$datbase
*
第 1 行出现错误:
ORA-03113: 通信通道的文件结尾
进程 ID: 8960
会话 ID: 203 序列号: 3
linux
这个时候看看控制文件的进程号
[oracle@localhost ~]$ ps -ef | grep gen
oracle   12990     1  0 14:25 ?        00:00:00 ora_gen0_orcl
oracle   13907 13701  0 14:40 pts/1    00:00:00 grep --color=auto gen
[oracle@localhost ~]$ cd /proc/12990/fd/
[oracle@localhost fd]$ ll
total 0
lr-x------. 1 oracle oinstall 64 Sep  8 14:41 0 -> /dev/null
l-wx------. 1 oracle oinstall 64 Sep  8 14:41 1 -> /dev/null
l-wx------. 1 oracle oinstall 64 Sep  8 14:41 10 -> /u01/app/oracle/diag/rdbms/orcl/orcl/trace/alert_orcl.log
lr-x------. 1 oracle oinstall 64 Sep  8 14:41 11 -> /u01/app/oracle/product/11.2.0/dbhome_1/rdbms/mesg/oraus.msb
l-wx------. 1 oracle oinstall 64 Sep  8 14:41 2 -> /dev/null
lrwx------. 1 oracle oinstall 64 Sep  8 14:41 256 -> /u01/app/oracle/oradata/orcl/control01.ctl (deleted)
lrwx------. 1 oracle oinstall 64 Sep  8 14:41 257 -> /u01/app/oracle/fast_recovery_area/orcl/control02.ctl (deleted)
lr-x------. 1 oracle oinstall 64 Sep  8 14:41 3 -> /dev/null
lr-x------. 1 oracle oinstall 64 Sep  8 14:41 4 -> /dev/null
lr-x------. 1 oracle oinstall 64 Sep  8 14:41 5 -> /u01/app/oracle/product/11.2.0/dbhome_1/rdbms/mesg/oraus.msb
lr-x------. 1 oracle oinstall 64 Sep  8 14:41 6 -> /proc/12990/fd
lr-x------. 1 oracle oinstall 64 Sep  8 14:41 7 -> /dev/zero
lrwx------. 1 oracle oinstall 64 Sep  8 14:41 8 -> /u01/app/oracle/product/11.2.0/dbhome_1/dbs/hc_orcl.dat
lrwx------. 1 oracle oinstall 64 Sep  8 14:41 9 -> /u01/app/oracle/product/11.2.0/dbhome_1/dbs/lkORCL
我们发现有两个连接,状态是deleted。
我们可以cp恢复。
[oracle@localhost fd]$ cp 256 /u01/app/oracle/oradata/orcl/control01.ctl
[oracle@localhost fd]$ cp 257 /u01/app/oracle/fast_recovery_area/orcl/control02.ctl.
这里操作数据库是可以的,但是关闭实例还是会报错。
SQL> shutdown immediate
Database closed.
ORA-03113: end-of-file on communication channel
Process ID: 14010
Session ID: 1 Serial number: 3

SQL> startup open;
ORA-24324: service handle not initialized
ORA-01041: internal error. hostdef extension doesn't exist
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@localhost fd]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Thu Sep 8 14:58:53 2016

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup open
ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance
ORACLE instance started.

Total System Global Area  768294912 bytes
Fixed Size		    2257192 bytes
Variable Size		  490737368 bytes
Database Buffers	  272629760 bytes
Redo Buffers		    2670592 bytes
Database mounted.
Database opened.
用RMAN恢复。
[oracle@localhost fd]$ rman target /

Recovery Manager: Release 11.2.0.4.0 - Production on Thu Sep 8 15:06:18 2016

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to target database: ORCL (DBID=1448371606)

RMAN> backup database;

Starting backup at 08-SEP-16
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=38 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/u01/app/oracle/oradata/orcl/system01.dbf
input datafile file number=00002 name=/u01/app/oracle/oradata/orcl/sysaux01.dbf
input datafile file number=00005 name=/u01/app/oracle/oradata/orcl/example01.dbf
input datafile file number=00003 name=/u01/app/oracle/oradata/orcl/undotbs01.dbf
input datafile file number=00004 name=/u01/app/oracle/oradata/orcl/user01.dbf
channel ORA_DISK_1: starting piece 1 at 08-SEP-16
channel ORA_DISK_1: finished piece 1 at 08-SEP-16
piece handle=/u01/app/oracle/fast_recovery_area/ORCL/backupset/2016_09_08/o1_mf_nnndf_TAG20160908T150623_cx23hhqc_.bkp tag=TAG20160908T150623 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:05
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 08-SEP-16
channel ORA_DISK_1: finished piece 1 at 08-SEP-16
piece handle=/u01/app/oracle/fast_recovery_area/ORCL/backupset/2016_09_08/o1_mf_ncsnf_TAG20160908T150623_cx23klbk_.bkp tag=TAG20160908T150623 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 08-SEP-16
这个时候删除controlfile
RMAN> shutdown abort

Oracle instance shut down

RMAN> startup nomount

connected to target database (not started)
Oracle instance started

Total System Global Area     768294912 bytes

Fixed Size                     2257192 bytes
Variable Size                490737368 bytes
Database Buffers             272629760 bytes
Redo Buffers                   2670592 bytes

RMAN> restore controlfile from '/u01/app/oracle/fast_recovery_area/ORCL/backupset/2016_09_08/o1_mf_ncsnf_TAG20160908T150623_cx23klbk_.bkp';

Starting restore at 08-SEP-16
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=19 device type=DISK

channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
output file name=/u01/app/oracle/oradata/orcl/control01.ctl
output file name=/u01/app/oracle/fast_recovery_area/orcl/control02.ctl
Finished restore at 08-SEP-16

RMAN> alter database mount;

database mounted
released channel: ORA_DISK_1

RMAN> recover database;

Starting recover at 08-SEP-16
Starting implicit crosscheck backup at 08-SEP-16
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=19 device type=DISK
Crosschecked 1 objects
Finished implicit crosscheck backup at 08-SEP-16

Starting implicit crosscheck copy at 08-SEP-16
using channel ORA_DISK_1
Crosschecked 9 objects
Finished implicit crosscheck copy at 08-SEP-16

searching for all files in the recovery area
cataloging files...
cataloging done

List of Cataloged Files
=======================
File Name: /u01/app/oracle/fast_recovery_area/ORCL/backupset/2016_09_08/o1_mf_ncsnf_TAG20160908T150623_cx23klbk_.bkp

using channel ORA_DISK_1

starting media recovery

archived log for thread 1 with sequence 5 is already on disk as file /u01/app/oracle/oradata/orcl/redo02.log
archived log file name=/u01/app/oracle/oradata/orcl/redo02.log thread=1 sequence=5
media recovery complete, elapsed time: 00:00:00
Finished recover at 08-SEP-16

RMAN> alter database open resetlogs;

database opened

数据文件损坏

[oracle@localhost orcl]$ rm user01.dbf 
RMAN> sql 'alter database datafile 4 offline';

sql statement: alter database datafile 4 offline

RMAN> restore datafile 4;

Starting restore at 08-SEP-16
using channel ORA_DISK_1

channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00004 to /u01/app/oracle/oradata/orcl/user01.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/oracle/fast_recovery_area/ORCL/backupset/2016_09_08/o1_mf_nnndf_TAG20160908T150623_cx23hhqc_.bkp
channel ORA_DISK_1: piece handle=/u01/app/oracle/fast_recovery_area/ORCL/backupset/2016_09_08/o1_mf_nnndf_TAG20160908T150623_cx23hhqc_.bkp tag=TAG20160908T150623
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
Finished restore at 08-SEP-16

RMAN> recover datafile 4;

Starting recover at 08-SEP-16
using channel ORA_DISK_1

starting media recovery

archived log for thread 1 with sequence 5 is already on disk as file /u01/app/oracle/fast_recovery_area/ORCL/archivelog/2016_09_08/o1_mf_1_5_cx23rpnb_.arc
archived log file name=/u01/app/oracle/fast_recovery_area/ORCL/archivelog/2016_09_08/o1_mf_1_5_cx23rpnb_.arc thread=1 sequence=5
media recovery complete, elapsed time: 00:00:00
Finished recover at 08-SEP-16

RMAN> sql 'alter database datafile 4 online';

sql statement: alter database datafile 4 online

表空间损坏

只是文件损坏。
RMAN> sql 'alter tablespace users offline';

sql statement: alter tablespace users offline
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of sql command on default channel at 09/08/2016 15:19:27
RMAN-11003: failure during parse/execution of SQL statement: alter tablespace users offline
ORA-01116: error in opening database file 4
ORA-01110: data file 4: '/u01/app/oracle/oradata/orcl/user01.dbf'
ORA-27041: unable to open file
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3

RMAN> sql 'alter tablespace users offline immediate';

sql statement: alter tablespace users offline immediate

RMAN> restore tablespace users;

Starting restore at 08-SEP-16
using channel ORA_DISK_1

channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00004 to /u01/app/oracle/oradata/orcl/user01.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/oracle/fast_recovery_area/ORCL/backupset/2016_09_08/o1_mf_nnndf_TAG20160908T150623_cx23hhqc_.bkp
channel ORA_DISK_1: piece handle=/u01/app/oracle/fast_recovery_area/ORCL/backupset/2016_09_08/o1_mf_nnndf_TAG20160908T150623_cx23hhqc_.bkp tag=TAG20160908T150623
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
Finished restore at 08-SEP-16

RMAN> recover tablespace users;

Starting recover at 08-SEP-16
using channel ORA_DISK_1

starting media recovery

archived log for thread 1 with sequence 5 is already on disk as file /u01/app/oracle/fast_recovery_area/ORCL/archivelog/2016_09_08/o1_mf_1_5_cx23rpnb_.arc
archived log file name=/u01/app/oracle/fast_recovery_area/ORCL/archivelog/2016_09_08/o1_mf_1_5_cx23rpnb_.arc thread=1 sequence=5
media recovery complete, elapsed time: 00:00:00
Finished recover at 08-SEP-16

RMAN> sql 'alter tablespace users online';

sql statement: alter tablespace users online
表空间删除
我这里创建了一个表空间后,又做了一次全库备份。
如果需要删除表空间后的其他数据库数据,则使用TSPITR,或者异机恢复后导回原库。
如果后面的数据无所谓,则可以全库基于时间点的恢复。
使用RMAN TSPITR恢复drop的表空间。
创建表空间
<pre name="code" class="sql">SQL> create tablespace Csong datafile '/u01/app/oracle/oradata/orcl/Csong.dbf' size 200m;
Tablespace created.
 
做全备
RMAN> backup database;

Starting backup at 09-SEP-16
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/u01/app/oracle/oradata/orcl/system01.dbf
input datafile file number=00002 name=/u01/app/oracle/oradata/orcl/sysaux01.dbf
input datafile file number=00005 name=/u01/app/oracle/oradata/orcl/example01.dbf
input datafile file number=00006 name=/u01/app/oracle/oradata/orcl/Csong.dbf
input datafile file number=00007 name=/u01/app/oracle/oradata/orcl/liyuanyuan.dbf
input datafile file number=00003 name=/u01/app/oracle/oradata/orcl/undotbs01.dbf
input datafile file number=00004 name=/u01/app/oracle/oradata/orcl/users01.dbf
channel ORA_DISK_1: starting piece 1 at 09-SEP-16
channel ORA_DISK_1: finished piece 1 at 09-SEP-16
piece handle=/u01/app/oracle/fast_recovery_area/ORCL/backupset/2016_09_09/o1_mf_nnndf_TAG20160909T161517_cx4vwqcz_.bkp tag=TAG20160909T161517 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:05
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 09-SEP-16
channel ORA_DISK_1: finished piece 1 at 09-SEP-16
piece handle=/u01/app/oracle/fast_recovery_area/ORCL/backupset/2016_09_09/o1_mf_ncsnf_TAG20160909T161517_cx4vyrbr_.bkp tag=TAG20160909T161517 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 09-SEP-16
创建一个新的表空间liyuanyuan,创建tablespace 为liyuanyuan的表Csong
<pre name="code" class="sql">SQL> create tablespace liyuanyuan datafile '/u01/app/oracle/oradata/orcl/liyuanyuan.dbf' size 200m;

Tablespace created.

SQL> create table Csong(id number(10)) tablespace liyuanyuan;
Table created.
SQL> insert into Csong select level from dual connect by level <= 200000;

200000 rows created.
 
删掉表空间Csong
SQL> drop tablespace Csong including contents and datafiles;

Tablespace dropped。
RMAN TSPITR恢复
RMAN> recover tablespace Csong until time "to_date('2016-09-09 16:17:00','yyyy-mm-dd hh24:mi:ss')" auxiliary destination '/u01/app/oracle';

Starting recover at 09-SEP-16
using channel ORA_DISK_1
RMAN-05026: WARNING: presuming following set of tablespaces applies to specified point-in-time

List of tablespaces expected to have UNDO segments
Tablespace SYSTEM
Tablespace UNDOTBS1

Creating automatic instance, with SID='kchD'

initialization parameters used for automatic instance:
db_name=ORCL
db_unique_name=kchD_tspitr_ORCL
compatible=11.2.0.4.0
db_block_size=8192
db_files=200
sga_target=1G
processes=80
db_create_file_dest=/u01/app/oracle
log_archive_dest_1='location=/u01/app/oracle'
#No auxiliary parameter file used


starting up automatic instance ORCL

Oracle instance started

Total System Global Area    1068937216 bytes

Fixed Size                     2260088 bytes
Variable Size                281019272 bytes
Database Buffers             780140544 bytes
Redo Buffers                   5517312 bytes
Automatic instance created


List of tablespaces that have been dropped from the target database:
Tablespace Csong

contents of Memory Script:
{
# set requested point in time
set until  time "to_date('2016-09-09 16:17:00','yyyy-mm-dd hh24:mi:ss')";
# restore the controlfile
restore clone controlfile;
# mount the controlfile
sql clone 'alter database mount clone database';
# archive current online log 
sql 'alter system archive log current';
# avoid unnecessary autobackups for structural changes during TSPITR
sql 'begin dbms_backup_restore.AutoBackupFlag(FALSE); end;';
}
executing Memory Script

executing command: SET until clause

Starting restore at 09-SEP-16
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=18 device type=DISK

channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: restoring control file
channel ORA_AUX_DISK_1: reading from backup piece /u01/app/oracle/fast_recovery_area/ORCL/backupset/2016_09_09/o1_mf_ncsnf_TAG20160909T161517_cx4vyrbr_.bkp
channel ORA_AUX_DISK_1: piece handle=/u01/app/oracle/fast_recovery_area/ORCL/backupset/2016_09_09/o1_mf_ncsnf_TAG20160909T161517_cx4vyrbr_.bkp tag=TAG20160909T161517
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
output file name=/u01/app/oracle/ORCL/controlfile/o1_mf_cx4w30db_.ctl
Finished restore at 09-SEP-16

sql statement: alter database mount clone database

sql statement: alter system archive log current

sql statement: begin dbms_backup_restore.AutoBackupFlag(FALSE); end;

contents of Memory Script:
{
# set requested point in time
set until  time "to_date('2016-09-09 16:17:00','yyyy-mm-dd hh24:mi:ss')";
# set destinations for recovery set and auxiliary set datafiles
set newname for clone datafile  1 to new;
set newname for clone datafile  3 to new;
set newname for clone datafile  2 to new;
set newname for clone tempfile  1 to new;
set newname for datafile  6 to 
 "/u01/app/oracle/oradata/orcl/Csong.dbf";
# switch all tempfiles
switch clone tempfile all;
# restore the tablespaces in the recovery set and the auxiliary set
restore clone datafile  1, 3, 2, 6;
switch clone datafile all;
}
executing Memory Script

executing command: SET until clause

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

renamed tempfile 1 to /u01/app/oracle/ORCL/datafile/o1_mf_temp_%u_.tmp in control file

Starting restore at 09-SEP-16
using channel ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00001 to /u01/app/oracle/ORCL/datafile/o1_mf_system_%u_.dbf
channel ORA_AUX_DISK_1: restoring datafile 00003 to /u01/app/oracle/ORCL/datafile/o1_mf_undotbs1_%u_.dbf
channel ORA_AUX_DISK_1: restoring datafile 00002 to /u01/app/oracle/ORCL/datafile/o1_mf_sysaux_%u_.dbf
channel ORA_AUX_DISK_1: restoring datafile 00006 to /u01/app/oracle/oradata/orcl/Csong.dbf
channel ORA_AUX_DISK_1: reading from backup piece /u01/app/oracle/fast_recovery_area/ORCL/backupset/2016_09_09/o1_mf_nnndf_TAG20160909T161517_cx4vwqcz_.bkp
channel ORA_AUX_DISK_1: piece handle=/u01/app/oracle/fast_recovery_area/ORCL/backupset/2016_09_09/o1_mf_nnndf_TAG20160909T161517_cx4vwqcz_.bkp tag=TAG20160909T161517
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:01:15
Finished restore at 09-SEP-16

datafile 1 switched to datafile copy
input datafile copy RECID=5 STAMP=922119602 file name=/u01/app/oracle/ORCL/datafile/o1_mf_system_cx4w37no_.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=6 STAMP=922119602 file name=/u01/app/oracle/ORCL/datafile/o1_mf_undotbs1_cx4w37sj_.dbf
datafile 2 switched to datafile copy
input datafile copy RECID=7 STAMP=922119602 file name=/u01/app/oracle/ORCL/datafile/o1_mf_sysaux_cx4w37qw_.dbf

contents of Memory Script:
{
# set requested point in time
set until  time "to_date('2016-09-09 16:17:00','yyyy-mm-dd hh24:mi:ss')";
# online the datafiles restored or switched
sql clone "alter database datafile  1 online";
sql clone "alter database datafile  3 online";
sql clone "alter database datafile  2 online";
sql clone "alter database datafile  6 online";
# recover and open resetlogs
recover clone database tablespace  "CSONG", "SYSTEM", "UNDOTBS1", "SYSAUX" delete archivelog;
alter clone database open resetlogs;
}
executing Memory Script

executing command: SET until clause

sql statement: alter database datafile  1 online

sql statement: alter database datafile  3 online

sql statement: alter database datafile  2 online

sql statement: alter database datafile  6 online

Starting recover at 09-SEP-16
using channel ORA_AUX_DISK_1

starting media recovery

archived log for thread 1 with sequence 2 is already on disk as file /u01/app/oracle/fast_recovery_area/ORCL/archivelog/2016_09_09/o1_mf_1_2_cx4w365j_.arc
archived log file name=/u01/app/oracle/fast_recovery_area/ORCL/archivelog/2016_09_09/o1_mf_1_2_cx4w365j_.arc thread=1 sequence=2
media recovery complete, elapsed time: 00:00:00
Finished recover at 09-SEP-16

database opened

contents of Memory Script:
{
# online the tablespaces that will be exported
sql clone 'alter tablespace  CSONG online';
# make read only the tablespace that will be exported
sql clone 'alter tablespace  CSONG read only';
# create directory for datapump import
sql "create or replace directory TSPITR_DIROBJ_DPDIR as ''
/u01/app/oracle''";
# create directory for datapump export
sql clone "create or replace directory TSPITR_DIROBJ_DPDIR as ''
/u01/app/oracle''";
}
executing Memory Script

sql statement: alter tablespace  CSONG online

sql statement: alter tablespace  CSONG read only

sql statement: create or replace directory TSPITR_DIROBJ_DPDIR as ''/u01/app/oracle''

sql statement: create or replace directory TSPITR_DIROBJ_DPDIR as ''/u01/app/oracle''

Performing export of metadata...
   EXPDP> Starting "SYS"."TSPITR_EXP_kchD":  
   EXPDP> Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK
   EXPDP> Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
   EXPDP> Master table "SYS"."TSPITR_EXP_kchD" successfully loaded/unloaded
   EXPDP> ******************************************************************************
   EXPDP> Dump file set for SYS.TSPITR_EXP_kchD is:
   EXPDP>   /u01/app/oracle/tspitr_kchD_33345.dmp
   EXPDP> ******************************************************************************
   EXPDP> Datafiles required for transportable tablespace CSONG:
   EXPDP>   /u01/app/oracle/oradata/orcl/Csong.dbf
   EXPDP> Job "SYS"."TSPITR_EXP_kchD" successfully completed at Fri Sep 9 16:21:34 2016 elapsed 0 00:00:59
Export completed


contents of Memory Script:
{
# shutdown clone before import
shutdown clone immediate
}
executing Memory Script

database closed
database dismounted
Oracle instance shut down

Performing import of metadata...
   IMPDP> Master table "SYS"."TSPITR_IMP_kchD" successfully loaded/unloaded
   IMPDP> Starting "SYS"."TSPITR_IMP_kchD":  
   IMPDP> Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK
   IMPDP> Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
   IMPDP> Job "SYS"."TSPITR_IMP_kchD" successfully completed at Fri Sep 9 16:22:08 2016 elapsed 0 00:00:04
Import completed


contents of Memory Script:
{
# make read write and offline the imported tablespaces
sql 'alter tablespace  CSONG read write';
sql 'alter tablespace  CSONG offline';
# enable autobackups after TSPITR is finished
sql 'begin dbms_backup_restore.AutoBackupFlag(TRUE); end;';
}
executing Memory Script

sql statement: alter tablespace  CSONG read write

sql statement: alter tablespace  CSONG offline

sql statement: begin dbms_backup_restore.AutoBackupFlag(TRUE); end;

Removing automatic instance
Automatic instance removed
auxiliary instance file /u01/app/oracle/ORCL/datafile/o1_mf_temp_cx4w5sxh_.tmp deleted
auxiliary instance file /u01/app/oracle/ORCL/onlinelog/o1_mf_3_cx4w5qxn_.log deleted
auxiliary instance file /u01/app/oracle/ORCL/onlinelog/o1_mf_2_cx4w5q1g_.log deleted
auxiliary instance file /u01/app/oracle/ORCL/onlinelog/o1_mf_1_cx4w5o9c_.log deleted
auxiliary instance file /u01/app/oracle/ORCL/datafile/o1_mf_sysaux_cx4w37qw_.dbf deleted
auxiliary instance file /u01/app/oracle/ORCL/datafile/o1_mf_undotbs1_cx4w37sj_.dbf deleted
auxiliary instance file /u01/app/oracle/ORCL/datafile/o1_mf_system_cx4w37no_.dbf deleted
auxiliary instance file /u01/app/oracle/ORCL/controlfile/o1_mf_cx4w30db_.ctl deleted
Finished recover at 09-SEP-16
校验
SQL> select tablespace_name from dba_tablespaces;

TABLESPACE_NAME
------------------------------
SYSTEM
SYSAUX
UNDOTBS1
TEMP
USERS
EXAMPLE
CSONG
LIYUANYUAN

8 rows selected.

SQL> select count(1) from Csong;

  COUNT(1)
----------
    200000
其实通过恢复的信息能看到,数据库自动创建了一个auxiliary实例(实例名未指定的话则随机),然后在新的实例上全库基于时间点恢复了之前的备份,然后EXPDP导出了还原的tablespace,然后IMPDP回target库。

基于时间点的不完全恢复

RMAN> backup database;

Starting backup at 10-SEP-16
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/u01/app/oracle/oradata/orcl/system01.dbf
input datafile file number=00002 name=/u01/app/oracle/oradata/orcl/sysaux01.dbf
input datafile file number=00005 name=/u01/app/oracle/oradata/orcl/example01.dbf
input datafile file number=00006 name=/u01/app/oracle/oradata/orcl/Csong.dbf
input datafile file number=00007 name=/u01/app/oracle/oradata/orcl/liyuanyuan.dbf
input datafile file number=00003 name=/u01/app/oracle/oradata/orcl/undotbs01.dbf
input datafile file number=00004 name=/u01/app/oracle/oradata/orcl/users01.dbf
channel ORA_DISK_1: starting piece 1 at 10-SEP-16
channel ORA_DISK_1: finished piece 1 at 10-SEP-16
piece handle=/u01/app/oracle/fast_recovery_area/ORCL/backupset/2016_09_10/o1_mf_nnndf_TAG20160910T165650_cx7lpm3c_.bkp tag=TAG20160910T165650 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:05
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 10-SEP-16
channel ORA_DISK_1: finished piece 1 at 10-SEP-16
piece handle=/u01/app/oracle/fast_recovery_area/ORCL/backupset/2016_09_10/o1_mf_ncsnf_TAG20160910T165650_cx7lrq70_.bkp tag=TAG20160910T165650 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 10-SEP-16

RMAN> shutdown immediate

database dismounted
Oracle instance shut down

RMAN> startup mount

connected to target database (not started)
Oracle instance started
database mounted

Total System Global Area     768294912 bytes

Fixed Size                     2257192 bytes
Variable Size                503320280 bytes
Database Buffers             260046848 bytes
Redo Buffers                   2670592 bytes

RMAN> run{
2> set until time "to_date('2016-09-10 17:30:00','yyyy-mm-dd hh24:mi:ss')";
3> restore database;
4> recover database;
5> alter database open resetlogs;
6> }

executing command: SET until clause

Starting restore at 10-SEP-16
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=18 device type=DISK

datafile 6 not processed because file is offline
skipping datafile 1; already restored to file /u01/app/oracle/oradata/orcl/system01.dbf
skipping datafile 2; already restored to file /u01/app/oracle/oradata/orcl/sysaux01.dbf
skipping datafile 3; already restored to file /u01/app/oracle/oradata/orcl/undotbs01.dbf
skipping datafile 4; already restored to file /u01/app/oracle/oradata/orcl/users01.dbf
skipping datafile 5; already restored to file /u01/app/oracle/oradata/orcl/example01.dbf
skipping datafile 7; already restored to file /u01/app/oracle/oradata/orcl/liyuanyuan.dbf
restore not done; all files read only, offline, or already restored
Finished restore at 10-SEP-16

Starting recover at 10-SEP-16
using channel ORA_DISK_1
datafile 6 not processed because file is offline

starting media recovery
media recovery complete, elapsed time: 00:00:00

Finished recover at 10-SEP-16

database opened

基于日志序列的不完全恢复

先做一次全库备份
RMAN> backup database;

Starting backup at 10-SEP-16
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/u01/app/oracle/oradata/orcl/system01.dbf
input datafile file number=00002 name=/u01/app/oracle/oradata/orcl/sysaux01.dbf
input datafile file number=00005 name=/u01/app/oracle/oradata/orcl/example01.dbf
input datafile file number=00006 name=/u01/app/oracle/oradata/orcl/Csong.dbf
input datafile file number=00007 name=/u01/app/oracle/oradata/orcl/liyuanyuan.dbf
input datafile file number=00003 name=/u01/app/oracle/oradata/orcl/undotbs01.dbf
input datafile file number=00004 name=/u01/app/oracle/oradata/orcl/users01.dbf
channel ORA_DISK_1: starting piece 1 at 10-SEP-16
channel ORA_DISK_1: finished piece 1 at 10-SEP-16
piece handle=/u01/app/oracle/fast_recovery_area/ORCL/backupset/2016_09_10/o1_mf_nnndf_TAG20160910T181024_cx7q0k03_.bkp tag=TAG20160910T181024 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:25
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 10-SEP-16
channel ORA_DISK_1: finished piece 1 at 10-SEP-16
piece handle=/u01/app/oracle/fast_recovery_area/ORCL/backupset/2016_09_10/o1_mf_ncsnf_TAG20160910T181024_cx7q397p_.bkp tag=TAG20160910T181024 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
Finished backup at 10-SEP-16
切换日志
SQL> alter system switch logfile;

System altered.

SQL> alter system switch logfile;

System altered.

SQL> alter system switch logfile;

System altered.

SQL> alter system switch logfile;

System altered.

SQL> alter system switch logfile;

System altered.

SQL> archive log list;
Database log mode	       Archive Mode
Automatic archival	       Enabled
Archive destination	       USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     14
Next log sequence to archive   16
Current log sequence	       16
现在做恢复。恢复到10
RMAN> restore database until sequence 10 thread 1;

Starting restore at 10-SEP-16
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=18 device type=DISK

datafile 6 not processed because file is offline
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00001 to /u01/app/oracle/oradata/orcl/system01.dbf
channel ORA_DISK_1: restoring datafile 00002 to /u01/app/oracle/oradata/orcl/sysaux01.dbf
channel ORA_DISK_1: restoring datafile 00003 to /u01/app/oracle/oradata/orcl/undotbs01.dbf
channel ORA_DISK_1: restoring datafile 00004 to /u01/app/oracle/oradata/orcl/users01.dbf
channel ORA_DISK_1: restoring datafile 00005 to /u01/app/oracle/oradata/orcl/example01.dbf
channel ORA_DISK_1: restoring datafile 00007 to /u01/app/oracle/oradata/orcl/liyuanyuan.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/oracle/fast_recovery_area/ORCL/backupset/2016_09_10/o1_mf_nnndf_TAG20160910T181024_cx7q0k03_.bkp
channel ORA_DISK_1: piece handle=/u01/app/oracle/fast_recovery_area/ORCL/backupset/2016_09_10/o1_mf_nnndf_TAG20160910T181024_cx7q0k03_.bkp tag=TAG20160910T181024
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:01:25
Finished restore at 10-SEP-16

RMAN> recover database until sequence 10 thread 1;

Starting recover at 10-SEP-16
using channel ORA_DISK_1
datafile 6 not processed because file is offline

starting media recovery

archived log for thread 1 with sequence 5 is already on disk as file /u01/app/oracle/fast_recovery_area/ORCL/archivelog/2016_09_10/o1_mf_1_5_cx7q44y7_.arc
archived log for thread 1 with sequence 6 is already on disk as file /u01/app/oracle/fast_recovery_area/ORCL/archivelog/2016_09_10/o1_mf_1_6_cx7q49l0_.arc
archived log for thread 1 with sequence 7 is already on disk as file /u01/app/oracle/fast_recovery_area/ORCL/archivelog/2016_09_10/o1_mf_1_7_cx7q4d4g_.arc
archived log for thread 1 with sequence 8 is already on disk as file /u01/app/oracle/fast_recovery_area/ORCL/archivelog/2016_09_10/o1_mf_1_8_cx7q4dt5_.arc
archived log for thread 1 with sequence 9 is already on disk as file /u01/app/oracle/fast_recovery_area/ORCL/archivelog/2016_09_10/o1_mf_1_9_cx7q4fjf_.arc
archived log file name=/u01/app/oracle/fast_recovery_area/ORCL/archivelog/2016_09_10/o1_mf_1_5_cx7q44y7_.arc thread=1 sequence=5
archived log file name=/u01/app/oracle/fast_recovery_area/ORCL/archivelog/2016_09_10/o1_mf_1_6_cx7q49l0_.arc thread=1 sequence=6
archived log file name=/u01/app/oracle/fast_recovery_area/ORCL/archivelog/2016_09_10/o1_mf_1_7_cx7q4d4g_.arc thread=1 sequence=7
archived log file name=/u01/app/oracle/fast_recovery_area/ORCL/archivelog/2016_09_10/o1_mf_1_8_cx7q4dt5_.arc thread=1 sequence=8
archived log file name=/u01/app/oracle/fast_recovery_area/ORCL/archivelog/2016_09_10/o1_mf_1_9_cx7q4fjf_.arc thread=1 sequence=9
media recovery complete, elapsed time: 00:00:02
Finished recover at 10-SEP-16

RMAN> alter database open resetlogs;

database opened


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值