Introduction to the database tools interface

SQL Anywhere includes Sybase Central and a set of utilities for managing databases. These database management utilities perform tasks such as backing up databases, creating databases, translating transaction logs to SQL, and so on.

Supported platforms

All the database management utilities use a shared library called the database tools library. It is supplied for Windows operating systems and for Unix. The name of this library is dbtool11.dll for Windows, and libdbtool11.so (non-threaded) or libdbtool11_r.so (threaded) for Unix.

You can develop your own database management utilities or incorporate database management features into your applications by calling the database tools library. This chapter describes the interface to the database tools library. This chapter assumes you are familiar with how to call library routines from the development environment you are using.

The database tools library has functions, or entry points, for each of the database management utilities. In addition, functions must be called before use of other database tools functions and when you have finished using other database tools functions.

Windows Mobile

The dbtool11.dll library is supplied for Windows Mobile, but includes only entry points for DBToolsInit, DBToolsFini, DBRemoteSQL, and DBSynchronizeLog. Other entry points are not provided for Windows Mobile.

The dbtools.h header file

The dbtools header file included with SQL Anywhere lists the entry points to the DBTools library and also the structures used to pass information to and from the library. The dbtools.h file is installed into the SDK\Include subdirectory under your SQL Anywhere installation directory. You should consult the dbtools.h file for the latest information about the entry points and structure members.

The dbtools.h header file includes other files such as:

  • sqlca.h   This is included for resolution of various macros, not for the SQLCA itself.

  • dllapi.h   Defines preprocessor macros for operating-system dependent and language-dependent macros.

  • dbtlvers.h   Defines the DB_TOOLS_VERSION_NUMBER preprocessor macro and other version specific macros.

The sqldef.h header file

The sqldef.h header file includes error return values.

The dbrmt.h header file

The dbrmt.h header file included with SQL Anywhere describes the DBRemoteSQL entry point in the DBTools library and also the structure used to pass information to and from the DBRemoteSQL entry point. The dbrmt.h file is installed into the SDK\Include subdirectory under your SQL Anywhere installation directory. You should consult the dbrmt.h file for the latest information about the DBRemoteSQL entry point and structure members.