[Prev] [Top] (3 out of 3)

Database Requirements

Sybase

Since tutorials require data from a database, as well as dynamic SQL and Stored Procedures to manipulate the data, you will have to load the pubs2 database which comes with Sybase. The following steps load the pubs2 database to the server, create the necessary Stored Procedures for the tutorials, and grant the correct permissions to use them:

1. If the SYBASE environment variable is not set, replace it with the full path to where Sybase is loaded.
The SAPPHIRE environment variable must be set to use this script. To set your SAPPHIRE environment variable to the root directory of the Sapphire/Web distribution:

C Shell
setenv SYBASE sybase-distribution-directory
setenv SAPPHIRE distribution-directory
Bourne /Korn Shell
SYBASE=sybase-distribution-directory; export SYBASE
SAPPHIRE=distribution-directory; export SAPPHIRE To load 
the pubs2 database, at the command line type:
$SYBASE/bin/isql -Uuser -Sservername-				
i$SYBASE/scripts/installpubs2
user: is the dbo's username
servername: is the name of the server on which to install pubs2.
2. To load the tutorial procedures and tables into the pubs2 database, type the following at the command line
$SAPPHIRE/bin/loadtuts sa  servername 
sa: is the owner of pubs2
servername: is the name of the server on which you installed pubs2
3. To load the tutorial DSQL Objects into the correct location, at the command line type:
$SAPPHIRE/bin/install_db servername owner S
servername: is the name of the server where pubs2 is located
owner: is the username of the pubs2 database owner (should be dbo)
S: Vendor Type should always be S for Sybase

Oracle

Since tutorials require data from a database, as well as dynamic SQL and stored procedures to manipulate the data, you will have to load a set of tables which are supplied with the Sapphire/Web distribution. The following steps load these tables into an Oracle database, create the necessary stored procedures for the tutorials, and grant you the correct permissions to use them:

1. The SAPPHIRE environment variable must be set to use this script. To set your SAPPHIRE environment variable to the root directory of the Sapphire/Web distribution:

C Shell
setenv SAPPHIRE distribution-directory
Bourne/Korn Shell
SAPPHIRE=distribution-directory; export SAPPHIRE

2. To load the required tables, at the command line type:
$SAPPHIRE/bin/build_pubs2_ora user pword database 0
user: is the username of the user who is to own the tables (you may wish to use the scott/tiger account).
pword: password of the user who is to own the tables
database: is the name or SID of the database in which to install the tables
0: should always be 0 (zero).
Note: You may see some error messages as the script runs; please ignore them.
3. To load the tutorial's DSQL Objects into the correct location, at the command line type:
$SAPPHIRE/bin/install_db sid owner O
sid: is the SID of the database where the sample tables are located
owner: is the username of the owner of the sample tables
O: Vendor Type should always be O for Oracle

Informix Database Requirements

Since the Sapphire/Web tutorials require data from a database, as well as a dynamic SQL and Stored Procedures to manipulate the data, you will have to import the database which is supplied with the Sapphire/Web distribution. These tutorials assume that each person using the tutorials has connect privileges, granted for the pubs2 database. The following steps load the pubs2 database onto the server, create the necessary Stored Procedures for the tutorials, and grant the correct permissions to use them:

Note: If you were a beta tester for Sapphire/Web and have already installed the pubs2 database you will need to drop the database before running these scripts.
These steps assume you are running as the user who is to own the tutorial database and has priveleges to create a database on the chosen server. The name of this user is usually informix.
1. If the INFORMIXDIR environment variable is not set, replace it with the full path to where Informix is loaded.
The SAPPHIRE environment variable must be set to use this script. To set your SAPPHIRE environment variable to the root directory of the Sapphire/Web distribution:

C Shell
setenv INFORMIXDIR informix-distribution-directory
setenv SAPPHIRE distribution-directory
Bourne/Korn Shell
INFORMIXDIR=informix-distribution-directory; export 
INFORMIXDIR
SAPPHIRE=distribution-directory; export SAPPHIRE
2. To import pubs2 into your server, at the command line type:
$SAPPHIRE/bin/build_pubs2_inf server
server: is the server where the pubs2 database is to be imported

Note: To load the tutorial's DSQL Objects into the correct location, at the command line type:
$SAPPHIRE/bin/install_db server owner I
server: is the server where the imported pubs2 database is located.
owner: is the username of the owner of the pubs2 database.
I : Vendor Type should always be I for Informix.

3. Finally, grant connect priveleges to all potential users of the pubs2 database.


[Prev] [Top] (3 out of 3)