How Sybase IQ locates files

When starting and running, Sybase IQ needs to find and access several types of files. Understanding how Sybase IQ finds these files is important, to ensure that the correct files are used. Several directories or files with identical names may reside on a system. Sybase IQ uses both Adaptive Server Enterprise and Adaptive Server Anywhere libraries. (If either of these products have already been installed on your system, you should know the directory where they are installed, to avoid confusion.)

The types of files include but are not limited to:

Some file names are specified in SQL statements and need to be located at run time. Examples of SQL statements that use file names include the following:

In some cases, Sybase IQ uses a simple algorithm to locate files. In other cases, a more extensive search is carried out.

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 (i.e., where the server was started).

Also, when a database server is started and a database file name (DBF parameter) is supplied, the path is interpreted as relative to the directory in which the server was started.

Extensive file searching

Sybase IQ 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, Sybase IQ programs look for files in the following order:

  1. The executable directory The directory in which the program executable is held. Also, 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.

  2. 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.

  3. Location registry entry On a Windows installation, Sybase IQ adds a LOCATION registry entry. The indicated directory is searched, followed by the following:

    • A child named scripts

    • A child with the operating system name (win32, win, and so on).

  4. 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.

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

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

  7. LIBRARY PATH directories Directories listed in the LD_LIBRARY_PATH_64, LIBPATH, or SHLIB_PATH (depending on platform) environment variable are searched for shared libraries.