ASA Database Administration Guide
Connection parameters often provide more than one way of accomplishing a given task. This is particularly the case with embedded databases, where the connection string starts a database server. For example, if your connection starts a database, you can specify the database name using the DatabaseName (DBN) connection parameter or using the DatabaseSwitches (DBS) parameter. The Database Name (DBN) connection parameter is recommended.
Here are some recommendations and notes for situations where connection parameters conflict:
Specify database files using DBF You can specify a database file on the StartLine (START) parameter or using the DatabaseFile (DBF) connection parameter (recommended).
Specify database names using DBN You can specify a database name on the StartLine (START) parameter, the DatabaseSwitches (DBS) connection parameter, or using the DatabaseName (DBN) connection parameter (recommended).
Use the Start parameter to specify cache size Even though you use the DatabaseFile (DBF) connection parameter to specify a database file, you may still want to tune the way in which it starts. You can use the StartLine (START) connection parameter to do this.
For example, if you are using the Java features of Adaptive Server Anywhere, you should provide additional cache memory on the StartLine (START) connection parameter. The following sample set of embedded database connection parameters describes a connection that may use Java features:
DBF=path\asademo.db dbn=Sample ENG=Sample Server uid=DBA pwd=SQL Start=dbeng9 -c 8M
For a list of connection parameters, see Connection Parameters and Network Protocol Options.
For character set issues in connection strings, see Connection strings and character sets.
Boolean values Boolean (true or false) arguments are either YES, ON, 1, or TRUE if true, or NO, OFF, 0, or FALSE if false.
Case sensitivity
Connection parameters are case insensitive.
The connection parameters used by the interface library can be obtained from the following places (in order of precedence):
Connection string You can pass parameters explicitly in the connection string.
SQLCONNECT environment variable The SQLCONNECT environment variable can store connection parameters.
Data sources ODBC data sources can store parameters.
Character set restrictions The server name must be composed of the ASCII character set in the range 1 to 127. There is no such limitation on other parameters.
For more information on the character set issues, see Connection strings and character sets.
Priority
The following rules govern the priority of parameters:
The entries in a connect string are read left to right. If the same parameter is specified more than once, the last one in the string applies. ODBC and OLE DB are an exception to this: if the same parameter is specified more than once, the first string applies.
If a string contains a data source or file data source entry, the profile is read from the configuration file, and the entries from the file are used if they are not already set. For example, if a connection string contains a data source name and sets some of the parameters contained in the data source explicitly, then in case of conflict the explicit parameters are used.
SQL Anywhere Studio 9.0.2
Copyright © 1989–2004 Sybase, Inc. Portions copyright © 2001–2004 iAnywhere Solutions, Inc. All rights reserved.