求个基于RMAN 归档模式下的恢复 本人在linux +oracle10g下使用RMAN 归档模式下备份都可以 但是恢复的时候删除的数据还是恢复不了 求教 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 做个基于时间点的恢复,恢复到你删除数据之前:recover database until time '2009-03-25 19:00:00'; 在做这个 但是时间格式有问题 export NLS_DATE_FORMAT='yyyy-mm-dd hh24:mi:ss' 这个后recover database until time '2009-03-25 19:00:00'; 还是提示时间格式错误 先export NLS_DATE_FORMAT='yyyy-mm-dd hh24:mi:ss'然后再rman target / 1 设置归档 SQL> alter system switch logfile; System altered. 2 全库备份 [oracle@oracle10test 10g]$ rman target /Recovery Manager: Release 10.2.0.1.0 - Production on Fri Mar 27 15:44:09 2009Copyright (c) 1982, 2005, Oracle. All rights reserved.connected to target database: DAQI (DBID=3260011850)RMAN> connect catalog rman/rman ;connected to recovery catalog databaseRMAN> backup format '/u01/10g/full_%T' database;Starting backup at 2009-03-27 15:44:48new incarnation of database registered in recovery catalogstarting full resync of recovery catalogfull resync completeallocated channel: ORA_DISK_1channel ORA_DISK_1: sid=140 devtype=DISKchannel ORA_DISK_1: starting full datafile backupsetchannel ORA_DISK_1: specifying datafile(s) in backupsetinput datafile fno=00006 name=/u01/10g/oradata/daqi/rman_test.dbfinput datafile fno=00005 name=/u01/10g/oradata/daqi/arjserver.dbfinput datafile fno=00001 name=/u01/10g/oradata/daqi/system01.dbfinput datafile fno=00003 name=/u01/10g/oradata/daqi/sysaux01.dbfinput datafile fno=00002 name=/u01/10g/oradata/daqi/undotbs01.dbfinput datafile fno=00004 name=/u01/10g/oradata/daqi/users01.dbfchannel ORA_DISK_1: starting piece 1 at 2009-03-27 15:44:54 3 随便删除一些测试数据 4 恢复文件 RMAN> shutdown immediate; database closed database dismounted Oracle instance shut down quit [oracle@oracle10test u01]$ rman target / Recovery Manager: Release 10.2.0.1.0 - Production on Thu Mar 26 15:46:39 2009 Copyright (c) 1982, 2005, Oracle. All rights reserved. connected to target database (not started) RMAN> startup mount; Oracle instance started RMAN> restore database; Starting restore at 27-MAR-09 using target database control file instead of recovery catalog 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/10g/oradata/arjtest/system01.dbf restoring datafile 00002 to /u01/10g/oradata/arjtest/undotbs01.dbf restoring datafile 00003 to /u01/10g/oradata/arjtest/sysaux01.dbf restoring datafile 00004 to /u01/10g/oradata/arjtest/users01.dbf restoring datafile 00005 to /u01/10g/oradata/arjtest/arjserver_tabledb.dbf restoring datafile 00006 to /u01/10g/oradata/arjtest/arjserver_object.dbf restoring datafile 00007 to /u01/10g/oradata/arjtest/rman_test.dbf channel ORA_DISK_1: reading from backup piece /u01/10g/full_20090326 channel ORA_DISK_1: restored backup piece 1 piece handle=/u01/10g/full_20090326 tag=TAG20090326T151025 channel ORA_DISK_1: restore complete, elapsed time: 00:02:19 Finished restore at 26-MAR-09 RMAN> recover database; Starting recover at 27-MAR-09 using channel ORA_DISK_1 starting media recovery media recovery complete, elapsed time: 00:00:03 Finished recover at 27-MAR-09 RMAN> alter database open; 打开查看数据发现删除数据还是没恢复 要是误删了表的数据,那么基于时间点恢复要是操作系统下误删了数据文件或日志文件,不能startup数据库按3楼老大的办法来 2楼的朋友用基于时间点的恢复是老是说格式不匹配 但是已经export NLS_DATE_FORMAT='yyyy-mm-dd hh24:mi:ss' 还是报这个错 很郁闷using channel ORA_DISK_1RMAN-00571: ===========================================================RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============RMAN-00571: ===========================================================RMAN-03002: failure of recover command at 03/27/2009 15:53:38ORA-01861: literal does not match format string3楼的朋友 强制归档是怎么弄 ? 我的操作过程已经贴出来拉 格式不匹配的问题:...until time '2009-03-25 19:00:00'改为...until time "to_date('2009-03-25 19:00:00','yyyy-mm-dd hh24:mi:ss')" 我指的强制归档,是指你在commit数据以后,再手动做一次日志切换,这样的话稍过一会儿等checkpoint完成以后,dirty block 写入disk.你再做备份,然后再删除数据做恢复测试.明白我的意思吧. 在PL/SQL Developer中为啥看不到自己建的表呢? pl/sql 报01722 无效的数字,怎么解决? MySql 如何对Date进行求和 杠杠新的新手! 关于ORACEL的序列问题,急死我了!!!!!! sql语句,高手快来拿分 REDHAT9下安装ORACLE9i,内存为256机子的可以一试么? 请问什么地方有linux 下 oracle 9 的c 语言的API 库下载 什么错误啊 大神们求解答 oracle如何来做识别是否要做统计更新,如何来做统计更新 海量数据查询问题 查询ORACLE中所有表的字段信息、注释、主外键
recover database until time '2009-03-25 19:00:00'; 还是提示时间格式错误
export NLS_DATE_FORMAT='yyyy-mm-dd hh24:mi:ss'然后再
rman target /
SQL> alter system switch logfile;
System altered.
2 全库备份
[oracle@oracle10test 10g]$ rman target /Recovery Manager: Release 10.2.0.1.0 - Production on Fri Mar 27 15:44:09 2009Copyright (c) 1982, 2005, Oracle. All rights reserved.connected to target database: DAQI (DBID=3260011850)RMAN> connect catalog rman/rman ;connected to recovery catalog databaseRMAN> backup format '/u01/10g/full_%T' database;Starting backup at 2009-03-27 15:44:48
new incarnation of database registered in recovery catalog
starting full resync of recovery catalog
full resync complete
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=140 devtype=DISK
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00006 name=/u01/10g/oradata/daqi/rman_test.dbf
input datafile fno=00005 name=/u01/10g/oradata/daqi/arjserver.dbf
input datafile fno=00001 name=/u01/10g/oradata/daqi/system01.dbf
input datafile fno=00003 name=/u01/10g/oradata/daqi/sysaux01.dbf
input datafile fno=00002 name=/u01/10g/oradata/daqi/undotbs01.dbf
input datafile fno=00004 name=/u01/10g/oradata/daqi/users01.dbf
channel ORA_DISK_1: starting piece 1 at 2009-03-27 15:44:54 3 随便删除一些测试数据
4 恢复文件
RMAN> shutdown immediate;
database closed
database dismounted
Oracle instance shut down
quit
[oracle@oracle10test u01]$ rman target /
Recovery Manager: Release 10.2.0.1.0 - Production on Thu Mar 26 15:46:39 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database (not started)
RMAN> startup mount;
Oracle instance started
RMAN> restore database; Starting restore at 27-MAR-09
using target database control file instead of recovery catalog
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/10g/oradata/arjtest/system01.dbf
restoring datafile 00002 to /u01/10g/oradata/arjtest/undotbs01.dbf
restoring datafile 00003 to /u01/10g/oradata/arjtest/sysaux01.dbf
restoring datafile 00004 to /u01/10g/oradata/arjtest/users01.dbf
restoring datafile 00005 to /u01/10g/oradata/arjtest/arjserver_tabledb.dbf
restoring datafile 00006 to /u01/10g/oradata/arjtest/arjserver_object.dbf
restoring datafile 00007 to /u01/10g/oradata/arjtest/rman_test.dbf
channel ORA_DISK_1: reading from backup piece /u01/10g/full_20090326
channel ORA_DISK_1: restored backup piece 1
piece handle=/u01/10g/full_20090326 tag=TAG20090326T151025
channel ORA_DISK_1: restore complete, elapsed time: 00:02:19
Finished restore at 26-MAR-09 RMAN> recover database; Starting recover at 27-MAR-09
using channel ORA_DISK_1 starting media recovery
media recovery complete, elapsed time: 00:00:03 Finished recover at 27-MAR-09
RMAN> alter database open; 打开查看数据发现删除数据还是没恢复
按3楼老大的办法来
2楼的朋友
用基于时间点的恢复是老是说格式不匹配 但是已经
export NLS_DATE_FORMAT='yyyy-mm-dd hh24:mi:ss'
还是报这个错 很郁闷
using channel ORA_DISK_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 03/27/2009 15:53:38
ORA-01861: literal does not match format string3楼的朋友
强制归档是怎么弄 ? 我的操作过程已经贴出来拉
...until time '2009-03-25 19:00:00'
改为
...until time "to_date('2009-03-25 19:00:00','yyyy-mm-dd hh24:mi:ss')"