Sets the authentication string for a database.
Can be set for the PUBLIC group only. You must restart the database for this option to take effect.
This option only takes effect when you are using the OEM Edition of the SQL Anywhere database server.
When a database is authenticated, only connections that specify the correct authentication signature can perform operations on the database. Connections that are not authenticated operate in read-only mode. You must use the OEM Edition of SQL Anywhere if you want to use authenticated databases.
To authenticate a database, set the database_authentication option for the database:
SET OPTION PUBLIC.database_authentication = 'company = company-name; application = application-name; signature = database-signature';
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.
If your company name has quotation marks, apostrophes, or other special characters, you must double them in the string for it to be accepted.
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
You can store the authentication statement in a SQL script file to avoid having to type in the long signature repeatedly. If you store the authentication statement in the file install-dir\scripts\authenticate.sql, it is applied whenever you create, rebuild, or upgrade a database.
For more information about configuring and using the OEM Edition of SQL Anywhere, see Running authenticated SQL Anywhere applications.
SET OPTION PUBLIC.database_authentication = 'company = MyCompany; application = MySQLAnywhereApp; signature = 0fa55157edb8e14d818e';
|Envoyer votre avis sur cette page par email.||Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1|