7.13.1. Using the sql() driver with an Oracle database The syslog-ng Premium Edition 7 Administrator Guide
The Oracle sql destination has some special aspects that are important to note.
The hostname of the database server is set in the
tnsnames.orafile, not in the
hostparameter of the
tnsnames.orafile is not located in the /etc directory (or in the /var/opt/oracle directory on Solaris), set the following Oracle-related environment variables, so syslog-ng PE will find the file:
ORACLE_SID. For details, see the documentation of the Oracle Instant Client.
You cannot use the same
database()settings in more than one destination, because the
database()option of the SQL driver is just a reference to the connection string of the
tnsnames.orafile. To overcome this problem, you can duplicate the connections in the
tnsnames.orafile under a different name, and use a different table in each Oracle destination in syslog-ng PE.
As certain database versions limit the maximum length of table names, macros in the table names should be used with care.
In the current version of syslog-ng PE, the types of database columns must be explicitly set for the Oracle destination. The column used to store the text part of the syslog messages should be able to store messages as long as the longest message permitted by syslog-ng, therefore it is usually recommended to use the
clobcolumn type. (The maximum length of the messages can be set using the
log-msg-size()option.) For details, see the following example.
The Oracle Instant Client used by syslog-ng PE supports only the following character sets:
Single-byte character sets:
US7ASCII, WE8DEC, WE8MSWIN1252, and WE8ISO8859P1
Unicode character sets:
UTF8, AL16UTF16, and AL32UTF8