Prepare the Database Server [ HP PC API User's Guide for ALLBASE/SQL and IMAGE/SQL ] MPE/iX 5.0 Documentation
HP PC API User's Guide for ALLBASE/SQL and IMAGE/SQL
Prepare the Database Server
NOTE You must have DBA authority for the DBEnvironment to complete the
installation of PC API. The creator of a DBEnvironment
automatically has DBA authority and can grant DBA authority to
others. Refer to the ALLBASE/SQL Database Administration Guide for
information about DBA authority.
Before you install PC API on the PC client, do the following steps to
prepare the database server (these steps are described in this section):
1. Verify the software version numbers.
2. Set the Connection Assurance Parameters.
3. Start the listener.
4. Gather information.
5. Create the DBEnvironment.
Verify Software Version Numbers
* If you are using ALLBASE/SQL, check the version number.
The version should be A.G0.20 or higher. Type:
: SQLVER.PUB.SYS
* If you are using IMAGE/SQL, the version number should be HP36385B
B.F0.27 or higher. Type:
:IMAGESQL.PUB.SYS
Set the Connection Assurance Parameters
When the connected PC client application abnormally aborts, connection
assurance parameters, set under MPE/iX, determines the length of time
that the server takes to time out the connection. Because the server
process may be holding locks when the PC aborts, it is important that
these parameters are set properly.
Your network administrator should verify that the the settings for
Connection Assurance Interval and Maximum Connection Assurance
Retransmissions parameters are set appropriately.
The Connection Assurance Interval specifies the amount of time between
each polling event. The default value is 600 seconds.
The Maximum Connection Assurance Retransmissions specifies the number of
retries the server is polled after a PC client abort has been detected by
the polling event. The default value is four times.
Figure Figure 1-2 illustrates the use of the network assurance
parameters using the default rate.
Figure 1-2. Connection Assurance Parameters
After the connection abort, the server polls the connection five times
(the polling event plus four retries). The connection times out after 4
ten minute intervals plus the amount of time between the polling event
and the first retry after the connection aborted.
To change the network assurance parameters, you must bring the network
down. The sequence of commands used to set network assurance parameters
are as follows:
:HELLO MANAGER.SYS
:NMMGR
Next, press the function keys in the sequence shown in the following
example (these function key labels are for MPE/iX 5.0):
F1 Open Config
F2 NS
F2 Unguided Config
F1 Go To Netxport
F2 Go To GPROT
F2 Go To TCP
:
Modify values for Connection Assurance Interval (e.g. 60)
and Maximum Connection Assurance Retransmissions (e.g. 2).
:
F6 Save Data
NOTE Connection assurance parameter values control polling times on all
active server LAN connections (not just PC API connections). More
frequent polling uses more server CPU time and increases LAN
traffic.
Start the Listener
To start the listener, do the following steps:
1. Check that the spooler is started and STREAMS is enabled. These
commands should be in the SYSSTART file.
2. Start the network and the listener process on the database server.
If you are using NetWare, ensure that users can use the NetWare/iX
product. When NetWare is active, a NetWare job should be running. For
more information, refer to the NetWare documentation accompanying the
NetWare/iX product. Titles are listed at the front of this guide.
To start the listener, use the ANSTART command. You must have NM (Node
Manager) capability to do these tasks. This command streams a job which
runs the listener. The listener job is streamed with the ;HIPRI option
to ensure a timely logon. Once the listener program is started, it runs
in the B queue at priority 149.
The syntax for this command is:
ANSTART "{Network Interface} [DEBUG]
where
Network Interface is one of either ARPA, NS or NETWARE. This
indicates which connection to start.
DEBUG indicates that the spool file for the listener
job should not be deleted automatically and that
the log file is always readable. Refer to the
"Troubleshooting" chapter for information on the
log file.
Here are some examples of starting the listener.
Start the listener for the ARPA interface with DEBUG.
:ANSTART ARPA DEBUG
anutil.pub.sys START ARPA DEBUG
(ANUtil): Checking ALLBASE/NET listener status for ARPA.
(ANUtil): Starting ALLBASE/NET listener for ARPA.
#J17
(ANUtil): Verifying ALLBASE/NET listener for ARPA is started.
(ANUtil): ALLBASE/NET LISTENER FOR ARPA HAS BEEN STARTED SUCCESSFULLY.
Start the listener for the NS interface with DEBUG.
:ANSTART NS DEBUG
(ANUtil): ALLBASE/NET LISTENER FOR NS HAS BEEN STARTED SUCCESSFULLY.
Start the listener for NetWare without DEBUG.
:ANSTART NETWARE
(ANUtil): NETWARE LISTENER HAS BEEN STARTED SUCCESSFULLY.
Alternatively, you can use the following command file.
:NWSTART
(ANUtil): ANSTART NETWARE
(ANUtil): NETWARE LISTENER HAS BEEN STARTED SUCCESSFULLY.
To stop the listening, use the ANSTOP command. When all server processes
have terminated, the listener terminates. The listener stops listening
when it receives the ANSTOP command. The syntax for the ANSTOP command
is:
ANSTOP {Netware Interface}
where
Network Interface is one of either ARPA, NS or NETWARE. This
indicates which connection to stop.
Here are some examples of stopping the listener.
Stop the listener for the ARPA interface.[REV BEG]
:ANSTOP ARPA
(ANUtil): ALLBASE/NET LISTENER FOR ARPA HAS BEEN STOPPED SUCCESSFULLY.
Stop the listener for the NS interface.
:ANSTOP NS
(ANUtil): ALLBASE/NET LISTENER FOR NS HAS BEEN STOPPED SUCCESSFULLY.
Stop the listener for NetWare.
:ANSTOP NETWARE
(ANUtil): NETWARE LISTENER HAS BEEN STOPPED SUCCESSFULLY.
Alternatively, you can use the following NETWARE command.
:NWSTOP
(ANUtil): ANSTOP NETWARE
(ANUtil): NETWARE LISTENER HAS BEEN STOPPED SUCCESSFULLY.
To check the status of the listener, use the ANSTAT command. This
command checks to see if a given listener job is running. The syntax for
this command is:
ANSTAT [Network Interface] [NUMSERVERS]
where
Network Interface is one of either ARPA, NS or NETWARE. This
indicates which connection to check the status
of. If no network interface is specified, status
will be reported for all interfaces.
NUMSERVERS indicates that the current number of servers for
this listener be displayed.
Here are some examples of checking the status of the listener.
Check the status of the listener for the ARPA interface.
: ANSTAT ARPA
If the given listener is not currently active, the following message
is returned.
(ANUtil): ALLBASE/NET LISTENER FOR ARPA IS NOT ACTIVE,
TO START USE 'ANSTART ARPA'.
Check the status of the listener for the NS interface.
: ANSTAT NS numservers
If the given listener is currently running and if the number of
active servers is requested, the following message is returned.
(ANUtil): ALLBASE/NET LISTENER FOR NS IS ALREADY ACTIVE.
(ANUtil): Listener process 43 has 0 remote network
connection(s) to DBEs.
Check the status of the listener for NetWare.
: ANSTAT NETWARE
If the given listener is currently running, the following message is
returned.
(ANUtil): NETWARE LISTENER IS ALREADY ACTIVE.
Alternatively, you can use the NWSTAT command.
: NWSTAT
(ANUtil): ANSTAT NETWARE
(ANUtil): NETWARE LISTENER IS ALREADY ACTIVE.
Check the status of all listners at once.
: ANSTAT
(ANUtil): ALLBASE/NET LISTENER FOR ARPA IS ALREADY ACTIVE,
TO START USE 'ANSTART'.
(ANUtil): ALLBASE/NET LISTENER FOR NS IS ALREADY ACTIVE.
(ANUtil): NETWARE LISTENER IS NOT ACTIVE.
Here's what the SHOWJOB command displays when both the NS and ARPA
listeners are active. J22 is the NS listener and J23 is the ARPA
listener.
: showjob job=@j
JOBNUM STATE IPRI JIN JLIST INTRODUCED JOB NAME
#J2 EXEC 10S LP THU 12:01P FTPMON,FTP.SYS
#J22 EXEC 10S LP MON 9:56A HPDANS,MANAGER.SYS
#J23 EXEC 10S LP WED 9:38A HPDARPA,MANAGER.SYS
3 JOBS (DISPLAYED):
0 INTRO
0 WAIT; INCL 0 DEFERRED
3 EXEC; INCL 0 SESSIONS
0 SUSP
JOBFENCE= 7; JLIMIT= 4; SLIMIT= 20
You can use the SHOWPROC command as an alternative to the ANSTAT command.
To display the number of processes active in each listener job, use the
SHOWPROC command with the TREE option. The INFO string used when the
process was created is displayed after the process name. For example:
: showproc ;job=#j22;tree
QPRI CPUTIME STATE JOBNUM PIN (PROGRAM) STEP
C152 0:01.985 WAIT J22 36 :HPDALSTN '-l NS'
B149 0:02.934 WAIT J22 65 (HPDALSTN.PUB.SYS) -l NSC
C152 0:00.099 WAIT J22 37 (HPDADVR.PUB.SYS) 11000001,1,NS
:showproc; job=#j23
QPRI CPUTIME STATE JOBNUM PIN (PROGRAM) STEP
C152 0:02.076 WAIT J23 68 :HPDALSTN '-l ARPA'
B149 0:02.666 WAIT J23 54 (HPDALSTN.PUB.SYS) -l ARPA
C152 0:00.106 WAIT J23 40 (HPDADVR.PUB.SYS) 11000001,1,ARPA
A user without the appropriate privilege (SM or OP) will get
the following error when a showproc is attempted:
:showproc; job=#j22;tree
Cannot access job #J22. (CIERR 11002)
[REV END]
Gather Information
When you install PC API on the PC client, you will need database server
information. Now is a good time to note it. The database administrator
will have information about the database.
* Host or node name of the database server:
(For example: HP3000)
[REV BEG]
To obtain the host name used by the ARPA interface, check the
HOSTS.NET.SYS file on MPE/iX;. If the hosts file does not exist,
check the domain name service file, RESLVCNF.NET.SYS. This file
contains the names of the systems that have hosts files.[REV END]
To obtain the node name used by the NS interface, type the MPE/iX
command NETCONTROL STATUS. You need NM (Node Manager) capability
to use this command. Node names are defined through NMMGR on
MPE/iX.
* Fully qualified name of the DBEnvironment on the server:
(For example: PartsDBE.SomeGrp.SomeAcct)
* Logon string used to connect to the DBEvironment:
(For example: SomeUser/passwd.SomeAcct/ActctPass,SomeGrp/GrpPass)
Create the DBEnvironment on the Database Server
To enable a connection between a PC client and database server, you must
set up an ALLBASE/SQL DBEnvironment. If you do not have an existing
database for testing purposes, you can use the ALLBASE/SQL SQLSetup tool
to create a DBEnvironment called PartsDBE. If you are using IMAGE/SQL,
you can use the IMSQL.SAMPLEDB.SYS command to create an IMAGE/SQL
database called MusicDBE. For more information, refer to Getting Started
with HP IMAGE/SQL.
Follow these steps to create the PartsDBE database:
1. Logon to the group and account where you want to create the
DBEnvironment.
2. From the command prompt, enter the following command:
:SQLSETUP.SAMPLEDB.SYS
A menu like the one in Figure 1-3 appears on your screen:
________________________________________________________________________________
| |
| |
| Options for Setting Up ALLBASE/SQL Sample DBEnvironments |
| |
| =============================================================== |
| |
| Choose one: |
| |
| 1. Create PartsDBE without sample programs |
| 2. Create PartsDBE, copy, preprocess and compile sample programs |
| 3. Copy, preprocess and compile sample programs only |
| 4. Generate a schema for PartsDBE |
| 5. Display schema for PartsDBE |
| 6. Purge PartsDBE and sample programs |
| 7. Help |
| 0. Exit |
| |
| =============================================================== |
| |
| Enter your choice=> |
| |
________________________________________________________________________________
Figure 1-3. SQLSetup Menu
3. Choose option 1 to create PartsDBE. This option creates the
DBEnvironment, defines all of its tables, views, indexes, and
security structure, and then loads it with data. As the system
creates PartsDBE, you see several messages displayed. At the end
of the creation process, you see the following message:
Creation and Loading of PartsDBE is now complete!
Press Return to continue...
4. Choose 0 to exit the menu.
If you have designed your own database for testing purposes, you can
consult your database administrator and complete the following tasks:
1. Plan the security structure of the DBEnvironment. Decide which
users will be granted access to the DBEnvironment, databases
within the DBEnvironment, and tables within the databases.
2. Create the account where the DBEnvironment is to reside.
3. Grant authorizations to users who will be using the test
DBEnvironment.
4. Create the DBEnvironment, including databases and tables.
After you setup the DBEnvironment, ensure that you can connect to it.
For example,
: isql
isql=> CONNECT TO 'PartsDBE.SomeGrp.SomeAcct';
isql=> SELECT * FROM SYSTEM.TABLE;
:
At this point you should see the system table information.
:
U[p],d[own],l[eft],r[ight],t[op],b[ottom],pr[int]<n>,or e[nd]
> e;
isql=> exit;
For a complete explanation of the procedures necessary to create the
PartsDBE DBEnvironment, refer to the appendix "Sample DBEnvironment" in
the ALLBASE/SQL Reference Manual.
MPE/iX 5.0 Documentation