This option can be used to notify users, and possibly take corrective action, when a file system full condition is encountered.
If you use the -fc option, the database server attempts to load the specified DLL and resolve the entry point of the callback
function during startup. If the SQL Anywhere database server cannot find both the DLL and the entry point, the database server
returns an error and shuts down. The DLL is user-supplied and can use the callback to, among other things, invoke a batch
file (or shell script on Unix) you have supplied to take diagnostic or corrective action. Alternatively, the callback function
itself can perform such an action.
A sample disk full callback function is located in samples-dir\SQLAnywhere\DiskFull.
When the database server detects a disk full condition, it invokes the callback function (if one has been provided), passing
it the following information:
the name of the dbspace where the condition was triggered
the operating system-specific error code from the failed operation
The return code from the call to xp_out_of_disk indicates whether the operation that caused the condition should be aborted
or retried. If a non-zero value is returned, the operation is aborted, otherwise it is retried. The callback function is invoked
repeatedly as long as it returns zero and the file system operation fails.
On Microsoft Windows platforms, if the database server is started with a database server messages window (neither -qi nor
-qw have been specified), and a callback DLL is not provided, a window appears when a disk full condition occurs. This window
contains the dbspace name and error code, and allows the user to choose whether the operation that caused the disk full condition
should be retried or aborted.
On all other operating systems, when -fc isn't specified and a disk full condition is encountered, a fatal error occurs.
You can create system events to track the available disk space of devices holding the database file, the log file, or the
temporary file and alert administrators of a disk space shortage.