Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » SQL Anywhere Server - Database Administration » File Locations and Installation Settings

Installation directory structure Next Page

How SQL Anywhere locates files


The client library and the database server need to locate files for two main purposes:

Examples of SQL statements that use file names include the following:

In some cases, SQL Anywhere uses a simple algorithm to locate files. In other cases, a more extensive search is performed.

Simple file searching

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.

Extensive file searching on Windows

On Windows, except Windows CE, SQL Anywhere programs, including the database server and administration utilities, perform a more extensive search for required files, such as DLLs or shared libraries. In these cases, SQL Anywhere programs look for files in the following order:

  1. The executable directory (the directory where the program executable file is located).

  2. Related directories. Directories with the following paths relative to the program executable directory:

  3. The 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.

  4. The Location registry entry. When installing onto Windows, SQL Anywhere adds a Location registry entry. The indicated directory is searched, followed by:

  5. System-specific directories. This includes directories where common operating system files are held, such as the Windows directory and the Windows\system32 directory on Windows operating systems.

  6. The CLASSPATH directories. For Java files, directories listed in the CLASSPATH environment variable are searched to locate files.

  7. The PATH directories. Directories in the system path and the user's path are searched to locate files.

Extensive file searching on Windows CE

On Windows CE, SQL Anywhere programs, including the database server and administration utilities, perform a more extensive search for required files, such as DLLs. In these cases, SQL Anywhere programs look for files in the following order:

  1. The executable directory (the directory where the program executable file is located).

  2. \ (the root directory).

  3. The Location registry entry (the directory specified by the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Sybase\SQL Anywhere\10.0\Location).

  4. The \Windows directory.

Extensive file searching on Unix

On Unix, SQL Anywhere programs, including the database server and administration utilities, perform a more extensive search for required files, such as DLLs or shared libraries. In these cases, SQL Anywhere programs look for files in the following order:

  1. Paths relative to server current working directory (./):

    1. ./res

    2. ./scripts

    3. ./tix

    4. ./bin

    5. ./lib

    6. ./java

    7. ./shared

    8. ./../shared

    Note

    All of these subdirectories are searched in all steps, except step 6.

  2. The executable path.

  3. The SYBASE environment variable.

  4. The PATH environment variable.

  5. The LIBPATH environment variable:

  6. One of the following:

    1. install-dir/scripts (for files of type .sql)

    2. install-dir/java (for files of type .zip)

    3. install-dir/charsets/unicode (for files of type .uct)

  7. The SQL Anywhere installation directory (install-dir), where install-dir is a single directory specified by the SQLANYx environment variable if it has been defined.

Extensive file searching on NetWare

On NetWare, SQL Anywhere programs, including the database server and administration utilities, perform a more extensive search for required files. In these cases, SQL Anywhere programs look for files in the following order:

  1. The executable directory (the directory where the program executable file is located).

  2. The current working directory.

  3. The sibling directory of the executable directory named scripts (for .sql files).

  4. The sibling directory of the executable directory named java (for .zip or .jar files).

  5. The parent directory of the executable directory.

  6. The SYS:SYSTEM directory.

  7. The SYS:SYSTEM\scripts directory (for .sql files).

  8. The SYS:SYSTEM\java directory (for .zip or .jar files).