If logging is enabled for bulk load, a log file records information for each bulk load operation. Logging is enabled by specifying a file name and location for the log file using the setLogFile() method.
The log file records the following types of information about each bulk load operation:
• Total number of rows that were read
• Total number of rows that successfully loaded
• Total number of rows that failed to load
For example, the following log file shows that of 11 rows that were read, all successfully loaded:
/*----- Load Started: <Feb 25, 2009 11:20:09 AM EST>---------------------*/
Total number of rows read 11
Total number of rows successfully loaded 11
Total number of rows that failed to load 0
Example A: Enabling Logging on Windows
To enable logging using a log file named bulk_load.log located in the C:\temp directory, specify:
bulkLoad.setLogFile(C:\\temp\\bulk_load.log)
NOTE: If coding a path on Windows to the log file in a Java string, the backslash character (\) must be preceded by the Java escape character, a backslash. For example: C:\\temp\\bulk_load.log.
Example B: Enabling Logging on UNIX/Linux
To enable logging using a log file named bulk_load.log located in the /tmp directory, specify: