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

Chapter 4 Installing
Sybase Servers [Table of Contents] Chapter 6 Installing
Sybase PC-Client Products

Installation Guide Adaptive Server Enterprise for Linux/Intel

[-] Chapter 5 Post-Installation Tasks

Chapter 5

Post-Installation Tasks

After the installation process, you have a minimally configured Adaptive Server. This chapter describes post-installation tasks to administer Adaptive Server and install stored procedures and sample databases. For more information see the Adaptive Server Configuration Guide for your platform.

Setting environment variables

It is crucial to the operation of Sybase products that the system environment variables be set correctly. The following list describes the Sybase environment variables that are set by the Redhat Package Manager (RPM). RPM also generates a file that you can execute if you need to reset environment variables for any reason.

Environment variables are set in the user's environment either interactively or by including them in the user's .login and .cshrc files (for C shell) or .profile file (for Bourne shell).

You can set environment variables by running the SYBASE.csh or SYBASE.sh script file.

  1. From a Bourne, enter:

     . SYBASE.sh

  2. From a C shell, enter:

    source SYBASE.csh

The script file does not set jConnect or Java utility environment variables. See the product documentation .

The environment variables are:

For instructions on setting jConnect environment variables, see the documentation for jConnect.

Setting environment variables

During the installation process, RPM generates C-shell and Bourne-shell files containing environment variables. The files are located in:

$SYBASE/SYBASE.sh, $SYBASE/SYBASE.csh

If you install multiple versions of Adaptive Server, or if you intend to access different Adaptive Servers on your network, you may want to change the environment variables PATH, DSLISTEN, DSQUERY, TEMP, CLASSPATH, SYBASE, SYBASE_ASE, SYBASE_OCS, and SYBASE_FTS.

Verifying that servers are running

To determine whether the servers you installed are running, do either of the following:

  1. For each server, enter the following command at the UNIX prompt enter:

    $SYBASE/$SYBASE_OCS/bin/isql -Usa -P -Sserver_name

    where server_name is the name of the server you want to check. If the server is running, you will see the isql prompt:

    1>

  2. At the UNIX prompt, enter:

    $SYBASE/$SYBASE_ASE/install/showserver 

    showserver shows all Adaptive Server-related processes are on the system.

Verifying that you can connect to servers

Use isql or dsedit to perform a quick test. Use isql to connect to servers:

  1. At the command prompt enter:

    isql -Usa -Ppassword -Sserver_name

    where server_name is the Adaptive Server, Monitor Server, or Historical Server name.

    The command prompt is displayed if the login is successful.

  2. To display the Adaptive Server version number, enter:

    1> select @@version
    2> go

    Adaptive Servers's version number is displayed. The output should show Adaptive Server at version 12.5.

Connecting to Adaptive Server via Sybase Central

Sybase Central provides a graphical user interface where you can perform Adaptive Server administrative tasks. The Sybase Central interface is very similar to the Windows Explorer, with a hierarchical list of all servers in the left pane and a details list of the selected server in the right pane. To select a server, click on it with the mouse in the left pane.

To launch Sybase Central:

  1. From a UNIX command line, enter:

    source $SYBASE/SYBASE.csh

  2. Then enter:

    $SYBASE/sybcent32/scjview

  3. In the left pane, click on the server you want to connect to.

  4. At the Login window, enter, the System Administrator's user name and password.

    You must log in as the System Administrator to perform administrative tasks.

  5. Click OK.

Warning!

The first time you log in to Adaptive Server, use the default "sa" user name and leave the password blank. After you log in for the first time, you should change the System Administrator's password. See "Setting the System Administrator password".

Sybase Central has online help files. To access the online help, right-click on the server icon, the select Online help from the drop-down list. To access online help for Sybase Central, select Help from the menu bar, then select Sybase Central Help.

Setting the System Administrator password

Setting the Sybase system administrator password

A user account called "sa" is created for the Sybase System Administrator when you install the Sybase software. A user logged in as "sa" can use any database on Adaptive Server, including master, with full privileges.

Immediately after a new installation, there is no password on the "sa" account. The initial default value for the password is NULL. In a production environment, the Sybase System Administrator should always use a non-default password.

  1. The Sybase System Administrator should log in to the new Adaptive Server as "sa" and set a password using sp_password:

    $SYBASE/$SYBASE_OCS/bin/isql -Usa -P -Sserver_name1> sp_password null, new_password 2> go

    where null is the default password and new_password is the password that you are assigning to the "sa" account.

Installing sample databases

This section describes how to install the U.S. English and international language sample databases. For installation instructions specific to each sample database, see the following sections:

The sample databases contain information about a fictitious business. You can use this information to learn about the Sybase products, without affecting essential data while learning.

