Total Pageviews

Wednesday 24 December 2014

ORA-01841: (full) year must be between -4713 and +9999, and not be 0

expdp sumit/database@DB16UTF_486 tables=test1,test2 directory=EXPORT_DUMP dumpfile=exp_tune6.dmp logfile=exp_tune6.log exclude=statistics flashback_time=SYSTIMESTAMP

Export: Release 10.2.0.1.0 - Production on Tuesday, 30 October, 2012 16:58:52

Copyright (c) 2003, 2005, Oracle. All rights reserved.

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit
Production
With the Partitioning, OLAP and Data Mining options
ORA-39001: invalid argument value
ORA-39150: bad flashback time
ORA-01841: (full) year must be between -4713 and +9999, and not be 0

Solution:

FLASHBACK_TIME is causing the issue here. First step is to check the value ofNLS_TIMESTAMP_FORMAT , in my case it's value was  "DD-MON-RR HH.MI.SSXFF AM".
Correct syntax is FLASHBACK_TIME="TO_TIMESTAMP(time-value)".
Because the TO_TIMESTAMP value is enclosed in quotation marks, it would be best to put this
parameter in a parameter file else it causes syntax error on windows dos prompt.

Example:

You can specify the time in any format that the DBMS_FLASHBACK.ENABLE_AT_TIME 
procedure accepts. For example, suppose you have a parameter file, flashback.par,
with the following contents:

DIRECTORY= EXPORT_DUMP 
TABLES= test1,test2 
DUMPFILE=hr_time.dmp
dumpfile=exp_tune6.dmp 
logfile=exp_tune6.log 
exclude=statistics 
flashback_time="TO_TIMESTAMP(SYSDATE, 'DD-MON-RR HH:MI:SSXFF AM')"

You could then issue the following command:

> expdp sumit/database@db16utf_486  PARFILE=D:\flashback.par

The export operation will be performed with data that is consistent with the SCN that most 
closely matches the specified time.

2 comments:

  1. Jadwal Pertandingan Ayam SV388 7 Maret 2019 - Minggu, Ujung Pandang 10 Maret 2019 – Pada Hari Tersebut Akan Di Laksanakan Berbagai Pertandingan Sabung Ayam Secara Live di Arena Sabung Ayam Thailand.

    Situs Judi Sabung Ayam Online SV388 Merupakan Situs Judi Asal Thailand Yang Sangat Terkenal Dengan Permainan Sabung Ayam Yang Fair dan Menghibur Para Penonton Judi Sabung Ayam.

    Untuk Info Lebih Lanjut Bisa Hub kami Di :
    wechat : bolavita
    line : cs_bolavita
    whatsapp : +628122222995
    BBM: BOLAVITA

    ReplyDelete
  2. I had same problem in RMAN recover
    Solved by setting NLS_LANG=.UTF8

    ReplyDelete