BackupButler BB - ORA-1861 Using Date Format in Rman Recovery 'SET UNTIL TIME'
ORA-1861 Using Date Format in Rman Recovery 'SET UNTIL TIME'
You are trying to use the RMAN command SET UNTIL TIME command to
perform a Point-In-Time-Recovery. The following errors are reported:
Recovery Manager: Release 8.0.4.0.0 - Production
RMAN-06005: connected to target database: TARGET
RMAN-06008: connected to recovery catalog database
RMAN> run {
2> allocate channel t1 type disk;
3> set until time "1998-08-03:15:52:50";
4> .....
5> .....
6> release channel t1;
7> }
RMAN-03022: compiling command: allocate
RMAN-03023: executing command: allocate
RMAN-08030: allocated channel: t1
RMAN-08500: channel t1: sid=9 devtype=DISK
RMAN-03022: compiling command: set
RMAN-03026: error recovery releasing channel resources
RMAN-08031: released channel: t1
RMAN-00569: ================error message stack follows============
RMAN-03002: failure during compilation of command
RMAN-03013: command type: set
RMAN-06003: ORACLE error from target database: ORA-01861: literal does not match format string
RMAN>
Problem Explanation:
====================
The 'SET UNTIL TIME' format in the RMAN script does not match the NLS_DATE_FORMAT. Possibly, the script writer forgot to use the easy method of specifying dates; i.e. using the TO_DATE function.
Search Words:
=============
RECOVERY
NLS_DATE_FORMAT
ORA-01861
Solution Description:
=====================
Use the TO_DATE function in your rman scripts to specify dates
that are independant of the current NLS_DATE_FORMAT setting.
For example:
set until time "to_date('2002 feb 20 15:33','yyyy mon dd hh24:mi')";
If you do not use the TO_DATE function, then the following applies.
The NLS_DATE_FORMAT variable must be set to the same format used in the 'SET
UNTIL TIME' RMAN command.
UNIX:
Use the SETENV command to set the NLS_DATE_FORMAT variable to the desired format prior to logging on to RMAN.
i.e, %setenv NLS_DATE_FORMAT YYYY-MM-DD:HH24:MI:SS
WinNT:
Use the SET command to set the NLS_DATE_FORMAT variable to the desired format prior to logging on to RMAN.
i.e, C:\> set NLS_DATE_FORMAT=YYYY-MM-DD:HH24:MI:SS
Or
Create an NLS_DATE_FORMAT entry in the WinNT registry with the desired format. Open the Registry Editor and create the entry under the LOCAL_MACHINE/SOFTWARE/ORACLE key.
* Important Note * If more than one $ORACLE_HOME, you must create the entry under the correct $ORACLE_HOME subkey.
i.e. LOCAL_MACHINE/SOFTWARE/ORACLE/HOMEn, where n designates the $ORACLE_HOME number.
Solution Explanation:
=====================
After taking any of the above steps, RMAN will recognize the SET UNTIL TIME command format.
No comments:
Post a Comment