Table 5-1 lists the scripts that you can use to install the sample databases.

Sample database scripts

Script

Description

installpubs2

Installs the pubs2 sample database.

This database contains data that represents a publishing operation. Use this database to test your server connections and to learn Transact-SQL. Most of the examples in the Adaptive Server documentation query the pubs2 database.

installpubs3

Installs the pubs3 sample database.

This updated version of pubs2 uses referential integrity. In addition, its tables are slightly different than the tables used in pubs2. Where noted, the Adaptive Server documentation uses the pubs3 database in its examples.

installpix2

Installs the image data that is used with the pubs2 database.

The master device size should be at least 30MB to install the full pubs2 database, including the image data. Be sure to run the installpix2 script after you run installpubs2.

psdemodb

Installs the Powersoft sample database for PC-clients.

For information on installing psdemodb, see Sybase Adaptive Server Configuration Guide.

Default devices for sample databases

The $SYBASE/scripts directory contains scripts for installing the us_english sample database, foreign language sample databases, and the image data associated with the U.S. English pubs2 sample database.

If you have not used sp_diskdefault to change the status of the master device or to specify another default device, the scripts install the sample databases on the master device. This configuration is not recommended because it uses valuable space that is best used for system tables. Each sample database requires 3MB on your database device.

To avoid installing sample databases on the master device, either:

Running the database scripts
  1. Start Adaptive Server.

  2. Determine the type (raw partition, logical volume, operating system file, and so on) and location of the device where you will be storing the pubs2 and pubs3 databases. You will need to provide this information later.

  3. Make a copy of the original installpubs2 and installpubs3 scripts. Be sure you can access the copies, in case you have problems with the edited scripts.

  4. Use a text editor to edit the script, if necessary, to specify a default device other than the master device, or use sp_diskdefault.

    From the Adaptive Server scripts directory ($SYBASE/$SYBASE_ASE/scripts), use isql to log into Adaptive Server and run the script:

    isql -Usa -P -Sserver_name -iscript_name 

    where server_name represents the destination server for the database and script_name is the full path to and file name of the script to run.

    For example, to install pubs2 on a server named VIOLIN, enter:

    isql -Usa -P -SVIOLIN 
    -i $SYBASE/$SYBASE_ASE/scripts/installpubs2

  5. To install the image data associated with pubs2 (pubs3 does not use image data) run:

    isql -Usa -Ppassword -Sservername
        -i $SYBASE/$SYBASE_ASE/scripts/installpix2

The image data requires a fair amount of space--there are six pictures, two each in the PICT, TIFF, and Sun raster file formats. Run installpix2 script only if you want to use or test the image datatype. Sybase does not supply any tools for displaying image data. You must use appropriate screen graphics tools to display the images after you have extracted them from the database.

For more information about running these scripts, see Configuring Adaptive Server Enterprise .

interpubs database

interpubs is a database similar to pubs2 that contains French and German data. This data contains 8-bit characters and is available for use at Adaptive Server installations using the ISO 8859-1 (iso_1) or Roman8 (for HP-UX) character set. To display the French and German data correctly, you must set up your terminal to display 8-bit characters.

Installing the interpubs database
  1. Be sure iso_1 or Roman8 is installed as the default character set or as an additional character set.

  2. Determine the type (raw partition, logical volume, operating system file, and so on) and location of the device where you will be storing the interpubs database. You will need to provide this information later.

  3. Make a copy of the original installintpubs script. Be sure you can access this copy, in case you experience problems with the edited script.

  4. Use a text editor to edit the script, if necessary, to specify a default device other than the master device, or use sp_diskdefault.

  5. Execute the script, using the -J flag to ensure that the database is installed with the correct character set:

    isql -Usa -Ppassword -Sservername -Jiso_1 
        -i $SYBASE/$SYBASE_ASE/scripts/iso_1/installintpubs

For more information on the -J option in isql, see the Utility Guide.

jpubs database

If you installed the Japanese Language Module with your Adaptive Server, the scripts file contains the installjpubs script for installing the jpubs database. jpubs is a database similar to pubs2 that contains Japanese data. installjpubs uses either the EUC-JIS (eucjis) or the Shift-JIS (sjis) character set.

Installing the jpubs database

