基于时间点的恢复代码语法出错,错在那?
RMAN中执行
RMAN> run{
2> set until time "to_date('12/01/11 22:49:00','mm/dd/yy hh24:mi:ss')";
3> restore database;
4> recover database;
5> alter database open resetlogs;
6> };
--执行过程信息:
正在执行命令: SET until clause
启动 restore 于 01-12月-11
分配的通道: ORA_DISK_1
通道 ORA_DISK_1: SID=133 设备类型=DISK
分配的通道: ORA_DISK_2
通道 ORA_DISK_2: SID=10 设备类型=DISK
...................................
...................................
完成 restore 于 01-12月-11
启动 recover 于 01-12月-11
使用通道 ORA_DISK_1
使用通道 ORA_DISK_2
...................................
...................................
介质恢复完成, 用时: 00:00:29
完成 recover 于 01-12月-11
数据库已打开
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: 分析输入命令时出错
RMAN-01009: 语法错误: 找到 ";": 应为: "advise, allocate, alter, backup, @, catal
og, change, configure, connect, convert, copy, create, crosscheck, delete, drop,
duplicate, exit, flashback, grant, host, import, list, mount, open, print, quit
, recover, register, release, repair, replace, report, reset, restore, resync, r
evoke, run, send, set, show, shutdown, spool, sql, startup, switch, transport, u
nregister, upgrade, validate, {, " 中的一个
RMAN-01007: 在第 0 行第 2 列, 文件: standard input
------解决方案--------------------
提示的非常清楚:
应为...,即缺少相应的内容。
参考如下代码:
- SQL code
RMAN> run{2> allocate channel ch1 type disk;3> set until time "to_date('2008-06-12 11:28:59','YYYY-MM-DD hh24:mi:ss')";4> restore database;5> recover database;6> release channel ch1;7> }