Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

flashback database syntax question

EdStevensMay 18 2010 — edited May 30 2010
Oracle EE 10.2.0.4 on OEL 5

This should be an easy syntax issue, right?

Practicing some flashback scenarios, and looking at the syntax at
http://download.oracle.com/docs/cd/B19306_01/backup.102/b14194/rcmsynta032.htm#sthref515

In the examples, they show a
RMAN> FLASHBACK DATABASE TO TIMESTAMP
   TO_TIMESTAMP('2002-03-11 16:00:00', 'YYYY-MM-DD HH24:MI:SS');
but the actual syntax flow chart does not show a "TO TIMESTAMP" option, just "TO TIME" and "TO BEFORE TIME".

Pressing on, let's try a simple test
RMAN> flashback database to time = '18-MAY-2010 12:50:00';

Starting flashback at 18-MAY-2010 13:10:00
using channel ORA_DISK_1

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of flashback command at 05/18/2010 13:10:00
ORA-01830: date format picture ends before converting entire input string
Hmm, okay, so what format does it want? It actually reported back in two different formats:
Starting flashback at 18-MAY-2010 13:10:00
and
RMAN-03002: failure of flashback command at 05/18/2010 13:10:00
So pressing on some more, let's try what should be a no-brainer:
RMAN> flashback database to time = to_date('05/18/2010 12:50:00','mm/dd/yyyy hh24:mi:ss')

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "identifier": expecting one of: "double-quoted-string, single-quoted-string"
RMAN-01008: the bad identifier was: to_date
RMAN-01007: at line 1 column 30 file: standard input


RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "(": expecting one of: "allocate, alter, backup, beginline, blockrecover, catalog, change, connect, copy, convert, create, crosscheck, configure, duplicate, debug, delete, drop, exit, endinline, flashback, host, {, library, list, mount, open, print, quit, recover, register, release, replace, report, renormalize, reset, restore, resync, rman, run, rpctest, set, setlimit, sql, switch, spool, startup, shutdown, send, show, test, transport, upgrade, unregister, validate"
RMAN-01007: at line 1 column 37 file: standard input

RMAN>
Casting about the docs and other web resources, I find several variants on the theme but all end up throwing one of the above errors.

I can't believe I've been reduced to asking what should be a doc question, but in this case it's the examples from the docs that are throwing the errors .... Am I going blind? Was the brain cell killed by that beer I had last week the critical one? ;-)
This post has been answered by Pierre Forstmann on May 18 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 27 2010
Added on May 18 2010
8 comments
4,310 views