ASA Reference Manual
|Chapter 1: File Locations and Installation Settings|
This chapter describes the installation and operating system settings used by Adaptive Server Anywhere. Depending on the operating system, these settings may be stored as environment variables, initialization file entries, or registry entries.
When you install Adaptive Server Anywhere, several directories may be created. Some of the files in these directories are essential, and others are not. This section describes the directory structure.
Adaptive Server Anywhere software, whether you receive it as a product or bundled as part of another product, is installed under a single installation directory. The tools provided with the Adaptive Server Anywhere product, however, are installed in other directories. This section describes only the installation directory structure for Adaptive Server Anywhere itself.
The Adaptive Server Anywhere installation directory itself holds several items, including the following:
The sample database
The sample database is held in the file asademo.db.
Read Me First
A Read Me First file named readme.txt holds late-breaking information.
For platforms other than Novell NetWare and Windows CE, there are several directories under the installation directory:
There is a separate directory for each operating system, which holds executables, dynamic link libraries, and help files.
If you are using Windows 95, 98, or NT, these files are installed in the win32 directory. If you are using UNIX, they are installed in the bin directory. On NetWare, the executables are stored in the installation directory itself.
You will not have all these directories on your machine; you will have only the ones required for the operating system version you installed.
Java base classes are stored in this directory.
The stored procedure debugger is stored in this directory.
The scripts directory contains SQL scripts that are used by the database administration utilities and as examples. With the exception of specific scripts (custom.sql, custmap.sql), do not edit these scripts. If the scripts directory is not present, the administration utilities will not work.
There are separate directories for C (cxmp) and Java (jxmp) examples.
The h directory contains header files for ESQL and ODBC database development.
On Novell NetWare, all files are installed to a single directory on the server. Throughout this documentation, when reference is made to files in subdirectories of the installation directory, the file on NetWare is in the installation directory itself.
On Windows CE, all files are installed to the installation directory, and no subdirectories are created. The exception is that all DLLs are installed into the \Windows directory. To make identification easy, the DLL names all have the prefix ASA_.
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:
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 (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:
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 installation onto Windows 95, 98, and NT, Adaptive Server Anywhere adds a LOCATION registry entry. Windows 3.x uses the LOCATION entry in the 6.0 section of asany.ini, which is held in your Windows directory. 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 and Windows NT operating systems.
For Java files, directories listed in the CLASSPATH environment variable are searched to locate files.
Directories in the system path and the user's path are searched to locate files.
Adaptive Server Anywhere uses a set of environment variables to store various types of information. Not all variables need to be set in all circumstances. These environment variables are listed in this section.
The way you set an environment variable depends on the operating system you are using.To set an environment variable (Windows NT):
Right Click on My Computer and select Properties from the popup menu.
Click the Environment tab. If the environment variable does not already exist, type variable and its value in the spaces provided, and click Set.
If the variable does exist, select it from the list of System Variables or User Variables, and make any modifications in the Value field. Click Set to make the setting.To set an environment variable (UNIX):
In one of your startup files (.cshrc, .shrc, .login), add a line that sets the variable.
In some shells (such as sh, bash, ksh) the line is as follows:
In other shells (such as csh, tsch) the line is as follows:
setenv VARIABLE value
The database server checks the value of the ASTMP environment variable to determine where to hold the temporary file. If the ASTMP environment variable does not exist, then the first of the TMP, TMPDIR, and TEMP environment variables to exist is used.
In many circumstances, ASTMP is not needed. It can be of use in security-conscious environments when running the database server as a service, to enable you to hold the temporary file in a directory that cannot be accessed by other programs.
The LD_LIBRARY_PATH environment variable is used on UNIX only. It is modified by the installation program to include the directories where Adaptive Server Anywhere libraries are located.
The executables are located in the lib subdirectory of the installation directory. For example, /opt/SYBSasa6/lib.
The PATH environment variable is modified by the installation program to include the directories where Adaptive Server Anywhere executables are located.
The executables are located in a subdirectory of the installation directory.
In addition, if you are using other Sybase applications, the SYBASE\bin and SYBASE\dll directories are added to your path.
On UNIX, each user must have the directory holding the executables (/opt/SYBSASA6/bin ) added to their path.
The SATMP environment variable is used by UNIX versions of Adaptive Server Anywhere to indicate a directory where temporary files are kept.
If more than one database server is running on a machine, each user needs their own temporary directory. Typically, this is set to /tmp/.userid, so that each user has their own directory and conflicts are avoided.
SQLCONNECT=parameter#value ; ...
The SQLCONNECT environment variable is optional, and is not set by the installation program.
SQLCONNECT specifies connection parameters that are used by several of the database administration utilities when connecting to a database server. This string is a list of parameter settings, of the form parameter=value, delimited by semicolons.
The number sign "#" is an alternative to the equals sign, and should be used if you are setting the connection parameters string in the SQLCONNECT environment variable. Using "=" inside an environment variable setting is a syntax error. The = sign is allowed only in Windows NT.
For a description of the connection parameters, see Connection parameters .
The SQLLOCALE environment variable is not set by the installation program, and is required only in multi-character-set environments.
The SQLLOCALE environment variable is a single string that consists of three semi-colon-separated assignments. The assignments set out the character set, language, and collation of the environment.
For a list of supported character set labels, see Character set labels .
The SQLPATH environment variable is optional, and is not set by the installation program.
Interactive SQL searches along SQLPATH for command files and Help files before searching the system path.
The SQLREMOTE environment variable is optional, and is not set by the installation program.
Addresses for the FILE message link in SQL Remote are subdirectories of the SQLREMOTE environment variable. This variable should point to a shared directory.
On 32-bit Windows, an alternative to setting the SQLREMOTE environment variable is to set the SQL Remote\Directory registry entry to the proper root directory.
The SYBASE variable marks the home directory for installation of some Sybase applications, including Adaptive Server Enterprise and utilities such as dsedit. You need this variable only if you are using Adaptive Server Anywhere together with other members of the Adaptive Server family.
The database server creates a temporary file for various operations such as sorting and performing unions. Temporary files are placed in the directory specified by the TMP, TMPDIR, or TEMP environment variable. Adaptive Server Anywhere 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 working directory of the server.
On UNIX, the SATMP variable is used instead of the TEMP environment variable.
On Windows 95 and Windows NT operating systems, Adaptive Server Anywhere uses several registry settings. On Windows 3.x, UNIX, and Netware 3.11, these settings are held in initialization files instead.
These settings are made for you by the software, and in general operation you should not need to access the registry. The settings are provided here for those people who make modifications to their operating environment.
Some operating systems, such as Windows NT, hold two levels of system settings. Some settings are specific to an individual user, and are used only when that user is logged on; these settings are called current user settings. Some settings are global to the machine, and are available no matter which user is logged on; these are called local machine settings. You must have administrator permissions on your machine to make local machine settings.
Adaptive Server Anywhere permits both current user and local machine settings. For Windows NT, these are held in the HKEY_CURRENT_USER registry and HKEY_LOCAL_MACHINE registry, respectively.
If a setting is made in both current user and local machine registries, the current user setting takes precedence over the local machine setting.
If you are running an Adaptive Server Anywhere program as a service under Windows NT, you should ensure that the settings are made at the local machine level.
Services can continue to run under a special account when you log off a machine, as long as you do not shut the machine down entirely. They can be made independent of individual accounts, and therefore need access to local machine settings.
In addition to Adaptive Server Anywhere programs, some Web servers run as services. You must set local machine settings in order for PowerDynamo to work with such a Web server.
In general, the use of local machine settings is recommended.
On Windows 95 and Windows NT, you can access the registry directly with the registry editor. The Adaptive Server Anywhere registry entries are held in either the HKEY_CURRENT_USER or HKEY_LOCAL_MACHINE registries, in the following location:
Software Sybase Adaptive Server Anywhere 6.0 ISQL SQL Remote Sybase Central Providers
The installation program makes the following registry settings in the Sybase registry:
In the Adaptive Server Anywhere\6.0 registry, this entry holds the installation directory location. For example:
In the Adaptive Server Anywhere\6.0 registry, this entry holds a two-letter code indicating the current language for messages and errors. For example:
The default setting is English (EN). The installation program sets this entry only if the software is installed for a language other than English.
In the Sybase Central\Providers registry, this entry stores the file names of installed plug-ins for Sybase Central. Adaptive Server Anywhere has its own Sybase Central plug-in:
Adaptive Server Anywhere "c:\sybase\asa6\win32\scasany6.dll"