HPlogo ALLBASE/SQL Database Administration Guide: HP 9000 Computer Systems > Chapter 1 DBA Tasks and Tools

System Administration for ALLBASE/SQL

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

The DBA must cooperate with the system administrator on several crucial matters. These include:

  • Special user names

  • HP-UX system resources

  • Shared memory usage

  • Native language support

  • Network administration

  • Setting up raw files

Special User Names

In order to create or connect to an ALLBASE/SQL DBEnvironment, you must be sure there is a special user named hpdb with a user id number of 27 and a group id number of 2 on the system. Prior to installing the ALLBASE/SQL product, enter the following line in the user password file /etc/passwd:

 

   hpdb:*:27:2:hpdb ALLBASE/HP-UX:/usr/bin:/bin/csh

In addition, you should add hpdb to the group bin in the /etc/group file. The entry should look as follows:

 

   bin::2:root,rootc,bin,daemon,lp,hpdb

The user id number of 27 has been reserved for the user name hpdb and is required to execute the ALLBASE program files. If this user id number does not exist on your system, or if a user other than hpdb is assigned to this user id number, the security and integrity of your DBEnvironments cannot be guaranteed.

The ALLBASE/SQL program files are owned by the user hpdb with the user id number of 27, and by the group bin, which has a group id number of 2. In addition, several of the ALLBASE/SQL program files have their file mode set to 4555, which causes the "switch user id bit" to be turned on. Thus, any users executing the ALLBASE/SQL or SQLUtil program files have their effective user name changed to hpdb while these programs are executing. The user's group name remains the same as the name of the group the user is normally associated with in the file /etc/group.

Because the "switch user id bit" is turned on, all files that are created by the ALLBASE/SQL programs have a file mode of 600, an owner id of hpdb, and the file creator's group id, as in the following example:

 

   -rw-------     1 hpdb     dbsupport     368 Mar  15 17:00 PartsDBE

A file mode of 600 secures database files (DBEFiles) from modification by other system users because these files cannot be accessed by any user other than hpdb.

The owner name and user id number of the program files and the user name and user id number of the entry in the file /etc/passwd can be changed; however, all DBEnvironments on the system are created with the same user id number and owner name as the ALLBASE/SQL program files. If the superuser changes owner names and user id numbers for the ALLBASE/SQL program files, you will be unable to access a DBEnvironment that does not have an owner name and user id that matches the ALLBASE/SQL program files.

The best way to ensure that all DBEnvironments are compatible is always to use the owner name hpdb with the user id number 27 for all ALLBASE/SQL program files. In addition, make sure the entry in the /etc/passwd file for hpdb has an asterisk (*) in the password slot to prevent logins by any remote users named hpdb.

NOTE: If you are running ISQL or SQLGEN, your userid remains your login name. This allows you to customize your session by remaining the owner of the files isqlpro, isqlsyn, and any command files you create. Refer to the ALLBASE/ISQL Reference Manual for information on how to connect to a DBEnvironment using ISQL, and for information on command files. SQLGEN is described in a previous section of this chapter.

HP-UX System Resources

ALLBASE/SQL makes use of HP-UX system resources for communication among applications that connect to DBEnvironments. You must configure your HP-UX kernel for an appropriate number of shared memory segments and semaphores. The HP-UX system administrator should adjust the values of the following parameters:

  • shmseg

  • shmmni

  • shmmax

  • semmns

  • semmni

  • semmap

These adjustments are especially important for large multiuser systems or for systems in which you expect to use multi-connect functionality. Instructions for calculating values to assign to these parameters may be found in the Release Notes that accompanies the installation media. For information about how to change system parameters, refer to the chapter "Physical Design."

Shared Memory Usage

Since ALLBASE/SQL may have to coexist on a system with other applications, the amount of available shared memory for log buffers, data buffers, and runtime control blocks must be negotiated with the system administrator. Refer to the section on "Estimating Shared Memory Requirements" in the "Physical Design" chapter.

Native Language Support

