Sybase Technical Library - Product Manuals Home
[Search Forms] [Previous Section with Hits] [Next Section with Hits] [Clear Search] Expand Search

 About This Book [Table of Contents] Chapter 2:  The Database Server

ASA Reference Manual

[-] Chapter 1: File Locations and Installation Settings

Chapter 1

File Locations and Installation Settings

About this chapter

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.

Installation directory structure

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

The Adaptive Server Anywhere installation directory itself holds several items, including the following:

For platforms other than Novell NetWare and Windows CE, there are several directories under the installation directory:

Novell NetWare file locations

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.

Windows CE file locations

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

How Adaptive Server 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, Adaptive Server Anywhere 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.

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.

Extensive file searching

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:

Environment variables

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.

Setting environment variables

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:

export VARIABLE=value

In other shells (such as csh, tsch) the line is as follows:

setenv VARIABLE value

ASTMP environment variable


ASTMP= directory-name




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.

LD_LIBRARY_PATH environment variable [UNIX]


LD_LIBRARY_PATH= installation_path/lib


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.

PATH environment variable


PATH= installation_path


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.

SATMP environment variable


SATMP= temp_directory


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 environment variable


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 .

SQLLOCALE environment variable


SQLLOCALE= Charset=cslabel;Language=langlabel;CollationLabel=colabel

See also

Understanding locales


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 .

SQLPATH environment variable




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.

SQLREMOTE environment variable




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.

SYBASE environment variable




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.

TEMP environment variable






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.

Registry entries and INI files

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.

Current user and local machine settings

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.

Current user takes precedence

If a setting is made in both current user and local machine registries, the current user setting takes precedence over the local machine setting.

When local machine settings are needed

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.

Registry structure

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:

		Adaptive Server Anywhere
		SQL Remote
		Sybase Central

Registry settings on installation

The installation program makes the following registry settings in the Sybase registry:

 About This Book [Table of Contents] Chapter 2:  The Database Server