Created On: 06 October 2011
Problem:
Migration from SQL to Oracle is failing when using the Oracle Instant Client with the following error:
00000004 2011-09-19 07:36:22 Exception thrown from Unknown: Class = FileSystemException, Code = 4(0x00000004)
Msg = No such file or directory
[OS Error Code] = 2
[FileName] = C:\temp\odbc\instantclient_10_2\instantclient_10_2\oracle.key
00000004 2011-09-19 07:36:22 Exception thrown from Unknown: Class = StDatabaseException, Code = 59(0x0000003b)
Msg = NLS_LANG setting on Oracle client cannot be verified.
00000004 2011-09-19 07:36:22 Exception thrown from Unknown: Class = FileSystemException, Code = 4(0x00000004)
Msg = No such file or directory
[OS Error Code] = 2
[FileName] = C:\temp\odbc\instantclient_10_2\instantclient_10_2\oracle.key
00000004 2011-09-19 07:36:22 Exception thrown from Unknown: Class = StDatabaseException, Code = 59(0x0000003b)
Msg = NLS_LANG setting on Oracle client cannot be verified.
Resolution:
StarTeam is unable to verify the NLS_LANG setting because it cannot locate the file "oracle.key". This file does not exist when using the Oracle Instant Client and therefore it has to be created. Before this file can be created please carry out the following steps. Various registry keys need to exist on the machine running the Oracle Instant Client:
1. Open the registry
2. Go to HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE
3. Create a new key with name "HOME0"
4. Under "HOME0" , create 3 new string values:
NLS_LANG with a value of AMERICAN_AMERICA.WE8MSWIN1252
ORACLE_HOME with a value of the Oracle installation directory like C:\oracle\ora92
ORACLE_HOME_KEY with a value of Software\ORACLE\HOME0
These keys may already exist in the registry under one of the other Oracle keys therefore you could just copy them to reduce the risk of typos. Please restart the StarTeam Administration Tool or any other application that uses this connection after making this change.
Once the keys have been created carry out the following steps to create the "oracle.key" file
1. Navigate to the directory in which the Oracle Instant client has been extracted. This is the same directory which you have entered for the ORACLE_HOME key value
2. Create a text file and simply enter the following:
Software\ORACLE\HOME0
3. Save the file as "oracle.key" ensuring that the .key has replaced the .txt file extension.
Now when the migration is carried out StarTeam will be able to locate the "oracle.key" file and in turn verify the NLS_LANG setting. The migration should complete successfully and the newly migrated configuration should start up without any problems.
1. Open the registry
2. Go to HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE
3. Create a new key with name "HOME0"
4. Under "HOME0" , create 3 new string values:
NLS_LANG with a value of AMERICAN_AMERICA.WE8MSWIN1252
ORACLE_HOME with a value of the Oracle installation directory like C:\oracle\ora92
ORACLE_HOME_KEY with a value of Software\ORACLE\HOME0
These keys may already exist in the registry under one of the other Oracle keys therefore you could just copy them to reduce the risk of typos. Please restart the StarTeam Administration Tool or any other application that uses this connection after making this change.
Once the keys have been created carry out the following steps to create the "oracle.key" file
1. Navigate to the directory in which the Oracle Instant client has been extracted. This is the same directory which you have entered for the ORACLE_HOME key value
2. Create a text file and simply enter the following:
Software\ORACLE\HOME0
3. Save the file as "oracle.key" ensuring that the .key has replaced the .txt file extension.
Now when the migration is carried out StarTeam will be able to locate the "oracle.key" file and in turn verify the NLS_LANG setting. The migration should complete successfully and the newly migrated configuration should start up without any problems.
Incident #2537470