Logging errors
In a Windows environment, the database driver logs error messages in the Windows application Event Log or the log files in the %BSE%\LOG directory. In a UNIX environment, the driver logs error messages in the log flies in the directory $BSE/log. From these log files, you can retrieve the following information:
- The user name, date, time, source file, and line number.
- The function called.
- The error code returned by the database.
- The database error description.
- The BDB error code returned to the application.
- Sometimes, the failing SQL statement.
If a database error occurs, the database driver attempts to map the error to a known or anticipated error condition. Generally, these mapped BDB errors have corresponding error numbers that fall in the range of 1 to 1,000. If a database-specific error occurs, the database driver maps the error to the BDB error code over 1,000 with this formula:
- abs(error_code) + 1000
Therefore, if an error ORA-1652 occurs, BDB error 2652 is returned to the application.
Usually, the log entries from the display driver, application virtual machine, and database driver contain sufficient information to determine the nature of and solution to the problem.
Whenever an error is encountered with an error code greater than 1,000, we recommend that you check the log entries from the database driver.