Archive

Posts Tagged ‘OID ora 12705’

ORA-12705: Cannot access NLS data files or invalid environment specified

March 26, 2012 1 comment

Problem: I’ve my oracle applications installed on a windows server. Yesterday this server was shutdown unexpectedly with out graceful shutdown of oracle applications. I was scared and sensing some issue might popup, as expected after windows server restart my OID server was reluctant to start. In the Logs ..\Middleware\asinst\diagnostics\logs\OID\oid1\oidmonxxx.log I see an error message (this is just a snapshot of logs):

[OID] [NOTIFICATION:16] [] [OIDMON] [host: ] [pid: 5712] [tid: 0] Guardian: Connecting to database, connect string is oiddb
[OID] [NOTIFICATION:16] [] [OIDMON] [host: ] [pid: 5712] [tid: 0] Guardian: [gsdsiConnect] ORA-12705, ORA-12705: Cannot access NLS data files or invalid environment specified
[OID] [NOTIFICATION:16] [] [OIDMON] [host: ] [pid: 5712] [tid: 0] Guardian: [oidmon]: Unable to connect to database, will retry again after 10 sec

Solution: After doing a bit of google, I understand that this has something to do with the NLS_LANG environment variable setup. I followed the below steps to resolve this issue:

  • Right click My computer–> Properties–>Advanced System Settings –> Environment variables, check for NLS_LANG environment variable. If available delete it.
  • Now go to ..\Middleware\Oracle_IDM1\bin
  • Open ‘oracle.key‘ file in a notepad, make a note of the path mine was ‘SOFTWARE\ORACLE\KEY_OH414431757’
  • Now Start–>Run–>regedit, to go to registry entries
  • Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\<key i.e. KEY_OH414431757>
  • Add an entry here by right click New –> String value
  • NLS_LANG, right click and modify to add value in my case it is ‘AMERICAL_AMERICA.WE8MSWIN1252’
  • Also add ORA_NLS10 value. Since ‘am using Oracle 11g it’s ORA_NLS10, if you are using other oracle version this key differs you may need to check the documentation.
  • ORA_NLS10 is important in a way that oracle searches for NLS data files in this path, wrong path here may lead to ORA12705
  • ORA_NLS10 = <your IDM location>\Middleware\Oracle_IDM1\nls\data
  • Make sure above path is available
  • Once you are done with the above 2 NLS_LANG and ORA_NLS10 entries in the registry, you are done! or you might want to restart your windows server again for registry entries to take affect or open a new command prompt
  • On new command prompt, issue following command
  • opmnctl status -l  (see if all servers are Alive, if now go to below step)
  • opmnctl startall (starts all servers, once done check for status again by issuing above command)

That’s all for now. Let me know if this helps some one there.