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

SAP Sybase SQL Anywhere 16.0 » SQL Anywhere Server - Database Administration » SQL Anywhere database connections » SQL Anywhere database servers » Authenticated SQL Anywhere applications » Authenticated application development

 

Authenticating a database (SQL)

You can authenticate a database using the SET OPTION statement.

Prérequis

You must have the SET ANY SYSTEM OPTION system privilege to set this option.

 Task
  1. Set the database_authentication option for the database by using the following SQL authentication statement:

    SET OPTION PUBLIC.database_authentication='company=company-name;
         application=application-name;
         signature=database-signature';
    Note

    Line breaks have been added to the syntax example to improve readability. However, the syntax should be executed without line breaks and without spaces between the equal sign and semicolons.

    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.

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

Résultat

The database is authenticated.

Suivant

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 clicking File » Run Script.

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 also