![]() | ![]() |
Home |
|
|
Installation Guide Adaptive Server Enterprise for Linux/Intel |
|
| Chapter 5 Post-Installation Tasks |
Chapter 5
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.
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.
From a Bourne, enter:
. SYBASE.sh
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:
DSLISTEN - Defines the name Adaptive Server uses to listen for client connections if there is no name provided on the command line during start-up. If DSLISTEN is not set, and there is no name provided during start-up, the Adaptive Server name defaults to the server name given at installation.
DSQUERY - Defines the Adaptive Server name that client programs try to connect to if an Adaptive Server is not specified by name during a connection attempt. If DSQUERY is not set, and you do not supply the Adaptive Server name, clients attempt to connect to the server name provided during installation.
SYBASE - Defines the path of the Sybase installation directory. The installation program sets up the variable SYBASE to point to the release directory specified during installation.
SYBASE_ASE - Defines the installation directory of Adaptive Server components.
SYBASE_OCS - Defines the installation directory of Open Client.
SYBASE_ FTS - Defines the directory for the enhanced full-text search components. The enhanced full-text search engine must be licensed before you can use it, and it is only installed if you selected the "full" or "customized" installation option.
SYBASE_SYSAM - Points to the license-management software directory.
LM_LICENSE_FILE - Points to the license.dat file in the $SYBASE/$SYBASE_SYSAM/licenses (%SYBASE%\%SYBASE_SYSAM%\licenses on Windows) directory.
PATH - Specifies which directory path to search for executables.The Sybase executables are located in the installed component's /bin directory.
When using the source files: SYBASE.csh or SYBASE.sh, the following paths are added to the beginning of the PATH environment variable:
$SYBASE/$SYBASE_ASE/bin:$SYBASE/$SYBASE_OCS/bin: $SYBASE/$SYBASE_FTS/bin:$SYBASE/$SYBASE_SYSAM/bin: $SYBASE/shared/jre-1_2/bin
For instructions on setting jConnect environment variables, see the documentation for jConnect.
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.
To determine whether the servers you installed are running, do either of the following:
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>
At the UNIX prompt, enter:
$SYBASE/$SYBASE_ASE/install/showserver
showserver shows all Adaptive Server-related processes are on the system.
Use isql or dsedit to perform a quick test. Use isql to connect to servers:
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.
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.
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:
From a UNIX command line, enter:
source $SYBASE/SYBASE.csh
Then enter:
$SYBASE/sybcent32/scjview
In the left pane, click on the server you want to connect to.
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.
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.
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.
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.
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.
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. |
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:
Use sp_diskdefault to specify a default device other than the master device. For information on sp_diskdefault, see the Adaptive Server Reference Manual.
Modify each sample database installation script to specify a different device.
Start Adaptive Server.
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.
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.
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
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 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 databaseBe sure iso_1 or Roman8 is installed as the default character set or as an additional character set.
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.
Make a copy of the original installintpubs script. Be sure you can access this copy, in case you experience problems with the edited script.
Use a text editor to edit the script, if necessary, to specify a default device other than the master device, or use sp_diskdefault.
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.
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 databaseTo install the jpubs database:
Set your terminal to display 8-bit characters.
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.
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.
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.
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 ".
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/installjpubsFor more information on the -J option in isql, see Adaptive Server Enterprise Utility Guide.
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.
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.
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.
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 .
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 modulesInstall 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.
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.
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
Replace sort_order_file with the name of the sort order file. Replace character_set with the Sybase name for your character set.
Use charset to load any additional character sets. See Table 5-2 for 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 ] |
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.
Using isql, log in to your server as "sa" and select the master database.
1> use master
2> go
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
Replace sort_order_id with the ID for your sort order. Replace character_set with the Sybase name for your character set.
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.
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.
This section provides instructions for installing online help for Transact-SQL 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.
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.
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:
Use sp_diskdefault to specify a default device other than the master device. For information about sp_diskdefault, see the Reference Manual.
Modify each sybsyntax installation script that you plan to execute to specify a different device, as explained in the following section.
For each sybsyntax installation script you want to execute:
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.
Make a copy of the original script. Be sure you can access this copy, in case you experience problems with the edited script.
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".
Comment out the following section, which specifies the default device:
/* create the database, if it does not exist */
if not exists (select name from sysdatabases
where name = "sybsyntax")
begin
/* create the sybsyntax table if it doesn't exist */
/* is the space left on the default database
devices > size of model? */
if (select sum (high-low +1) from sysdevices where status
& 1 = 1) - (select sum(size) from sysusages, sysdevices
where vstart >= sysdevices.low
and vstart <= sysdevices.high
and sysdevices.status &1 = 1) >
(select sum(sysusages.size) from sysusages
where dbid = 3)
begin
create database sybsyntax
end
else
begin
print "There is not enough room on the default
devices to create the sybsyntax database."
return
end
endAfter you have commented out this entire section, add a line like this to the script:
create database sybsyntax on device_name
where device_name is the name of the device where you want to install sybsyntax.
Execute the script with a command like the following:
isql -Usa -Ppassword -Sservername
$SYBASE/$SYBASE_ASE/scripts/ins_syn_sqlwhere 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_sqlTo 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."
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.
|
|