ba6.us - Dave's Database Related Stuff

  • home
  • blog
  • notebooks
  • projects
  • recent
  • about
  • manifesto
  • !
Home › Blogs › dmann's blog

Tag Cloud

apex Application Express Auditing data dbi development export funnies HTML Java linux monitoring oem oracle performance perl rman scripting sql SQL Developer sqlplus tuning unix windows
more tags

Search

RSS Feed

Blog Posts :

Navigation

  • Feed aggregator

User login

  • Request new password

More stupid RMAN tricks: ORA-01843 From RMAN

dmann — Mon, 06/09/2008 - 13:40

So I've got a backup script that runs a BACKUP DATABASE followed by a BACKUP ARCHIVELOG command. The BACKUP ARCHIVELOG FROM TIME command runs to collect all the archived logs created since the beginning of the Level 0.

The BACKUP ARCHIVELOG FROM TIME command fails sporadically with a ORA-01843 "not a valid month". Why does it work sometimes? I have no idea. Seems to be time related but I can't really narrow it down. If the Level 0 takes 5 hours it always works. If it takes 7 hours it always fails. I'm sure there is a 'sweet spot' is somewhere between the two but the reality is that sometimes its just going to take 7 hours or more.

I found some info about RMAN and ORA-01843's on MetaLink. They cautioned to make sure NLS_LANG and NLS_DATE_FORMAT were set. I verified these were set OK and the command works OK most of the time so I was baffled. Opened a TAR and here comes the stupid RMAN trick:

Instead of this:

backup archivelog from time '05/24/08 20:43:02'

Try this:

backup archivelog from time "TO_DATE('05/24/08 20:43:02','mm/dd/yy hh24:mi:ss')"

Yes, force feeding a date to RMAN even when it should know the date format is dumb. But it works reliably now. The syntax is not obvious from the documentation but this may be a trick that can be used other places too. Hopefully this is the last time I have to use it :)

-- Dave

  • oracle
  • rman
  • dmann's blog

Post new comment

The content of this field is kept private and will not be shown publicly.
Input format
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
12 + 0 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.


Cornify
  • home
  • blog
  • notebooks
  • projects
  • recent
  • about
  • manifesto
  • !

Content Copyright 2006-2010. Links are copyright of respective owners.