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 » Running the Database Server » Running authenticated SQL Anywhere applications » Developing an authenticated application

Obtaining authentication signatures Next Page

Authenticating your database

The OEM Edition of SQL Anywhere does not permit any operations to be carried out on an unauthenticated database.

To authenticate a database
  1. Set the database_authentication option for the database, using the following SQL authentication statement:

    SET OPTION PUBLIC.database_authentication =
         'company = company-name;
         application = application-name;
         signature = database-signature'
  2. The company-name and application-name arguments are the values you supplied to Sybase when obtaining your signature, and database-signature is the database signature that you received from Sybase.

  3. Restart the database for the option to take effect.

When the database server loads an authenticated database, it displays a message in the Server Messages window describing the authenticated company and application. You can check that this message is present to verify that the database_authentication option has taken effect. The message has the following form:

This database is licensed for use with:
Application: application-name
Company: company-name

You can store the authentication statement in a SQL script file to avoid having to type in the long signature. You can run the SQL script from Interactive SQL by choosing Run Script from the File menu.

If you create a file named authenticate.sql in the scripts subdirectory of your SQL Anywhere installation directory and store the authentication statement in this file, it is applied whenever you create, rebuild, or upgrade a database. See Upgrading authenticated databases.