Enabling DB-Library Kerberos Authentication Component

To use the Kerberos Authentication Component capability in SDK for SAP ASE, you must enable the DB-Library Kerberos Authentication Component.

  1. In DB-Library, include sybdbn.h instead of sybdb.h.
  2. Using dbsetversion, set the DB-Library version to DBVERSION_100 or above. If you do not set DB-Library to the latest version, DB-Library reverts to the default version of DBVERSION_46, which does not support the new option at the Tabular Data Stream (TDS) protocol level.
  3. Enable the new option using DBSETLNETWORKAUTH or DBSETLMUTUALAUTH, then call dbopen.
    Note: If the server’s principal name does not match the server’s directory entry name, call DBSETLSERVERPRINCIPAL to set the server’s principal name before calling dbopen.
    All calls to DBSETLNETWORKAUTH, DBSETLMUTUALAUTH, or DBSETLSERVERPRINCIPAL after calling dbopen remain invalid until the next time the application calls dbopen.
  4. Recompile the application.
    Note: On Linux 32-bit, the dblib application need to be linked with system lib –lrt. Without –lrt, the dblib application may encounter this error:
    symbol lookup error: <your $SYBASE>/OCS-16_0//lib/libsybskrb.so.16.0.00.00: undefined symbol: pthread_once