To install the jpubs database:

  1. Set your terminal to display 8-bit characters.

  2. Verify that either the EUC-JIS or Shift-JIS character set is installed as Adaptive Server's default character set or as an additional character set.

  3. Determine the type (raw partition, logical volume, operating system file, and so on) and location of the device where you will be storing the jpubs database. You will need to provide this information later.

  4. Make a copy of the original installjpubs script. Be sure that you can access this copy, in case you experience problems with the edited script.

  5. Use a text editor to edit the script, if necessary, to specify a default device other than the master device, or use sp_diskdefault. See "Default devices for sample databases ".

  6. Execute the installjpubs script, using the -J flag to ensure that the database is installed with the correct character set:

    isql -Usa -Ppassword -Sservername -Jeucjis 
    -i $SYBASE/$SYBASE_ASE/scripts/eucjis/installjpubs

    or:

    isql -Usa -Ppassword -Sservername -Jsjis 
        -i $SYBASE/$SYBASE_ASE/scripts/sjis/installjpubs

    For more information on the -J option in isql, see Adaptive Server Enterprise Utility Guide.

Maintaining the sample databases

The sample databases contain a "guest" user that allows access to the database by any authorized Adaptive Server user. The "guest" user has a wide range of privileges, including permissions to select, insert, update, and delete user tables. For more information about the "guest" user and a list of "guest" permissions, see the System Administration Guide.

If possible, and if space allows, give each new user a clean copy of the sample databases so that she or he is not confused by other users' changes.

If space is a problem, you can instruct the user to issue the begin transaction command before updating a sample database. After the user has finished updating one of the sample databases, he or she can issue the rollback transaction command to undo the changes.

jConnect 4.5, 5.5, and Java utilities

When you install jConnect 5.5, you receive classes that are compatible with JDBC 2.0, regardless of which JDK (1.1.x or 1.2) version you use. The following table lists the JDK and jConnect versions necessary to develop applications that are compliant with different versions of JDBC.

If you are developing...

Use JDK version...

Use jConnect version

JDBC 1.x applications/servlets

1.1.x or compatible browser

4.x

JDBC 2.x applications/servlets

1.2.x or

compatible browser

5.x

For information on developing applets with jConnect, see jConnect for JDBC x.x Product Documentation .

The Java VM security manager does not allow a version of jConnect installed in your local file system to create a connection to a server, even if the server is your local system. This can create a problem if you use Netscape to run an applet that uses jConnect.

When Netscape needs to load jConnect to create a connection to a server, it looks for a CLASSPATH defined in its environment to find the jConnect classes. If it finds a CLASSPATH that you have defined to point to your local jConnect installation, it loads jConnect directly from the local file system, rather than from the server, and tries to create a connection. This generates a security error and the connection fails.

Therefore, if you are using Netscape to run jConnect applets, do not set the CLASSPATH to the local jConnect directory.

Using open database connectivity

Some applications do not connect to Adaptive Server directly through the Open Client software but through the Open Database Connectivity (ODBC) driver, or the jConnect driver instead. For example, PowerDynamo connects through the ODBC driver.

ODBC and OLE DB require the Microsoft Data Access Component (MDAC). You can download it directly from Microsoft's Web site

See Configuring Adaptive Server Enterprise for your platform for more information.

Installing stored procedures

By default, all Adaptive Server store procedures are installed during the installation process. If you need to re-install the jConnect stored procedures for any reason, see jConnect for JDBC documentation set .

Installing character sets

By default, when Adaptive Server and Backup Server are installed on Linux/Intel systems, the installation installs the character set files for iso_1 which supports the Western European languages.

In addition, the installation defaults include sort-order definition files for Western European character sets and U.S. English system message files.

If you want Adaptive Server error messages to display in a language other than U.S. English (us_english), you must install the appropriate language module.

Warning!

Make all changes to the default character set and sort order for a new Adaptive Server before creating any user databases or making any changes to the Sybase-supplied databases. Changing the character set and sort order after data or data structures have been added to Adaptive Server can cause incorrect behavior. To change the character set or sort order after you have added data, see the System Administration Guide.

Installing new language modules
  1. Install the language modules into the same directory where you installed Adaptive Server.

    Each language uses about 2MB of database space per module. If necessary, use the alter database command to increase the size of the master database before adding another language. For more information, see the System Administration Guide.

  2. Use charset to load the default character set and sort order.

    Use charset only at the time of installation. For alternative methods, see Localization in the Adaptive Server Configuration Guide.

  3. To use charset, the server must be running and you must have System Administrator privileges. Use the file name of the sort order:

    $SYBASE/SYBASE_ASE/bin/charset -Usa -Ppassword 
    -Sserver_name sort_order_file
    character_set

  4. Replace sort_order_file with the name of the sort order file. Replace character_set with the Sybase name for your character set.

  5. Use charset to load any additional character sets. See Table 5-2 for charset syntax.

charset syntax

Syntax

charset [sort_order_file | charset.loc] charset_directory

Usage

