SQL Anywhere uses a set of system variables to store various types of information necessary for running the software. These system variables are stored in registries, INI files, or environment variables, depending on the operating system. Not all system variables need to be set in all circumstances.
The following is a list of system variables used by SQL Anywhere and a description of what they are used for.
SQLANY = path
The SQLANY environment variable is used to contain the directory where SQL Anywhere is installed. The default installation directory is C:\SQLANY50. The install procedure automatically adds the SQLANY environment variable to your startup environment. The SQLANY variable is used by the batch files or command files that build the Embedded SQL examples.
In QNX, SQL Anywhere is installed in a fixed directory and the SQLANY variable is not required.
SQLCONNECT = keyword=value ; ...
SQLCONNECT = keyword#value ; ...
The SQLCONNECT environment variable specifies connection parameters that are used by several of the database tools to connect to a database engine or network server. This string is a list of parameter settings of the form KEYWORD=value, delimited by semicolons. The number sign "#" is an alternative to the equals sign, and should be used when setting the connection parameters string in the SQLCONNECT environment variable, as using "=" inside an environment variable setting is a syntax error.
The keywords are from the following table.
Verbose keyword | Short form |
---|---|
Userid | UID |
Password | PWD |
ConnectionName | CON |
EngineName | ENG |
DatabaseName | DBN |
DatabaseFile | DBF |
DatabaseSwitches | DBS |
AutoStop | AutoStop |
Start | Start |
Unconditional | UNC |
DataSourceName | DSN |
For a description of the connection parameters, see "Database connection parameters".
SQLPATH = path;...
PATH = path;...
ISQL searches along SQLPATH for ISQL command files and Help files before searching the system path.
SQLREMOTE = path
Addresses for the FILE message link in SQL Remote replication are subdirectories of the SQLREMOTE environment variable. This variable should point to a shared directory.
SQLSTART = start-line
SQLSTARTW = start-line
Historical. The SQLSTART environment variable information has been added to the SQLCONNECT environment variable as the start parameter.
TMP = directory
TMPDIR = directory
TEMP = directory
The database engine creates temporary files for various operations such as sorting and performing unions. These temporary files will be placed in the directory specified by the TMP, TMPDIR, or TEMP environment variables. (The database engine takes the first one of the three that it finds.)
If none of the environment variables is defined, temporary files are placed in the current directory.