Authenticating your database

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

You can use the Authenticated database property to determine if the database has been authenticated:

SELECT DB_PROPERTY ( 'Authenticated' );

For more information about database properties, see Database properties.

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 database 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
Tip

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.