charset
[ -U username ]
[ -P password ]
[ -S server ]
[ -I interfaces ]
[ -v version ]
[sort_order_file | charset.loc ]
[ charset_directory ]

Installing character-set definition files

If you plan to use the Adaptive Server built-in character-set conversions, you must load the character-set definition files for all the character sets on your client platforms. If you are using the Unilib character-set conversions, you do not need to do this.

  1. Using isql, log in to your server as "sa" and select the master database.

    1> use master
    2> go

  2. Use the ID of the sort order to configure your server for the new character set and sort order.

    1> sp_configure "default sort_order_id",
    2> sort_order_id, "character_set"
    3> go

  3. Replace sort_order_id with the ID for your sort order. Replace character_set with the Sybase name for your character set.

  4. Shut down the server to start the reconfiguration process.

    Use the normal process on your UNIX system to restart the server, usually by invoking one of the RUN_xxx scripts from $SYBASE/$SYBASE_ASE/install.

  5. The server starts, rebuilds all the system indexes, then shuts down. Restart a second time to bring the server up in a stable state.

To change the default character set and sort order of Adaptive Server after the initial installation, see the System Administration Guide.

Installing online help for Transact-SQL syntax

This section provides instructions for installing online help for Transact-SQL syntax.

Online syntax help: sp_syntax

In the scripts directory there are scripts for installing the syntax help database, sybsyntax. You can retrieve this data with the sp_syntax system procedure. The scripts are located in:

$SYBASE/$SYBASE_ASE/scripts/ins_syn_sql

For more information on sp_syntax, see the Reference Manual.

This script includes syntax information for Transact-SQL, the system procedures, and the Sybase utilities. When you execute this script, you install the SQL portion of the sybsyntax database.

When you first execute this script, it creates the sybsyntax database and the necessary tables and indexes. If you execute the script a second time, the previously installed rows of information are deleted from the table in the database and then reinstalled.

Default device for the sybsyntax database

By default, the sybsyntax installation scripts install the sybsyntax database on the device that is designated as the default database device.

Table 5-3 lists the minimum sybsyntax database requirements.

sybsyntax requirements

Logical page size

2K

4K

8K

16K

Minimum database size

3MB

5MB

Same size as the model

Same size as the model

If you have not used sp_diskdefault to change the status of the master device (which is installed as the default disk) or to specify another default device, the scripts install sybsyntax on the master device. This configuration is not recommended because sybsyntax uses valuable space, which is best left available for future expansion of the master database.

To avoid installing sybsyntax on the master device, do one of the following:

Installing sybsyntax

For each sybsyntax installation script you want to execute:

  1. Determine the type (raw partition, logical volume, operating system file, and so on) and location of the device where you plan to store the sybsyntax database. You will need to provide this information later.

  2. Make a copy of the original script. Be sure you can access this copy, in case you experience problems with the edited script.

  3. Use a text editor to edit the script, if necessary, to change the default device from the master device to the device created in step 1. For information on the default device, see "Default device for the sybsyntax database".

  4. Execute the script with a command like the following:

    isql -Usa -Ppassword -Sservername
        $SYBASE/$SYBASE_ASE/scripts/ins_syn_sql

    where sa is the user ID of the System Administrator, password is the System Administrator's password, and servername is the Adaptive Server where you plan to install the database.

    If you have set the DSQUERY environment variable to the servername, you can replace the server name with DSQUERY. For example:

    isql -Usa -Ppassword -S$DSQUERY 
        $SYBASE/$SYBASE_ASE/scripts/ins_syn_sql

  5. To ensure that you have installed the sybsyntax database and that it is working correctly, use isql to log in to the server on which you installed the database, and execute sp_syntax. For example:

    isql -Usa -Ppassword -Sservername 
    
    1> sp_syntax "select" 
    2> go 

    Adaptive Server displays a list of commands that contain the word or word fragment "select."

Configuring XP Server after initial installation

If you install Adaptive Server and XP Server in the same build session, srvbuild automatically adds information about the XP Server to the sysservers table of Adaptive Server. If you install XP Server in a different build session than the Adaptive Server installation, you are prompted during the XP Server installation process to supply the name of the related Adaptive Server and the System Administrator's name and password. This information is required by Adaptive Server to start XP Server.

If you do not supply this information during the installation process, XP Server cannot run. When you execute an extended stored procedure (ESP), you see an error message similar to the following:

Msg 11018, Level 16, State 1:
Procedure 'xp_cmdshell', Line 2
XP Server must be up for ESP to execute.

To add this required information to the sysservers table manually, enter:

sp_addserver servername_XP, NULL, servername_XP

where servername is the name of the Adaptive Server.


Installing the documentation [Table of Contents] Chapter 6 Installing
Sybase PC-Client Products