Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » SQL Anywhere Server - Database Administration » The Database Server » The SQL Anywhere database server » Database server options

-ep server option Next Page

-fc server option


Specifies the file name of a DLL (or shared object on Unix) containing the File System Full callback function.

Syntax

{ dbsrv10 | dbeng10 } -fc filename ...

Applies to

All operating systems and servers.

Remarks

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.

For information about samples-dir, see Samples directory.

SQL Anywhere searches for the callback function DLL in the same locations as it searches for other DLLs and files.

For more information about where SQL Anywhere searches for files, see How SQL Anywhere locates files.

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 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 Windows platforms, if the database server has been started with a Server Messages window (neither -qi nor -qw have been specified), and a callback DLL has not been provided, a dialog appears when a disk full condition occurs. This dialog 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 in case of a disk space shortage.

See CREATE EVENT statement.

See also
Example

When the database server starts, it attempts to load the diskfull.dll DLL.

dbeng10 -fc diskfull.dll