HPlogo ALLBASE/SQL Reference Manual: HP 9000 Computer Systems > Chapter 2 Using ALLBASE/SQL

Creating DBEnvironments

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

Before you can create a database, you must first configure a DBEnvironment.

Before you can configure a DBEnvironment, the special HP-UX user hpdb must have write permission in the directory in which your DBECon file will reside. You use the START DBE NEW statement, optionally specifying startup parameters to override those assigned by default. You can use parameters to specify the following information:

  • Multiuser or single-user mode

  • Single, dual, or audit logging

  • Number of page and log buffers

  • Maximum number of partitions and concurrent transactions

  • Number of runtime control blocks

  • Timeout parameters

  • DBEFile0 characteristics

  • DBELog1 and DBELog2 characteristics

NOTE: ALLBASE/SQL users on diskless machines cannot create a DBEnvironment. The DBEnvironment must be created by a user on the DBEnvironment. The DBEnvironment must be created by a user on the DUX cluster server. The DBECreator can then give the diskless user access to the DBEnvironment by setting up ALLBASE/NET and by granting the appropriate authorities. The login name that issues the START DBE NEW statement is the DBECreator. See the ALLBASE/NET User's Guide for information.

The DBEnvironment name, SomeDBE for example, is specified within single quotation marks in the START DBE NEW statement:

   START DBE 'SomeDBE' MULTI NEW

This statement configures a DBEnvironment named SomeDBE in the current working directory. This DBEnvironment contains the following files:

  • A DBECon file named SomeDBE

  • A DBEFile named DBEFile0, which is associated with a DBEFileSet named SYSTEM

  • DBEFile0, containing a system catalog

  • A single log file named DBELog1

The startup parameter MULTI makes this DBEnvironment accessible in multiuser mode by default.

The DBECon file stores the startup parameters defined by the START DBE NEW statement. For more information on startup parameters, refer to START DBE NEW in Chapter 12 “SQL Statements S - Z”

Once a DBEnvironment exists, one or more databases can be created in it. Because databases are collections of tables and views, databases are created by defining tables and views. The definition of tables and views is discussed later in this chapter in "Defining How Data is Stored and Retrieved."

Specifying a Native Language Parameter

You can specify a native language parameter in creating a DBEnvironment. Use the LANG = LanguageName option in the START DBE NEW statement to specify a native language other than n-computer, as in the following example:

   START DBE 'SomeDBE' NEW LANG = JAPANESE;

If you want to specify the name of the DBEnvironment in a native language, then the native language you specify in the LANG clause must be covered by the same character set as the language designated as the current language at the operating system level. The current language can be different from that of the DBEnvironment. In that case, all processing--including comparisons and sorting--will take place in accordance with the language of the DBEnvironment, but messages will appear in the operating-system-designated language if the appropriate message catalog is available. Also, scanning of user input will be in the current language. See "Native Language Support" in Chapter 1 “Introduction” for information about specifying a native language as the current language.

Initial Privileges

When a DBEnvironment is configured, ALLBASE/SQL grants the following initial privileges:

  • DBECreator status. The login name that issues the START DBE NEW statement is the DBECreator. Users with this status can use all the SQLUtil statements to maintain the DBEnvironment.

  • DBA authority. The DBECreator is given DBA authority. When you have DBA authority, you are authorized to use all the SQL statements in a DBEnvironment.

Nobody other than the DBECreator can connect to or issue SQL statements in the DBEnvironment until the DBECreator grants the appropriate authorities.

DBA authority cannot be revoked from the DBECreator. Only the SQLUtil RESTORE statement can be used to change the DBEUserID of the DBECreator. The DBEUserID evaluates to the login name.

Feedback to webmaster