- Problems Inserting Data into a Database
- Silently Rejecting a Message without Generating an Error
- Oracle Character Set Conversion Issues
- Oracle Startup Problems When Using SELinux
- Migrating ODBC DSN Registry Settings From One Machine To Another
This section provides answers to some common problems have when using Iguana with a database.
Problems Inserting Data into a Database [top]
If Iguana encounters problems inserting data into the database, it will log errors in the Iguana Logs.
To determine why you cannot insert data into your database:
- Check the Iguana Logs for your channel, for example DB Oracle connection (in this case there are no errors):
- Check that the ServiceErrorLog.txt file does not contain errors that could be related to the problem. This file log contains errors that occur in Iguana.
Silently Rejecting a Message without Generating an Error [top]
In Iguana, errors are automatically logged if a database entry being processed by a From Database channel source component has any of its key fields set to NULL. This means that the message will not be processed, since all key fields must have non-NULL values for data to be inserted or updated.
The only exception to this rule is if all fields for a given row are NULL. Consequently, setting all fields for a row to NULL causes three things to occur:
- The message will be processed successfully.
- No error will be generated, since there is no data to insert or update.
- No row is added or updated.
Note: This is not treated as an error because data is not changed. It can be considered a logic/programming (or perhaps data entry) error and you could easily add a check in your code to log a warning (or take other action) if this occurs.
Oracle Character Set Conversion Issues [top]
This solution shows you how to resolve a common Oracle character set conversion issue in Iguana. It is intended for users who are:
- Running Iguana on Windows.
- Connecting to a remote Oracle database.
- Using an Oracle client.
For messages being transmitted from an Oracle database to an LLP client, you may encounter an issue where special characters are being incorrectly converted to “?” or other types, even if they have been inserted into the tables correctly.
To correct this issue, you must get your instant client to connect to the correct character set for the database, otherwise a different character set will be used when inserting data. On Windows you must set an NLS_LANG registry subkey for each of your Oracle homes using the Windows Registry Editor.
To set the NLS_LANG registry subkeys:
- Run the registry editor (regedit).
- Edit the following registry entry, depending on the version of Oracle that you are using:
Version Registry Entry Oracle Version 7 HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE Oracle Database versions 8, 8i and 9i HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOMEx\ (where “x” is the unique number identifying the Oracle home). Note that HOME0 is the first installation. Oracle Database 10g HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_<oracle_home_name>
- Set the NLS_LANG value in the Windows Registry. The value is dependent on the code page that you want to use. To view a list of NLS_LANG settings, see Determine your Windows ANSI code page.
Oracle Startup Problems When Using SELinux [top]
If you are using Iguana on a Linux machine that is running Security-Enhanced Linux (SELinux), you may have problems starting the Oracle client library. This is because the SELinux feature does not allow the libnnz10.so Oracle library to be loaded.
To work around this problem, you will need to disable SELinux on your system:
- To disable SELinux temporarily on a running system, log in as root and execute the following command:
- To disable SELinux permanently, edit the file /etc/selinux/config and change “enforcing” to “disabled”.
Migrating ODBC DSN Registry Settings From One Machine To Another [top]
If you have created a large number of channels for your Iguana server, and many of these channels are using ODBC data sources with DSNs (Data Source Names), it can be time-consuming to migrate your server from one machine to another.
If you need to migrate your server, a convenient way to access and copy your DSN entries is to look them up in the Windows registry. The HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI registry entry contains a complete list of the DSN sources defined on your machine. You can use regedit or a similar utility to export your registry entries, which can then be copied as needed.