ORA-01861: literal does not match format string
When trying to restore a database to a spesific date, if you’re having an error like this:
RMAN> run {
1> ALLOCATE CHANNEL chtape TYPE ‘SBT_TAPE’;
2> set until time ’2008-11-05:14:30:00′;
3> SEND ‘NB_ORA_CLIENT=realdb_host,NB_ORA_POLICY=rman_realdb,NB_ORA_SERV=veritas,NB_ORA_SCHED=Default-Application-Backup’;
4> RESTORE CONTROLFILE;
5> RELEASE CHANNEL chtape;
6> }
allocated channel: chtape
channel chtape: sid=1014 devtype=SBT_TAPE
channel chtape: Veritas NetBackup for Oracle – Release 6.5 (2008052301)
executing command: SET until clause
released channel: chtape
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of set command at 01/06/2009 15:07:58
ORA-01861: literal does not match format string
This can be caused by your date format. Set your NLS date format accordingly and retry your restore procedure.
/home/oracle> export NLS_DATE_FORMAT=”YYYY-MM-DD:HH24:MI:SS”
RMAN> run {
1> ALLOCATE CHANNEL chtape TYPE ‘SBT_TAPE’;
2> set until time ’2009-01-05:14:30:00′;
3> SEND ‘NB_ORA_CLIENT=realdb_host,NB_ORA_POLICY=rman_realdb,NB_ORA_SERV=veritas,NB_ORA_SCHED=Default-Application-Backup’;
3> RESTORE CONTROLFILE;
4> RELEASE CHANNEL chtape;
5> }
allocated channel: chtape
channel chtape: sid=1014 devtype=SBT_TAPE
channel chtape: Veritas NetBackup for Oracle – Release 6.5 (2008052301)
executing command: SET until clause