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

Chapter 1: Introduction [Table of Contents] Chapter 3: Network Configuration Files

System Administration Guide Supplement for OS/2

[-] Chapter 2: Operating System Setup

Chapter 2

Operating System Setup

This chapter discusses operating system issues that must be considered in order to run SQL Server. Topics covered include:

SQL Server Environment Variables

Before you install SQL Server using the pmconfig or sybinit utility (see the SQL Server Installation Guide for instructions about installing SQL Server), you need to add and modify several OS/2 environment variables.

You can set environment variables in one of two ways:

Table 2-1: Summary of environment variables summarizes the environment variables.

Table 2-1: Summary of environment variables
Variable Sample Value Function
DSLISTEN c:\sql10 Used at SQL Server start-up; enables the server to listen for input from front-end software.
DSQUERY c:\sql10 Defines the SQL Server to which local client applications connect.
INCLUDE %INCLUDE%
;c:\sql10\include
Appends the location of include files for Sybase connectivity products.
LIB %LIB%;c:\sql10\lib Appends the location of library files for Sybase connectivity products.
PATH %PATH%;c:\sql10\bin Appends the full path to the SQL Server bin subdirectory.
LIBPATH ;c:\sql10\dll Appends the full path to the SQL Server dll subdirectory.
SYBASE c:\sql10 Defines the SYBASE release directory for SQL Server.
HELP %HELP%;c:\sql10\help Appends the full path to the SQL Server help subdirectory.

Environment Variable Descriptions

The following sections describe each environment variable in detail.

DSLISTEN

The DSLISTEN environment variable defines the name SQL Server uses to listen for client connections, if no name is given during SQL Server start-up. If DSLISTEN is not set and no name is given during start-up, the SQL Server name defaults to "SYBASE."

DSQUERY

The DSQUERY environment variable defines the SQL Server name that client programs will try to connect to if no SQL Server name is specified via a command line option. If DSQUERY is not set and you do not supply the SQL Server name via a command line option, clients will attempt to connect to the server named "SYBASE".

INCLUDE

The INCLUDE environment variable specifies the full directory path to search for header files when compiling an application. You have to append the path to the Open Clientä/Server product header files to the current value of the INCLUDE environment variable. These header files are located in the include subdirectory of the SYBASE root directory.

LIB

The LIB environment variable specifies the full directory paths to search for link library files when linking a compiled application. You have to append the path to the Open Client/Server product library files to the current value of the LIB environment variable. These library files are located in the lib subdirectory of the SYBASE root directory.

PATH

The PATH environment variable specifies the directory paths to search for executables. The SYBASE executables are located in the bin directory in the SYBASE root directory. You have to append these paths to the PATH environment variable.

LIBPATH

The LIBPATH environment variable specifies the directory paths to search for DLLs. The SYBASE DLLs are located in the dll directory in the SYBASE release directory. You have to append these paths to the PATH environment variable.

Warning! Keep all SYBASE DLLs in the directories where they were installed. To avoid possible confusion about current DLLs, do not keep multiple versions of SYBASE DLLs on your machine.

SYBASE

The SYBASE environment variables define the path of the SYBASE release directory. The default root directory is C:\ sql10 . The setup installation utility needs a SYBASE environment variable value to correctly load the software from the distribution disks.

The value of SYBASE includes drive information, if it has been defined. You may change the drive information, but you should not remove it.

HELP

The HELP environment variable specifies the full path to the IPF files that make up the online help system for the pmconfig installation utility. The HELP environment variable should be set before you start the setup installation utility . Although it is not necessary for the HELP environment variable to be set to have a successful installation of SQL Server, you will receive an error messages stating "Help Not Available" if it is not set.

Setting Environment Variables

You may need to modify the environment variables listed in
Table 2-1 if you install multiple versions of SQL Server or if you intend to access different SQL Servers on your network.

Setting Variables Locally

To set a variable within a window, use the SET command to set the variables. For example, to set the SYBASE variable to C:\sql10 from the OS/2 prompt:

 SET SYBASE=C:\sql10 

Setting Variables Globally

To set the environmental variables throughout the system, edit the config.sys file to include all the SET variable commands. See your OS/2 documentation for information about editing the config.sys file.

Starting SQL Server

You can start SQL Server at the OS/2 prompt using the sqlsrvr.exe command:

 sqlsrvr -i  sql.ini_path   -s  server_name  
-d master_device -e errorlog_file

For example, to start a SQL Server with the sql.ini file in c:\sql10\ini\ , a server name of ACCT_SERV , a master device as d:\sql10\master.dat , and the error log file as c:\sql10\errorlog :

 sqlsrvr -ic:\sql10\ini\ -sACCT_SERV  
-dc:\sql10\master.dat -ec:\sql10\errorlog

If the SYBASE variable is set and you omit the -i flag, the sql.ini path defaults to the directory pointed to by SYBASE.

If the -e flag is omitted, the errorlog path defaults to the directory where you started SQL Server.

Starting SQL Server At System Start-Up

SQL Server can be automatically started when you boot the machine. To do this, add the SQL Server start-up command described in the previous section into the OS/2 startup.cmd file. See your OS/2 documentation or online help for information on these topics.

What's Next?

Chapter 3 discusses the sql.ini file, the file SQL Server uses to communicate with client software.


Chapter 1: Introduction [Table of Contents] Chapter 3: Network Configuration Files