Sets the authentication string for a database.
String
Empty string
PUBLIC role | For current user | For other users | |
---|---|---|---|
Allowed to set permanently? | Yes, with SET ANY SECURITY OPTION | No | No |
Allowed to set temporarily? | Yes, with SET ANY SECURITY OPTION | No | No |
This option only takes effect when you are using the OEM Edition of the SQL Anywhere database server that supports OEM authentication.
You may need to restart the database for this option to take effect.
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. To use authenticated databases, use the OEM Edition of SQL Anywhere.
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 SAP when obtaining your signature, and database-signature is the database signature that you received from SAP.
If your company name has quotation marks, apostrophes, or other special characters, 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 %SQLANY17%\scripts\authenticate.sql, it is applied whenever you create, rebuild, or upgrade a database.
SET OPTION PUBLIC.database_authentication = 'company = MyCompany; application = MyApp; signature = 0fa55157edb8e14d818e';