请用java调用ajax请求 实现这样的功能:设置一个时间点,找到这个时间点之后的某个文件夹下所有新增和被

用java遍历某个文件夹,如何寻找最后修改日期是前一天的文件?_百度知道
用java遍历某个文件夹,如何寻找最后修改日期是前一天的文件?
自己动手帮你写了一个,楼上的写得不够好,原因是,没有充分考虑时间间隔,还有写法不专业package com.import java.io.Fimport java.text.SimpleDateFimport java.util.ArrayLimport java.util.Cimport java.util.Dimport java.util.Lpublic class Modify {
private S private List&File& files = new ArrayList&File&(); private Integer dateInterval = 2; private final SimpleDateFormat dateFormat = new SimpleDateFormat(&yyyy-MM-dd&);public void findFilesModifyAtYesterday() {
File file = new File(path);
isDirectory(file);
iterator(file); }
private void isDirectory(File file) {
if (!file.isDirectory()) {
throw new RuntimeException(&Path[&+ path +&] is not a directory&);
private void iterator(File file) {
if (file.isDirectory()) {
File[] listFiles = file.listFiles();
for (File f : listFiles) {
iterator(f);
} else if(checkInterval(file)) {
files.add(file);
private boolean checkInterval(File file) {
Calendar last = Calendar.getInstance();
last.setTime(new Date(file.lastModified()));
cleanTime(last);
Calendar today = Calendar.getInstance();
addInterval(today);
pareTo(today) == 1; }
private void cleanTime(Calendar calendar) {
calendar.set(Calendar.HOUR_OF_DAY, 0);
calendar.set(Calendar.MINUTE, 0);
calendar.set(Calendar.SECOND, 0); }
private void addInterval(Calendar calendar) {
calendar.set(Calendar.DAY_OF_YEAR, calendar.get(Calendar.DAY_OF_YEAR) - dateInterval);
cleanTime(calendar); }
private String lastModified(long time) {
return dateFormat.format(new Date(time)); } public static void main(String[] args) {
Modify modify = new Modify();
modify.setPath(&E:\\学习资料\\书&);
modify.setDateInterval(2);
modify.findFilesModifyAtYesterday();
List&File& files = modify.result();
System.out.println(&Today:& + modify.dateFormat.format(new Date()) + & | Count:& + files.size());
for (File file : files) {
System.out.println(&[File]& + modify.lastModified(file.lastModified())
+ & - & + file.getPath());
} }/**
* 设置间隔日期,默认2天
* @param dateInterval
*/ public void setDateInterval(Integer dateInterval) {
this.dateInterval = dateI } /**
* 设置文件夹路径
* @param path
*/ public void setPath(String path) {
this.path = } /**
* 获取所有结果
*/ public List&File& result() {
其他类似问题
为您推荐:
import java.io.F
import java.text.SimpleDateF
import java.util.ArrayL
import java.util.D
import java.util.I
import java.util.L
public class Test {
* @param args
public static void main(String[] args) {
//设置日期转换格式
SimpleDateFormat smp = new SimpleDateFormat(&yyyyMMdd&);
//设置一个list,存放符合要求的文件名
List&String& list = new ArrayList&String&();
Date date = new Date();
//System.out.println(smp.format(date));
//定义当前时间
int now_time= Integer.parseInt(smp.format(date));
String path = &D:/&;
File file = new File(path);
//定义文件修改时间
int modify_time=0;
文件File类有个lastModified()方法,返回文件最近修改日期,你取到这个日期和当前日期进行比较,比较是用Calendar类,判断两个日期的差值,符合你要求的就显示不符合的就跳过。
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁按时间点恢复 - 推酷
按时间点恢复
按时间点恢复数据库按时间点恢复,可以从要恢复的目标时间之前的备份中还的数据库,然后使用增量备份和重做日志来将数据库前滚到目标时间点,按时间点恢复也叫不完全恢复因为不使用所有的日志或者不完全恢复对数据库的所有改变。
数据库按时间点恢复所要满足的条件
1.数据库必须运行在archivelog模式下
2.必须要有恢复目标时间点之前所有数据文件的备份和在备份SCN与目标SCN之间所有的归档重做日志
每次以resetlogs选项打开数据库时一个新的数据库incarnation就会被创建。执行open resetlogs操作时就会对当前的联机重做日志文件进行归档。incarnation会将重做日志序列号设置为1,并且指联机重做日志一个新的时间戳。它也会增加incarnation的序号,它被用来唯一标记和识另重做日志流。
incarnation可能存在的几种关系1.current incarnation是由那个incarnation执行open resetlog操作产生的,那个incarnation就是current incarnation的parent incarnation
2.parent incarnation和它parent incarnation的incarnation就叫作current incarnation的ancestor incarnations
3.如果两个incarnation共享相同的ancestor那么它们就是sibling incarnations
SQL& select * from v$database_
INCARNATION# RESETLOGS_CHANGE# RESETLOGS_TI PRIOR_RESETLOGS_CHANGE# PRIOR_RESETL STATUS
RESETLOGS_ID PRIOR_INCARNATION# FLASHBACK_DATABASE_ALLOWED
------------ ----------------- ------------ ----------------------- ------------ ------- ------------ ------------------ --------------------------
1 30-JUN-05
1 30-JUN-05
10 -FEB-15
11 -FEB-15
11 rows selected.
List of Database Incarnations
Inc Key DB Name
Reset Time
------- ------- -------- ---------------- --- ---------- ----------
CURRENT 3114664
要执行按时间点恢复需要准备好以下两个条件:1.决定要恢复到的目标时间,SCN,还原点或者日志序列号。闪回查询,闪回版本查询和闪回事务查询可能帮助你来识别逻辑错误。也可以检查alert.log的信息来帮助你判断恢复的目标时间点。另外也可以判断包含目标SCN的日志序列号然后通过日志进行恢复。例如,查询v$log_history来查看已经归档的日志信息。
SQL& select * from v$log_
SEQUENCE# FIRST_CHANGE# FIRST_TIME
NEXT_CHANGE# RESETLOGS_CHANGE# RESETLOGS_TI
---------- ---------- ---------- ---------- ------------- ------------ ------------ ----------------- ------------
例如,如果你发在上午10点1分一个用户意外删除了一个表空间,那么可以将数据库恢复到上午10点,就是在删除表空间前的时间点。在恢复之后在上午10点之后的所有改变都会丢失.
2.如果使用目标时间表达式代替目标SCN,那么在使用RMAN之前要确保时间格式的环境变量设置合适。
NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
NLS_DATE_FORMAT=’YYYY-MM-DD HH24:MI:SS’
使用current incarnation来执行按时间点恢复使用current incarnation执行按时间点恢复时是使用的当前版本的控制文件。当执行按时间点恢复时,可以使用set until命令来设置恢复的目标时间,而不用对restotre和recover命令单独设置until子句从而避免出错。这能确保从备份中还原的数据文件的时间戳早于后续的recover操作。
按时间点恢复的过程如下:我们把scott用户下的表emp中的所有记录删除,并且在删除之前记录了当前系统的SCN,然后执行按时间点恢复来恢复表中的记录。
SQL& select current_scn from v$
CURRENT_SCN
-----------
SQL& select to_char(scn_to_timestamp(3142264),'yyyy-mm-dd hh24:mi:ss')
TO_CHAR(SCN_TO_TIME
-------------------
select * from v$
SEQUENCE# BYTES
MEMBERS ARC STATUS
FIRST_CHANGE# FIRST_TIME
---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- ------------
1 YES INACTIVE
1 YES INACTIVE
SQL& select *
EMPNO ENAME JOB
MGR HIREDATE
---------- ---------- --------- ---------- ------------ ---------- ---------- ----------
7369 SMITH CLERK
7902 17-DEC-80
7499 ALLEN SALESMAN
7698 20-FEB-81
7698 22-FEB-81
7566 JONES MANAGER
7839 02-APR-81
7654 MARTIN
7698 28-SEP-81
7698 BLAKE MANAGER
7839 01-MAY-81
7782 CLARK MANAGER
7839 09-JUN-81
7788 SCOTT ANALYST
7566 19-APR-87
7844 TURNER
7698 08-SEP-81
7876 ADAMS CLERK
7788 23-MAY-87
7900 JAMES CLERK
7698 03-DEC-81
7566 03-DEC-81
7934 MILLER
7782 23-JAN-82
14 rows selected.
14 rows deleted.
Commit complete.
SQL& select *
no rows selected
1.连接到目标数据库或恢复目录(如果有),将数据库启动到mount状态:
[oracle@oracle11g ~]$ rman target/
Recovery Manager: Release 10.2.0.5.0 - Production on Wed Feb 4 10:25:34 2015
Copyright (c) , Oracle.
All rights reserved.
connected to target database (not started)
RMAN& startup mount
Oracle instance started
database mounted
Total System Global Area
Fixed Size
1273516 bytes
Variable Size
Database Buffers
Redo Buffers
2920448 bytes
2.运行RUN块来执行按时间点恢复。在RUN块中使用set until来指定恢复的目标时间,还原点,SCN或日志序列号。如果指定的是目标时间,那么使用NLS_LANG和NLS_DATE_FORMAT环境变量所指定的格式。如果自动通道没有配置,那么要为访问的磁盘或磁带分配通道。
set until scn 3142264;
executing command: SET until clause
Starting restore at 04-FEB-15
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=157 devtype=DISK
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/app/oracle/oradata/test/system01.dbf
restoring datafile 00002 to /u01/app/oracle/oradata/test/undotbs01.dbf
restoring datafile 00003 to /u01/app/oracle/oradata/test/sysaux01.dbf
restoring datafile 00004 to /u01/app/oracle/oradata/test/users01.dbf
restoring datafile 00005 to /u01/app/oracle/oradata/test/example01.dbf
restoring datafile 00006 to /u01/app/oracle/oradata/test/test01.dbf
restoring datafile 00007 to /u01/app/oracle/oradata/test/testbak.dbf
channel ORA_DISK_1: reading from backup piece /u02/test_df_s135_s1
channel ORA_DISK_1: restored backup piece 1
piece handle=/u02/test_df_s135_s1 tag=TAG943
channel ORA_DISK_1: restore complete, elapsed time: 00:02:29
Finished restore at 04-FEB-15
Starting recover at 04-FEB-15
using channel ORA_DISK_1
starting media recovery
media recovery complete, elapsed time: 00:00:02
Finished recover at 04-FEB-15
从alert日志文件中可以看到如下信息:
The input backup piece /u02/test_df_s135_s1 is in compressed format.
Full restore complete of datafile 6 /u01/app/oracle/oradata/test/test01.dbf.
Elapsed time: 0:00:01
checkpoint is 3142189
Full restore complete of datafile 7 /u01/app/oracle/oradata/test/testbak.dbf.
Elapsed time: 0:00:06
checkpoint is 3142189
Full restore complete of datafile 4 /u01/app/oracle/oradata/test/users01.dbf.
Elapsed time: 0:00:09
checkpoint is 3142189
last deallocation scn is 3111848
Wed Feb 04 11:25:47 CST 2015
Full restore complete of datafile 2 /u01/app/oracle/oradata/test/undotbs01.dbf.
Elapsed time: 0:00:37
checkpoint is 3142189
last deallocation scn is 3106509
Wed Feb 04 11:25:58 CST 2015
Full restore complete of datafile 5 /u01/app/oracle/oradata/test/example01.dbf.
Elapsed time: 0:00:46
checkpoint is 3142189
last deallocation scn is 2526488
Wed Feb 04 11:26:57 CST 2015
Full restore complete of datafile 3 /u01/app/oracle/oradata/test/sysaux01.dbf.
Elapsed time: 0:01:47
checkpoint is 3142189
last deallocation scn is 3099893
Wed Feb 04 11:27:32 CST 2015
Full restore complete of datafile 1 /u01/app/oracle/oradata/test/system01.dbf.
Elapsed time: 0:02:20
checkpoint is 3142189
last deallocation scn is 3101877
Wed Feb 04 11:27:39 CST 2015
alter database recover datafile list clear
Wed Feb 04 11:27:39 CST 2015
Completed: alter database recover datafile list clear
Wed Feb 04 11:27:39 CST 2015
alter database recover datafile list
1 , 2 , 3 , 4 , 5 , 6 , 7
Completed: alter database recover datafile list
1 , 2 , 3 , 4 , 5 , 6 , 7
Wed Feb 04 11:27:39 CST 2015
alter database recover if needed
start until change 3142264
Media Recovery Start
Wed Feb 04 11:27:40 CST 2015
Recovery of Online Redo Log: Thread 1 Group 3 Seq 3 Reading mem 0
Mem# 0: /u01/app/oracle/oradata/test/redo03.log
Wed Feb 04 11:27:40 CST 2015
Recovery of Online Redo Log: Thread 1 Group 1 Seq 4 Reading mem 0
Mem# 0: /u01/app/oracle/oradata/test/redo01.log
Wed Feb 04 11:27:40 CST 2015
Incomplete Recovery applied until change 3142277
Wed Feb 04 11:27:40 CST 2015
Media Recovery Complete (test)
Completed: alter database recover if needed
start until change 3142264
从上面的恢复过程可以看到,首先从备份中还原数据文件,各个数据文件的checkpoint scn是3142189比我们的恢复目标SCN小,然后应用重做日志文件将数据库恢复到目标SCN所对应的时间点。
set until还可以使用时间表达式,还原点或者日志序列事情作为它的恢复目标时间点
set until time ‘ 11:22:29′;
set until sequence 4;
set until restore point before_
如果按时间点恢复成功。可以以只读方式打开数据库来检查表emp的数据是否恢复回来了。如果表emp的记录没有恢复回来,可能我们选错了恢复目标SCN。在这种情况下,可以使用新的恢复目标SCN然后重新执行按时间点恢复。
RMAN& sql 'alter database open read only';
sql statement: alter database open read only
SQL& select *
EMPNO ENAME JOB
MGR HIREDATE
---------- ---------- --------- ---------- ------------ ---------- ---------- ----------
7369 SMITH CLERK
7902 17-DEC-80
7499 ALLEN SALESMAN
7698 20-FEB-81
7698 22-FEB-81
7566 JONES MANAGER
7839 02-APR-81
7654 MARTIN
7698 28-SEP-81
7698 BLAKE MANAGER
7839 01-MAY-81
7782 CLARK MANAGER
7839 09-JUN-81
7788 SCOTT ANALYST
7566 19-APR-87
7844 TURNER
7698 08-SEP-81
7876 ADAMS CLERK
7788 23-MAY-87
7900 JAMES CLERK
7698 03-DEC-81
7566 03-DEC-81
7934 MILLER
7782 23-JAN-82
14 rows selected.
从上面的结果可知表emp的记录通过按时间点恢复已经找回来了。
如果按时间点恢复经过验证后达到了恢复目标,可以有如下选择:1.使用oracle导出工具将恢复的表emp进行逻辑导出。然后将数据库恢复到当前时间点后,再导入导出的数据。这样在不会丢失数据库的其它改变而又恢复了表emp的数据。
2.以读写方式打开数据库,这样在恢复目标SCN之后的所有改变将会丢失。当前的联机重做日志文件会被归档,日志序列号会被设置为1,并且所有的联机重做日志会被指定新的时间戳和SCN。
RMAN& alter dat
database opened
使用ancestor incarnation执行按时间点恢复使用ancestor incarnation执行按时间点恢复与使用current incarnation的不同之处在于需要设置数据库的incarnation.并且必须从包含恢复目标SCN的incarnation中还原控制文件。
不使用recover catalog的情况比如我们要将数据库恢复到scott用户的emp表被删除之后的时间点,对older incarnation执行按时间点恢复的过程如下:
1.判断要使用的incarnation。可以使用list incarnation命令来找到恢复目标时间所对应的incarnation
List of Database Incarnations
Inc Key DB Name
Reset Time
------- ------- -------- ---------------- --- ---------- ----------
CURRENT 3144537
当前的incarnation的Inc Key为14.通过下面的查询可以找到它之前的incarnation的Inc Key为13:
SQL& select prior_incarnation# from v$database_incarnation where status ='CURRENT';
PRIOR_INCARNATION#
------------------
2.将数据库启动到mount状态
RMAN& startup
Oracle instance started
database mounted
Total System Global Area
Fixed Size
1273516 bytes
Variable Size
Database Buffers
Redo Buffers
2920448 bytes
3.将数据库test的incarnation设置为incarnation号为13,也就是current incarnation的parent incarnation。
RMAN& reset database to incarnation 13;
database reset to incarnation 13
4.执行还原与恢复,设置恢复目标时间,如果没有配置相关通道设置通道。将数据库恢复到表emp删除之后的时间点( 13:30:01):
3& set until time ' 13:30:01';
executing command: SET until clause
Starting restore at
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/app/oracle/oradata/test/system01.dbf
restoring datafile 00002 to /u01/app/oracle/oradata/test/undotbs01.dbf
restoring datafile 00003 to /u01/app/oracle/oradata/test/sysaux01.dbf
restoring datafile 00004 to /u01/app/oracle/oradata/test/users01.dbf
restoring datafile 00005 to /u01/app/oracle/oradata/test/example01.dbf
restoring datafile 00006 to /u01/app/oracle/oradata/test/test01.dbf
restoring datafile 00007 to /u01/app/oracle/oradata/test/testbak.dbf
channel ORA_DISK_1: reading from backup piece /u02/test_df_s135_s1
channel ORA_DISK_1: restored backup piece 1
piece handle=/u02/test_df_s135_s1 tag=TAG943
channel ORA_DISK_1: restore complete, elapsed time: 00:02:37
Finished restore at
Starting recover at
using channel ORA_DISK_1
starting media recovery
archive log thread 1 sequence 3 is already on disk as file /u02/1_3_.dbf
archive log thread 1 sequence 4 is already on disk as file /u02/1_4_.dbf
archive log thread 1 sequence 1 is already on disk as file /u02/1_1_.dbf
archive log filename=/u02/1_3_.dbf thread=1 sequence=3
archive log filename=/u02/1_4_.dbf thread=1 sequence=4
archive log filename=/u02/1_1_.dbf thread=1 sequence=1
archive log filename=/u02/1_1_.dbf thread=1 sequence=1
media recovery complete, elapsed time: 00:00:03
Finished recover at
RMAN& alter dat
database opened
List of Database Incarnations
Inc Key DB Name
Reset Time
------- ------- -------- ---------------- --- ---------- ----------
CURRENT 3144674
使用recover catalog的情况比如我们要将数据库恢复到scott用户的emp表被删除之后的时间点,对older incarnation执行按时间点恢复的过程如下:
1.判断要使用的incarnation。可以使用list incarnation命令来找到恢复目标时间所对应的incarnation
List of Database Incarnations
Inc Key DB Name
Reset Time
------- ------- -------- ---------------- --- ---------- ----------
CURRENT 415481
当前的incarnation的Inc Key为188.通过下面的查询可以找到它之前的incarnation的Inc Key为102:我们将数据库恢复到 18:22:30,也就是在SCN:415176和SCN:415481之间。
RMAN& list b
List of Backup Sets
===================
Type LV Size
Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------
DISK 00:00:01
BP Key: 77
Status: AVAILABLE
Compressed: NO
Tag: TAG137
Piece Name: /u01/app/oracle/flash_recovery_area/TEST/autobackup//o1_mf_s__bf3w2t62_.bkp
Control File Included: Ckp SCN: 415111
Type LV Size
Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------
DISK 00:00:02
BP Key: 144
Status: AVAILABLE
Compressed: NO
Tag: TAG243
Piece Name: /u01/app/oracle/flash_recovery_area/TEST/autobackup//o1_mf_s__bf3wqnyv_.bkp
Control File Included: Ckp SCN: 415288
Type LV Size
Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------
DISK 00:00:03
BP Key: 242
Status: AVAILABLE
Compressed: NO
Tag: TAG336
Piece Name: /u01/app/oracle/flash_recovery_area/TEST/autobackup//o1_mf_s__bf3xd2wl_.bkp
Control File Included: Ckp SCN: 415765
从上面的控制文件备份信息可以看到要恢复到 18:22:30这个时间点应该使用控制文件备份是o1_mf_s__bf3wqnyv_.bkp
2.将数据库强制启动到nomount状态
RMAN& startup force nomount
Oracle instance started
Total System Global Area
Fixed Size
1273516 bytes
Variable Size
Database Buffers
Redo Buffers
2920448 bytes
3.将数据库test的incarnation设置为incarnation号为102,也就是current incarnation的parent incarnation。
RMAN& reset database to incarnation 102;
database reset to incarnation 102
List of Database Incarnations
Inc Key DB Name
Reset Time
------- ------- -------- ---------------- --- ---------- ----------
CURRENT 415176
4.执行还原与恢复,设置恢复目标时间,如果没有配置相关通道设置通道。还原控制文件,将数据库恢复到表emp删除之后的时间点( 18:22:30):
Starting restore at
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: reading from backup piece /u01/app/oracle/flash_recovery_area/TEST/autobackup//o1_mf_s__bf3wqnyv_.bkp
channel ORA_DISK_1: restored backup piece 1
piece handle=/u01/app/oracle/flash_recovery_area/TEST/autobackup//o1_mf_s__bf3wqnyv_.bkp tag=TAG243
channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
output filename=/u01/app/oracle/oradata/test/control01.ctl
output filename=/u01/app/oracle/oradata/test/control02.ctl
output filename=/u01/app/oracle/oradata/test/control03.ctl
Finished restore at
database mounted
released channel: ORA_DISK_1
RMAN& restore database until time ' 18:22:30';
Starting restore at
Starting implicit crosscheck backup at
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK
Crosschecked 4 objects
Finished implicit crosscheck backup at
Starting implicit crosscheck copy at
using channel ORA_DISK_1
Finished implicit crosscheck copy at
searching for all files in the recovery area
cataloging files...
cataloging done
List of Cataloged Files
=======================
File Name: /u01/app/oracle/flash_recovery_area/TEST/autobackup//o1_mf_s__bf3wqnyv_.bkp
File Name: /u01/app/oracle/flash_recovery_area/TEST/autobackup//o1_mf_s__bf3xd2wl_.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/app/oracle/oradata/test/system01.dbf
restoring datafile 00002 to /u01/app/oracle/oradata/test/undotbs01.dbf
restoring datafile 00003 to /u01/app/oracle/oradata/test/sysaux01.dbf
restoring datafile 00004 to /u01/app/oracle/oradata/test/users01.dbf
restoring datafile 00005 to /u01/app/oracle/oradata/test/example01.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/oracle/flash_recovery_area/TEST/backupset//o1_mf_nnndf_TAG037_bf3w0y1f_.bkp
channel ORA_DISK_1: restored backup piece 1
piece handle=/u01/app/oracle/flash_recovery_area/TEST/backupset//o1_mf_nnndf_TAG037_bf3w0y1f_.bkp tag=TAG037
channel ORA_DISK_1: restore complete, elapsed time: 00:01:15
Finished restore at
将数据文件还原到 18:22:30这个时间点,下面执行恢复,要注意的是在执行恢复操作之前还需要执行reset database to incarnation 102否则会报错:
RMAN& recover database until time ' 18:22:30';
Starting recover at
using channel ORA_DISK_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 02/04/:05
RMAN-06004: ORACLE error from recovery catalog database: RMAN-20011: target database incarnation is not current in recovery catalog
再次执行 reset database to incarnation 102;
RMAN& reset database to incarnation 102;
database reset to incarnation 102
RMAN& recover database until time ' 18:22:30';
Starting recover at
using channel ORA_DISK_1
starting media recovery
archive log thread 1 sequence 3 is already on disk as file /u02/1_3_.dbf
archive log thread 1 sequence 4 is already on disk as file /u02/1_4_.dbf
archive log thread 1 sequence 1 is already on disk as file /u02/1_1_.dbf
archive log filename=/u02/1_3_.dbf thread=1 sequence=3
archive log filename=/u02/1_4_.dbf thread=1 sequence=4
archive log filename=/u02/1_1_.dbf thread=1 sequence=1
media recovery complete, elapsed time: 00:00:01
Finished recover at
RMAN& alter dat
database opened
new incarnation of database registered in recovery catalog
starting full resync of recovery catalog
full resync complete
List of Database Incarnations
Inc Key DB Name
Reset Time
------- ------- -------- ---------------- --- ---------- ----------
CURRENT 415183
可以看到恢复完成之后当前的incarnation对应的reset scn号在5481之间,达到了我们所期待的结果。
已发表评论数()
已收藏到推刊!
请填写推刊名
描述不能大于100个字符!
权限设置: 公开
仅自己可见
正文不准确
标题不准确
排版有问题
没有分页内容
图片无法显示
视频无法显示
与原文不一致

我要回帖

更多关于 java调用ajax请求 的文章

 

随机推荐