Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: RMAN 8i and NLS_DATE_FORMAT

Re: RMAN 8i and NLS_DATE_FORMAT

From: Maxim Demenko <mdemenko_at_gmail.com>
Date: Sat, 06 Aug 2005 00:11:59 +0200
Message-ID: <dd0o6l$1os$03$1@news.t-online.com>


BD schrieb:
> Hey, all.
>
> Shockingly, RMAN (8.1.7.4 on AIX 5.2) is still refusing to give up all
> its secrets.
>
> I am working on TSPITR.
>
> I have created the auxiliary instance, and am able to connect to it
> with the RMAN connect string.
>
> and tried a tablespace restore up to a certain point. Frustration is
> that RMAN continually balks at me about the year being out of range.
>
> Here is my process to this point:
>
>
> **** My line from init.ora in both TARGET and AUX dbs:
> nls_date_format = "YYYY-MM-DD HH24:MI:SS"
>
> **** at OS prompt:
> set nls_date_format = "YYYY-MM-DD HH24:MI:SS"
>
> **** From SQLPLUS:
> NOSID> alter session set nls_date_format='YYYY-MM-DD HH24:MI:SS';
> Session altered.
>
> NOSID> select to_date('2005-08-05 20:00:01') from sys.dual;
>
> TO_DATE('2005-08-05
> -------------------
> 2005-08-05 20:00:01
>
> **** This is all looking okay...****
>
> **** From RMAN:
> run {allocate auxiliary channel dev1 type disk;sql "alter session set
> nls_date_format=''YYYY-MM-DD HH24:MI:SS''"; recover tablespace
> small_tables_2 until time '2005-08-05 20:00:01';}
>
> RMAN-06003: ORACLE error from target database: ORA-01841: (full) year
> must be between -4713 and +9999, and not be 0
> RMAN-06097: text of failing SQL statement: select to_date('AUG 05 2005
> 20:00:01') from sys.dual
>
> **** So - where is rman getting that date format from?? ****
>
> I expect this is not complicated (for those many who know RMAN well),
> but I tell ya - wading through this for the first time is getting a
> little bit deflating.
>
> Thanks for all feedback, as always.
>
> BD
>

There is a bug 1516488, fixed in 9i. The errormessage above comes if your nls_date_format doesn't begin with a month. Workaround is to set NLS_DATE_FORMAT to any format with leading Month (e.g. MM-DD-YYYY)

Best regards

Maxim Received on Fri Aug 05 2005 - 17:11:59 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US