ASA Database Administration Guide
File Locations and Installation Settings
The client library and the database server need to locate files for two main purposes:
DLLs and initialization files are required to run Adaptive Server Anywhere. If an incorrect DLL is located, there is the possibility of version mismatch errors.
Some files are specified in SQL statements and need to be located at run time, such as INSTALL or LOAD TABLE.
Examples of SQL statements that use file names include the following:
INSTALL JAVA statement The name of the file that holds Java classes.
LOAD TABLE and UNLOAD TABLE statements The name of the file from which data should be loaded or to which the data should be unloaded.
CREATE DATABASE statement A file name is needed for this statement and similar statements that can create files (such as CREATE WRITEFILE).
In some cases, Adaptive Server Anywhere uses a simple algorithm to locate files. In other cases, a more extensive search is carried out.
In many SQL statements (such as LOAD TABLE, or CREATE DATABASE), the file name is interpreted as relative to the current working directory of the database server.
Also, when a database server is started and a database file name (DatabaseFile (DBF) parameter) is supplied, the path is interpreted as relative to the current working directory.
Adaptive Server Anywhere programs, including the database server and administration utilities, carry out a more extensive search for required files, such as DLLs or shared libraries. In these cases, Adaptive Server Anywhere programs look for files in the following order:
Executable directory Holds the program executable file.
Related directories Holds directories with the following paths relative to the program executable directory:
Parent of the executable directory.
A child of the parent directory named scripts. The UNIX server does not search in this location.
Current working directory When a program is started, it has a current working directory (the directory from which it is started). This directory is searched for required files.
Location registry entry When installing onto Windows, Adaptive Server Anywhere adds a LOCATION registry entry. The indicated directory is searched, followed by:
A child named scripts
A child with the operating system name (win32, win64, and so on)
System specific directories This includes directories where common operating system files are held, such as the Windows directory and the Windows\system directory on Windows operating systems.
CLASSPATH directories For Java files, directories listed in the CLASSPATH environment variable are searched to locate files.
PATH directories Directories in the system path and the user's path are searched to locate files.