ALLBASE/SQL lets you manipulate databases in a wide variety of native languages in addition to the default language, known as n-computer. You can use either 8-bit or 16-bit character data, as appropriate for the language you select. In addition, you can always include ASCII data in any database, since ASCII is a subset of each supported character set. The collating sequence for sorting and comparisons is that of the native language selected. A list of supported languages is in /usr/lib/nls/config.

You can use native language characters in a wide variety of places, including:

  • character literals

  • host variables for CHAR or VARCHAR data (but not variable names)

  • ALLBASE/SQL object names

  • WHERE and VALUES clauses

  • filenames

If your system has the proper message files installed, ALLBASE/SQL displays prompts, messages and banners in the language you select, and it displays dates and time according to local customs. In addition, ISQL accepts responses to its prompts in the native language selected. However, regardless of the native language used, the syntax of ISQL and SQL commands--including punctuation--remains in ASCII.

In order to use a native language other than the default, you must do the following:

  1. Make sure your I/O devices support the character set you wish to use.

  2. Set the HP-UX environment variable LANG to the native language (LanguageName) you wish to use. For the C shell, use the following command:

     
    
       setenv LANG LanguageName
    

    For the K shell, use the following command (no spaces before or after the equals sign):

     
    
       typeset -x LANG=LanguageName
    

    For the Bourne shell, use the following commands:

     
    
       LANG =  LanguageName
    
       export LANG
    

    This language then becomes the current language. (If LANG is not set, the current language is n-computer.)

  3. Use the LANG = LanguageName option of the START DBE NEW statement to specify the language when you create a DBEnvironment.

You can use native language characters in the DBEnvironment name. If you do so, you must set the LANG environment variable to the same language before you can connect to the DBEnvironment. To avoid confusion, it is advised that you always use the same language for the DBEnvironment that you use in the LANG variable.

Resetting the LANG variable while you are connected to a DBEnvironment has no effect on the current DBE session.

Network Administration

Administering the network that permits operation of a distributed database is a task that may involve both the DBA and the system administrator. If your system uses diskless workstations, it must be configured as a distributed system using ALLBASE/NET. You manage the network using a utility program called NETUtil, as explained in the next paragraphs.

For an end user to connect to a remote DBEnvironment, two files must exist: the AliasDB file and the NETUsers file. The AliasDB file, residing on the client node, contains an entry for each remote DBEnvironment that is available on the network. The entry contains an alias name for the DBEnvironment along with the server node and pathname on the server. The NETUsers file, residing on the server node, contains an entry for each user on a client node that has access to a DBEnvironment on the server node.

Using NETUtil

The system administrator (superuser) uses a utility called NETUtil on the client and server nodes to add entries to and to maintain the AliasDB and NETUsers files. Each file is automatically created when you add the first entry to it.

On the client node, the system administrator invokes NETUtil and uses the ADD ALIAS command to create an entry in the AliasDB file. All NETUtil commands prompt the user for information, so in this case, the administrator is prompted for details about the specific DBEnvironment to be accessed. (The entry added to the AliasDB file will contain the answers to the prompts.)

On the server node, the system administrator invokes NETUtil and uses the ADD USER command to create an entry in the NETUsers file. Again, the administrator will by prompted by NETUtil for the appropriate information. The entry added to the NETUsers file will include specifics about the user who will be accessing the remote DBEnvironment.

Additionally, users of DBEnvironments can invoke NETUtil to display the entries in the AliasDB file so that alias names of DBEnvironments can be checked or confirmed.

Complete information about NETUtil is found in the ALLBASE/NET User's Guide.

Using ALLBASE/SQL in a Diskless Cluster

ALLBASE/SQL users on diskless machines cannot create a DBEnvironment. The DBEnvironment must be created by a user on the DUX cluster server. The creator of the DBE can then give the diskless user access to database tables by setting up ALLBASE/NET and granting the appropriate authorities.

Setting Up Raw Files

You can use HP-UX raw (character mode) devices as DBEFiles or log files with an ALLBASE/SQL DBEnvironment. Setting up these files requires a thorough understanding of the HP-UX file system and a high degree of cooperation with an HP-UX system administrator. For additional information, refer to the appendix "Using HP-UX Raw Files for DBEFiles and Logs" in this manual.

Feedback to webmaster