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:
Libraries, which may include product libraries, system libraries, or Adaptive Server Enterprise libraries. Filename extensions include .so.nnn or .so on UNIX (.sl.nnn or .sl on HP), or .dll or .lib on Windows. These files are required to run Sybase IQ. If an incorrect DLL is located, for example, there is the possibility of version mismatch errors. For example, library files may be found in $ASDIR/lib or $SYBASE/$SYBASE_OCS/lib on UNIX, or %ASDIR%\win32 or %SYBASE\%SYBASE_OCS\dll on Windows. An empty directory, $ASDIR/usrlib, allows you to supersede default libraries with custom libraries and patches, because start_asiq includes usrlib before regular library directories.
Interface files are required to run Sybase IQ. For example, .odbc.ini and utility_db.ini on UNIX, and util_db.ini on Windows. For more information about these files, see Chapter 3, “Configuring Sybase IQ,” in the Sybase IQ Installation and Configuration Guide.
Configuration files are used to specify connection parameters. Examples include default.cfg on Windows or asiqdemo.cfg.
Database files store the data and metadata. For example: asiqdemo.db, asiqdemo.iq, asiqdemo.iqmsg, asiqdemo.iqtmp.
Log files store information about the current session on the server and connected database. For example, a server log might be named ASIQ-12_6/logfiles/janed_asiqdemo.006.srvlog. The database log (for example, ASIQ-12_6/demo/asiqdemo.log) is created when you connect to the database and stored in the directory where the server is started. For more information about these files, see the Sybase IQ Installation and Configuration Guide
Product scripts are sample files that show how to create, populate, and upgrade databases.
User files include flat files used with the LOAD command and SQL scripts used with tools such as Interactive SQL.
Temporary files are created by Sybase IQ to store temporary information for operations like performing sorts for queries.
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:
INSTALL statement The name of the file that holds Java classes
LOAD TABLE statement The name of the file from which data should be loaded.
CREATE DATABASE statement A file name is needed for this statement and similar statements that can create files.
In some cases, Sybase IQ 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 (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.
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:
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.
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 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).
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.
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.
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.