Posted on

RMAN-03999 Oracle error with ORA-01821 nls setting issue


When I tried logging into Oracle RMAN the recovery manager for performing backup I stumbled on the following error. RMAN-03999: Oracle error occurred while converting a date: ORA-01821. All I have done before logging into RMAN is setting the NLS_DATE_FORMAT environment variable at the operating system level as follows:
export NLS_DATE_FORMAT=’dd-mon-yyyy hh24:ms:ss’
Following this I tried connecting to RMAN as follows:
rman target /
Upon analysing the error I realised that this is owing to incorrect setting of NLS_DATE_FORMAT environment variable. To fix this issue all I had to do is to unset the NLS_DATE_FORMAT environment variable as follows
export NLS_DATE_FORMAT=”
In cases wherein we get RMAN-03999 error with ORA-01801 the fix will be setting:
export NLS_LANG
export NLS_DATE_FORMAT
This will fix the error
If not properly set ORA-01821 date format not recognized error can impact dbms_Scheduler jobs that are scheduled to be run and will throw the following error:
ORA-01821: date format not recognized
ORA-06512: at “SYS.DBMS_ISCHED”, line 22
ORA-06512: at “SYS.DBMS_SCHEDULER”, line 234
ORA-06512: at “job_name”, line 98
In case if you want to get more details on nls parameters setting from within the database query the database as follows:
select * from nls_database_parameters;