Search

Join this Blog for direct reference of any post into your inbox. To join just click on "Join this Site" under "Follower" then Login with your Email.*** DECLARATION: I Maintain this Blog for Helping Myself While at Work and Welcome any body Needing Help!!!.*** CAUTION: Using any of the script from this Blog may contain at Own Risk. These scripts May or May not have been Tested.***

Wednesday, 16 May 2012

ORA-01861: literal does not match format string

While maintaining database, I came across a situation, where I found the command giving error.
   run {
  allocate channel p1 type disk;
  set until time = '2012-04-17:06:52:27';
  restore tablespace main_dbf;
  recover tablespace main_dbf;
  }
executing command: SET until clause released channel: p1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of set command at 04/17/2012 18:27:50
ORA-01861: literal does not match format string

RMAN> exit
Since i got the above error, i tried setting the env variable, but again there is some error.
C:\oracle1\bin>set NLS_DATE_FORMAT='YYYY-MM-DD:HH24:MI:SS'
C:\oracle1\bin>set NLS_LANG=american
C:\oracle1\bin>rman

Recovery Manager: Release 9.2.0.1.0 - Production
Copyright (c) 1995, 2002, Oracle Corporation.  All rights reserved.
RMAN> connect catalog rman/rman@shaan

RMAN-00571: =========================================
RMAN-00569: ============ERROR MESSAGE STACK FOLLOWS =======
RMAN-00571: =========================================
RMAN-04004: error from recovery catalog database: ORA-00604: error occurred at recursive SQL level 1
ORA-02248: invalid option for ALTER SESSION
RMAN> exit
Recovery Manager complete.
C:\oracle1\bin>set NLS_LANG
NLS_LANG=american
C:\oracle1\bin>set NLS_DATE_FORMAT
NLS_DATE_FORMAT='YYYY-MM-DD:HH24:MI:SS'
Once i remove the single quotation from above command it is working fine:
set NLS_DATE_FORMAT=dd-mon-yyyy

0 comments:

Post a Comment