More Sybase Information
How Do I Set Up My Environment To Use Sybase?
Before you may access Sybase, you must have a Sybase account set up for you, and have the proper UNIX environment variables set.
If you are taking a course that requires Sybase, your instructor will tell you what Sybase account to use.
Examples are given (in csh/tcsh and bash/sh/ksh shell syntax) to set up your UNIX environment for SYBASE. Of course, it's much easier to add these lines to your .cshrc.local or .profile file so you don't have to type them every time you log in or pull up a new window.
SYBASE environment variable
Set the environment variable
SYBASE to the directory containing the Sybase installation you want to use, currently
/s/sybase for Sparcstations running Solaris (Sunos 5.x). Refer to the "Location" column of the SYBASE SQL Server And Tools On Computer Systems Lab Workstations support table for the value of SYBASE based on the software you are trying to use.
e.g. (csh/tcsh) % setenv SYBASE /s/sybase
(bash/ksh) % SYBASE=/s/sybase
% export SYBASE
DSQUERY environment variable
You need to set the
DSQUERY environment variable to the name of the SQL server you want to connect to. This name must correspond to one of the servers listed in the "interfaces" file located in the $SYBASE directory.
The SQL server used for instructional purposes is named UWCS.
e.g. (csh/tcsh) % setenv DSQUERY UWCS
(bash/ksh) % DSQUERY=UWCS
% export DSQUERY
Adding Sybase to your path
You need to add the Sybase binaries to your path.
e.g. (csh/tcsh) % set path=($path $SYBASE/bin)
(bash/ksh) % PATH=$PATH:$SYBASE/bin
% export PATH
Submitting queries to Sybase
Use the isql command to submit queries to Sybase.
e.g. % isql (to login to sybase with your UNIX login)
% isql -Ujoe (to login to sybase as user "joe")
Type in your query. Type
go on a line by itself to execute the query. Type
vi on a line by itself to go into the vi editor with the current query, or the previous one if nothing has been typed yet.
For more information on the isql utility or the Transact SQL query language, you browse the below documentation.
CSL SyBooks For Sybase
SyBooks - DynaText Sybase manual browser.
Versions
The manuals installed with SyBooks 2.2 are for Sybase System XI (that is, SQL server 11.0.x) and Open Client/Server 10.0.2 There are no online manuals available for earlier versions (eg. SQL server 4.9.2 installed on SunOS, HPUX, and the NCR UNIX machines), but hardcopies of these manuals may be checked out from the lab.
Architecture Availability
SyBooks is currently installed on the following architectures running AFS:
How to Use Sybooks
To use sybooks, you must first configure your environment by setting the following environment variables:
- SYBROOT=/s/sybooks
- EBTRC=/s/sybooks/.ebtrc
- modify your path to include $SYBROOT/bin
- Starting SyBooks will create the directories "sybooks" and "sybooks/annot" in your home directory to save your personal annotations.
After you've set up your environment, you can start sybooks with the command "sybooks". Happy browsing.
Help For Sybooks
There are no manual pages for sybooks, but there is a Help option in the title bar of most menus.
Is There A Brief Syntax List Of Transact SQL Commands?
Yes. Refer to Brief Command Syntax For Sybase .