Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

recover database until time error 1

Status
Not open for further replies.

dbstudent

Programmer
Feb 14, 2006
26
US
Am trying to recover my database to a point in time.I have used different time format combinations and still got an error. This is an oracle9i ver:9.2 on window operating system. What is the right time format?


RMAN> recover database until time 'feb 18 20:31:38 2006';

Starting recover at 18-FEB-06
using channel ORA_DISK_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 02/18/2006 21:20:26
ORA-01858: a non-numeric character was found where a numeric was expected

RMAN>
 
I tried your suggestion of RECOVER DATABASE UNTIL TIME 'YYYY-MM-DD:HH24:MI:SS'and got the same RMAN error code of RMAN-03002 but a different one for oracle ORA-01861 literal does match format string.
 
Student, you are plugging your 'actuals' into Dave's 'YYYY-MM-DD:HH24:MI:SS' aren't you? In other words, the actual string would be:

'2006-02-18:20:31:38'

Based on your example above. I have excluded the 24 in Dave's example since I don't think it's required if (as in this example) it's an explicit 24-hour clock time. I stand to be corrected, however!
 
Student,

just to be sure, you should do something like the following:-
Code:
startup mount;
restore database UNTIL TIME "TO_DATE('20/02/2006 09:38:00','DD/MM/YYYY HH24:MI:SS')";
recover database UNTIL TIME "TO_DATE('20/02/2006 09:38:00','DD/MM/YYYY HH24:MI:SS')";
alter database open resetlogs;
backup database plus archivelog;
restore database validate;

To explain a wee bit,
you need to have the db mounted (which it seems you've already done) and then you give a fully declared date/time as the UNTIL TIME. Note the use of double and single quotes in the syntax.
Because the RMAN cli has history (unlike SQL plus), once you've run the recover command, just press the up arrow, and edit the recover to be restore, so you don't have to do all that typing again.

You then need to do the reset logs to 'drop' the old incarnation of the db. It's vital that you immediately do another backup. As a matter of course, do a validate after the backup (Otherwise you might find out the hard way that your backup is SNAFU).

As an aside, I have been bitten on the bum by American date formats so many times, that now I always use a TO_DATE statement, to avoid that and any NLS_TERRITORY/NLS_LANG bloopers.

Please, please do keep us informed as to how you get on, as backups are absolutely vital to us all.

Regards

Tharg



Grinding away at things Oracular
 
Tharg, thanks for your help. It worked perfect.Like you, that's how am goint to handle them from now on. HOw do you handle the RESTORE DATABASE UNTIL CANCEL. How does one determine which log,thread or sequence to use? Thanks-
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top