Oracle databases are now generally 64-bit but the Gen Windows CSE software is still 32-bit.
Therefore the CSE needs to use the 32-bit Oracle client to connect to the 64-bit database.
The same applies for the CSE Configuration program (cse_config.exe) initialization steps.
NOTE: In general an Oracle 32-bit client cannot connect to a Oracle 64-bit database using a local (Bequeath Protocol) connection and instead must connect via the Oracle TNS Listener using an Oracle Net Service Name.
Gen 8.0, Gen 8.5 & Gen 8.6 CSE running under an Oracle 64-bit database.
The supported version of Oracle 11g, 12c or 19c will vary across Gen version but the principles outlined in this article remain the same.
For both CSE Configuration and CSE/iefmd.exe to function correctly, an Oracle Net Service Name for the CSE database needs to be defined in the ...\network\admin\tnsnames.ora file for the 32-bit Oracle client installation. NOTE: The 32-bit Oracle client will have a different installation location to the 64-bit Oracle database installation.
Oracle 32-bit/64-bit factors:
The CSE Configuration uses both the Oracle sqlplus.exe program and 32-bit initialization programs (initdir.exe and initdb.exe) to connect to the Oracle database and the following factors need to be considered:
- If the 32-bit Oracle client bin directory is in the PATH before the 64-bit Oracle database bin directory then only the 32-bit ...\network\admin\tnsnames.ora file needs to have the Oracle Net Service Name defined because the 32-bit sqlplus.exe will be automatically found first and corresponding tnsnames.ora file used.
- If instead the 64-bit Oracle database bin directory is in the PATH before the 32-bit Oracle client bin directory then both 32-bit and 64-bit ...\network\admin\tnsnames.ora files will also need to have the Oracle Net Service Name defined because the 64-bit sqlplus.exe will be automatically found first and corresponding tnsnames.ora file used.
NOTE: If the Oracle NET Service Name is defined in both tnsnames.ora files then the PATH order does not matter, which is the simplest and suggested option.
2. Typical problem if 32-bit ...\network\admin\tnsnames.ora file does not include the Oracle NET Service Name:
During the CSE configuration steps for initialization of the tables, 32-bit programs are used (initdir.exe and initdb.exe) which will automatically read the Oracle 32-bit ...\network\admin\tnsnames.ora file to get the Oracle NET Service Name definition. If that Service Name is not correctly defined in that file then during the first initialization step "Initializing Coordination tables" the error "Error 10002 while running Encyclopedia initialization" will occur:
Defining and using the Oracle NET Service Name
In this example the ...\network\admin\tnsnames.ora file has the Net Service Name DBCSE defined as follows:
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(SERVER = DEDICATED)
(SERVICE_NAME = ORCL)
There are 2 options to force the use of a Net Service Name to connect to the CSE database:
1. On Windows set the system environment variable LOCAL to the Net Service Name.
On Unix set the environment variable TWO_TASK to the Net Service Name
For the above example tnsnames.ora file, LOCAL or TWO_TASK should be set to the value DBCSE.
Setting LOCAL or TWO_TASK will ensure that any Oracle connection will default to using the Net Service Name defined and go via the Listener, instead of the bequeath connection. This is the cleanest option if the CSE is running on a dedicated server and connections to other Oracle databases are not a concern. The CSE configuration program should execute seamlessly and the resulting iefmd.ini file will contain the standard connection parameters as follows:
"DBNAME=DBCSE DBUSER=ency DBPSWD=ency".
The environment variable (LOCAL or TWO_TASK) will need to remain in place for the iefmd to execute successfully.
Use the syntax userid@<Net_Service_Name> for the Database User IDs in the CSE configuration program.
This provides more flexibility if the CSE is sharing the machine with other Oracle databases and setting LOCAL or TWO_TASK is undesirable. The resulting iefmd.ini file will contain the Net Service Name syntax in the DBUSER field for the connection parameters. For the above example tnsnames.ora file where the Net Service Name is DBCSE, the resulting iefmd.ini file will contain connection parameters as follows:
"DBNAME=DBCSE DBUSER=ency@DBCSE DBPSWD=ency"