HP 3000 Manuals

START DBE NEW [ ALLBASE/Replicate User's Guide ] MPE/iX 5.0 Documentation


ALLBASE/Replicate User's Guide

START DBE NEW 

The START DBE NEW statement configures and establishes a connection with
a new DBEnvironment.  It establishes a set of startup parameters that
apply to this and all subsequent connections until all connections to the
DBEnvironment have been terminated.  Startup parameters are also stored
in the DBECon file.

Scope 

ISQL or Application Programs

SQL Syntax--START DBE NEW 

START DBE 'DBEnvironmentName' [AS 'ConnectionName'] [MULTI] NEW

[{DUAL } |...| LOG                           ]
[{AUDIT}                                     ]
[                                            ]
[BUFFER = (DataBufferPages, LogBufferPages)  ]
[LANG = LanguageName                         ]
[TRANSACTION = MaxTransactions               ]
[                  {TimeoutValue [SECONDS]}  ]
[MAXIMUM TIMEOUT = {             [MINUTES]}  ]
[                  {                      }  ]
[                  {NONE                  }  ]
[                                            ]
[                  {TimeoutValue [SECONDS]}  ]
[DEFAULT TIMEOUT = {             [MINUTES]}  ]
[                  {                      }  ]
[                  {MAXIMUM               }  ]
[                                            ]
[RUN BLOCK = ControlBlockPages               ]
[DEFAULT PARTITION = {DefaultPartitionNumber}]
[                    {NONE                  }] |,...|
[                                            ]
[                    {CommentPartitionNumber}]
[COMMENT PARTITION = {DEFAULT               }]
[                    {NONE                  }]
[                                            ]
[MAXPARTITIONS = MaximumNumberOfPartitions   ]
[AUDIT NAME = 'AuditName'                    ]
[{CHECKPOINT   }                             ]
[{COMMENT      }                             ]
[{DATA         }                             ]
[{DEFINITION   } |...| AUDIT ELEMENTS        ]
[{STORAGE      }                             ]
[{AUTHORIZATION}                             ]
[{SECTION      }                             ]
[{ALL          }                             ]
[                                            ]
[DBEFile0Definition                          ]
[DBELogDefinition                            ]
Parameters--START DBE NEW 

AUDIT                     identifies the DBEnvironment as one that will
                          have audit logging performed on it with the
                          elements specified in the AUDIT ELEMENTS
                          clause.  This causes ALLBASE/SQL to create
                          audit log records, in addition to normal log
                          records, in the log file so that the database
                          can be audited.

DefaultPartitionNumber    specifies the default partition number for the
                          DBEnvironment.  This clause must be
                          specified if AUDIT LOG is specified.
                          DefaultPartitionNumber must be in the range 1
                          to 32767.  If NONE is specified, tables in the
                          DBEnvironment that are in the default partition
                          are not replicated.  See the CREATE TABLE and
                          ALTER TABLE statements for information on
                          assigning a table to a partition.

CommentPartitionNumber    specifies the partition number for
                          comments made in the DBEnvironment.
                          CommentPartitionNumber must be a number between
                          1 and 32767.  If no COMMENT PARTITION is
                          specified, DEFAULT is implied.

                          If the comment partition is DEFAULT and the
                          default partition number is later changed in a
                          START DBE NEWLOG statement (but the comment
                          partition is not changed from DEFAULT), the
                          comment partition number will also change to
                          the new default partition number.  If the
                          COMMENT PARTITION is set to NONE (or it is set
                          to the DEFAULT PARTITION and the DEFAULT
                          PARTITION is set to NONE), you cannot use the
                          LOG COMMENT statement.

MaximumNumberOfPartitions specifies the maximum number of partitions for
                          the DBEnvironment.  This clause must be
                          specified if AUDIT LOG has been specified.
                          MaximumNumberOfPartitions is required to be a
                          number between 1 and 831.  This number
                          indicates the number of partition instances the
                          DBEnvironment is expected to track.

                          For audit logging purposes, the number of
                          partition instances is calculated as the sum of
                          the number of DATA partitions and the number of
                          elements (not counting the DATA element)
                          specified in the AUDIT ELEMENTS clause.
                          Specifying ALL audit elements (see below)
                          includes 6 elements, and 6 partitions are used.

                          The number of partition instances of a
                          DBEnvironment is calculated as follows:  the
                          sum of the number of DATA partitions in this
                          DBEnvironment, the number of audit elements
                          (except CHECKPOINT and DATA) chosen for this
                          DBEnvironment, the number of DATA partitions in
                          any other DBEnvironment (for each such
                          DBEnvironment) that are applied to this
                          DBEnvironment (regardless of whether the
                          partition number is the same or not), and the
                          number of audit elements (except CHECKPOINT and
                          DATA) chosen in any other DBEnvironment (for
                          each such DBEnvironment) that are applied to
                          this DBEnvironment.

AuditName                 specifies the name of this audit DBEnvironment.
                          AuditName is limited to 8 bytes.  Furthermore,
                          it is up to you to ensure that this name is
                          unique across your audit and slave
                          DBEnvironments.  This clause must be specified
                          if AUDIT LOG has been specified.  The AuditName
                          in conjunction with the PartitionNumber is used
                          to identify the partition instance where the
                          transaction originated.

AUDIT ELEMENTS            specifies the types of audit logging that will
                          be done for the database.  If this clause is
                          omitted and AUDIT LOG is specified, DATA AUDIT
                          ELEMENTS is implicit.  The audit elements are
                          as follows:

                          CHECKPOINT    specifies that Synchronization
                                        Checkpoint Record (SCR)
                                        information will synchronize
                                        transactions between
                                        DBEnvironments.  Specification of
                                        any other audit element always
                                        implicitly specifies this
                                        element.  If CHECKPOINT is
                                        specified with no other audit
                                        elements, it permits a
                                        DBEnvironment to be a slave for
                                        another, in that it can receive
                                        and apply another DBEnvironment's
                                        audit log records; however it
                                        does not create any audit log
                                        records of its own.

                          COMMENT       permits use of the LOG COMMENT
                                        statement in the DBEnvironment.
                                        Comments are logged to the
                                        defined COMMENT PARTITION. If
                                        this element is not chosen, the
                                        LOG COMMENT statement returns an
                                        error.

                          DATA          is the default element.  It
                                        causes audit log records to be
                                        generated for any data operations
                                        (INSERT, UPDATE, DELETE)
                                        performed on tables on which
                                        these statements operate, in any
                                        audit partition of the
                                        DBEnvironment other than NONE.
                                        (Tables can be specified to be in
                                        partition NONE and thus not be
                                        replicated.)

                          DEFINITION    includes audit logging of the
                                        following statements:
                                               CREATE TABLE
                                               ALTER TABLE
                                               DROP TABLE
                                               CREATE INDEX
                                               DROP INDEX
                                               CREATE VIEW
                                               DROP VIEW
                                               CREATE RULE
                                               DROP RULE
                                               CREATE PROCEDURE
                                               DROP PROCEDURE
                                               TRANSFER OWNERSHIP
                                               CREATE GROUP
                                               DROP GROUP
                                               CREATE DBEFILESET
                                               DROP DBEFILESET
                                               CREATE PARTITION
                                               DROP PARTITION
                                               TRUNCATE TABLE

                          STORAGE       includes audit logging of the
                                        following statements:
                                               CREATE DBEFILE
                                               DROP DBEFILE
                                               ADD DBEFILE
                                               REMOVE DBEFILE
                                               CREATE TEMPSPACE
                                               DROP TEMPSPACE

                          AUTHORIZATION includes audit logging of the
                                        following statements:
                                               GRANT
                                               REVOKE
                                               ADD TO GROUP
                                               REMOVE FROM GROUP

                          SECTION       includes audit logging of the
                                        creation and deletion of
                                        permanent sections.  Permanent
                                        sections are created when a
                                        program is preprocessed, when a
                                        module is installed through ISQL,
                                        and when the PREPARE statement is
                                        executed.  They are deleted by
                                        the DROP MODULE statement.
                                        Logging of section creation does
                                        not include any OPTINFO
                                        associated with the section.
                                        OPTINFO can be used to provide
                                        optimization information.
                                        Optimization information can
                                        determine whether user-supplied
                                        information is used and the
                                        access plan used.

                          ALL           is equivalent to specifying all
                                        of the following as described
                                        above:  CHECKPOINT, COMMENT,
                                        DATA, DEFINITION, STORAGE,
                                        AUTHORIZATION, and SECTION AUDIT
                                        ELEMENTS

Description 

   *   The following parameters defined in the START DBE NEW statement
       are stored in the DBECon file:
          *   DBEnvironment language
          *   User mode (single versus multi)
          *   Number of data buffer pages
          *   Number of log buffer pages
          *   Maximum transactions
          *   Maximum timeout value
          *   Default timeout value
          *   Number of runtime control block pages
          *   DBEFile0 system file name
          *   Log system file name(s)
          *   Audit logging (chosen versus not)
          *   Audit name
          *   Audit elements
          *   Default Partition
          *   Comment Partition
          *   Maximum Number of Partitions

   *   You can reconfigure a DBEnvironment by using the SQLUtil ALTDBE
       command to alter DBECon file parameters.  All parameters except
       the audit information (logging, audit elements, name, default,
       comment and maximum partition), or the name of the DBECon file and
       DBEFile0 may be changed.  Refer to the ALLBASE/SQL Database 
       Administration Guide for additional information.

   *   If AUDIT LOG is specified, the clauses AUDIT NAME, DEFAULT
       PARTITION, and MAXPARTITIONS must also be specified.  Further, if
       no AUDIT ELEMENTS are specified, DATA is used as a default.  If no
       COMMENT PARTITION is specified, DEFAULT is assumed.

   *   Use of any audit elements implicitly specifies the CHECKPOINT
       audit element.

   *   Use of the clause ALL AUDIT ELEMENTS implicitly specifies all of
       the other elements.

   *   Because of the functionality of audit logging and
       ALLBASE/Replicate, audit log records can only be applied to a
       DBEnvironment that is of the same version or newer than the
       version of the master DBEnvironment.

Authorization 

No authorization is needed for using the START DBE NEW statement.

Example 

     The DBEnvironment for the sample database is a multiuser DBEnvironment
     in which as many as five transactions can execute concurrently.
     The DBEnvironment is initially configured for two non-archive logs and a
     DBEFile0 residing in PartsF0. The number of runtime control pages
     to be used is 500.  By default, autostart mode is set to ON.
     Further, this DBEnvironment will be enabled for audit logging
     so that auditing can be performed.  All DML and DDL changes in the
     DBEnvironment are subject to audit logging since all audit elements are
     selected.  Up to 20 partitions can coexist in this DBEnvironment, allowing
     for 14 data partitions in addition to the other elements' partitions.
     The log files should be made large enough for the added audit log records. 

     START DBE 'PartsDBE' MULTI NEW
               DUAL LOG,
                AUDIT LOG,
               TRANSACTION = 5,
               RUN BLOCK = 500,
                AUDIT NAME = 'PrtsDBE1', 
                DEFAULT PARTITION = 1, 
                MAXPARTITIONS = 20, 
                ALL AUDIT ELEMENTS, 
               DBEFILE0 DBEFILE PrtsDBEF0
                 WITH PAGES = 150,
                 NAME = 'PartsF0',
               LOG DBEFILE PartsDBELogA1 AND PartsDBELogB1
                 WITH PAGES = 1000,
                 NAME = 'PtsLGA1' AND 'PtsLGB1'



MPE/iX 5.0 Documentation