Setting up petclinic database on nonstop – HP Integrity NonStop H-Series User Manual
Page 50
Command Prompt> ant –buildfile build_jdbct2.xml all
•
If you plan to use the JDBC Type 4 driver, build the PetClinic web archive using
the command:
Command Prompt> ant –buildfile build_jdbct4.xml all
3.
If the PetClinic build is successful, a new directory named
dist
is created in the <
My
SASH Home>\spring\samples\petclinic
directory. The application
WAR
file
(petclinic.war)
is created in the
dist
directory.
Setting up PetClinic Database on NonStop
To set up the PetClinic database on your NonStop system, complete the following steps:
1.
Edit the
<My SASH
Home>\spring\samples\petclinic\db\petclinic_tables_script.sql
file to
include the following:
•
<$datavol>
: specify the Guardian volume for the primary partition of the table. For
example:
$data01
•
: specify the owner of the schema. For example:
super.sashusr
•
: specify the location of the metadata tables for the catalog. For example:
\NSK01.$data01
•
: specify the designated subvolume name for the schema. For
example:
SASH1
NOTE:
The subvolume name must only be five characters long.
2.
Create a directory in OSS to place the database script files, using the command:
OSS> mkdir –p
For example:
OSS> mkdir –p /home/sash_usr/sash/spring/samples/petclinic/dbconfig
NOTE:
<
NonStop SASH Home
> can be any working directory. It is suggested that you
create
spring/samples/petclinic/dbconfig
directory structure in <
NonStop SASH
Home
>.
3.
Copy the following scripts from the
<My SASH Home>\spring\samples\petclinic\db
Windows directory to the
<NonStop SASH
Home>/spring/samples/petclinic/dbconfig
OSS directory:
•
petclinic_tables_script.sql
•
petclinic_dataload_script.sql
NOTE:
•
The
petclinic_tables_script.sql
script creates the SQL/MX database catalog,
schema, and tables for PetClinic.
•
The
petclinic_dataload_script.sql
script loads the database with sample data.
4.
Go to the OSS directory where the
petclinic_tables_script.sql
and
petclinic_dataload_script.sql
files are copied using the command:
OSS> cd <NonStop SASH Home>/spring/samples/petclinic/dbconfig
For example:
OSS> cd /home/sash_usr/sash/spring/samples/petclinic/dbconfig
5.
Create the PetClinic database catalog, schema, and tables, using the SQL/MX command:
mxci>> obey petclinic_tables_script.sql;
50
Installing Spring Framework