START DBE NEWLOG [ ALLBASE/Replicate User's Guide ] MPE/iX 5.0 Documentation
ALLBASE/Replicate User's Guide
START DBE NEWLOG
The START DBE NEWLOG statement establishes a connection with a given,
existing DBEnvironment and creates one or two new log files for that
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. Any startup parameters not
explicitly specified are taken from the DBECon file except the enabling
of archive logging, dual logging, and audit logging. This statement
reinitializes log file(s) when you need to change the log file size,
invoke dual logging, invoke startup, or alter audit logging.
Scope
ISQL or Application Programs
SQL Syntax--START DBE NEWLOG
START DBE 'DBEnvironmentName' [AS 'ConnectionName'] [MULTI] NEWLOG
[{ARCHIVE} ]
[{DUAL } |...| LOG ]
[{AUDIT } ]
[ ]
[BUFFER = (DataBufferPages, LogBufferPages) ]
[TRANSACTION = MaxTransactions ]
[ {TimeoutValue [SECONDS]} ]
[MAXIMUM TIMEOUT = { [MINUTES]} ]
[ { } ]
[ {NONE } ]
[ ]
[ {TimeoutValue [SECONDS]} ]
[DEFAULT TIMEOUT = { [MINUTES]} ]
[ { } ]
[ {MAXIMUM } ]
[ ]
[RUN BLOCK = ControlBlockPages ] |,...| NewLogDefinition
[DEFAULT PARTITION = {DefaultPartitionNumber}]
[ {NONE }]
[ ]
[ {CommentPartitionNumber}]
[COMMENT PARTITION = {DEFAULT }]
[ {NONE }]
[ ]
[MAXPARTITIONS = MaximumNumberOfPartitions ]
[AUDIT NAME = 'AuditName' ]
[{CHECKPOINT } ]
[{COMMENT } ]
[{DATA } ]
[{DEFINITION } |...| AUDIT ELEMENTS ]
[{STORAGE } ]
[{AUTHORIZATION} ]
[{SECTION } ]
[{ALL } ]
Parameters--START DBE NEW
AUDIT LOG 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. DefaultPartitionNumber must be
in the range 1 and 32767. If NONE is
specified, tables in the DBEnvironment for
audit that are in the DEFAULT PARTITION are not
replicated. See the CREATE TABLE and ALTER
TABLE statements for information on assigning a
partition for a table.
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.
MaximumNumberOfPartitions specifies the maximum number of partitions for
the DBEnvironment. 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
audit elements (except the DATA audit element)
specified in the AUDIT ELEMENTS clause.
Specifying ALL audit elements (see below)
includes 6 elements, implying that 6 partitions
are used.
For ALLBASE/Replicate purposes, 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 ALLBASE/Replicate
DBEnvironments. 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 implicitly specified. 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) on
tables that are in an 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 This includes audit logging of
the following statements:
CREATE DBEFILE
DROP DBEFILE
ADD DBEFILE
REMOVE DBEFILE
CREATE TEMPSPACE
DROP TEMPSPACE
AUTHORIZATION This includes audit logging of
the following statements:
GRANT
REVOKE
ADD TO GROUP
REMOVE FROM GROUP
SECTION This includes audit logging of
the creation and deletion of
permanent sections. Permanent
sections are created when a
program is preprocessed, and are
deleted by the DROP MODULE
statement. Logging of section
creation does not include any
SETOPT associated with the
section.
ALL This is equivalent to specifying
CHECKPOINT, COMMENT, DATA,
DEFINITION, STORAGE,
AUTHORIZATION, and SECTION AUDIT
ELEMENTS as described above.
Description
* The following parameters defined in the START DBE NEWLOG 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
* 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 SQLUtil to alter
DBECon file parameters. All parameters except the audit
information (audit logging, audit elements, audit name, default
partition, comment partition, and maximum number of partitions),
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 PARITITION is specified, the default is assumed.
* Use of any audit elements implicitly specifies the CHECKPOINT
audit element.
* Use of the clause ALL AUDIT ELEMENTS implies specification of 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.
* The usual reasons for using START DBE NEWLOG are to increase or
decrease log file space, invoke dual logging or audit logging, or
alter audit logging parameters.
* Audit parameters set in the START DBE NEWLOG statement modify the
values stored in the DBECon file.
* If an audit parameter is not specified in the statement, the audit
parameter remains unchanged.
* The parameters AUDIT NAME, DEFAULT PARTITION, MAXPARTITIONS,
COMMENT PARTITION, and AUDIT ELEMENTS can be changed at any time
through the START DBE NEWLOG statement, but audit logging can only
be enabled (through the AUDIT LOG clause) if at least the first
three values have been explicitly set and the DEFAULT PARTITION
and COMMENT PARTITION have been set to NONE or an integer value
greater than 0.
You can change the COMMENT PARTITION specification or specify it
as NONE with the START DBE NEWLOG also; if it is specified as
NONE, the specification is assumed to be the DEFAULT partition if
not explicitly specified as NONE.
If no AUDIT ELEMENTS are specified here or previously, DATA AUDIT
ELEMENTS is implicitly specified.
* If AUDIT LOG is not specified in this statement, the default is
that it is disabled. Thus if the DBEnvironment had audit logging
enabled and then specified a START DBE NEWLOG statement without
AUDIT LOG, audit logging would then be disabled. Omitting AUDIT
LOG has the effect of deleting any currently existing SCR
information for the DBEnvironment. This could force you to do an
unwanted hard resynchronization. Therefore, it is imperative that
you specify AUDIT LOG if you wish to continue audit logging. You
can omit AUDIT LOG if you want to delete the SCR information.
* Changing MAXPARTITIONS on a START DBE NEWLOG prevents roll forward
recovery through prior log files, since their structure will
differ from the new logs' structure. The same is true of going
from non-audit logging to audit logging and vice versa.
Authorization
You need to be the DBECreator to issue the START DBE NEWLOG statement.
Example
The DBEnvironment is restored to a consistent state.
Any transactions incomplete when the DBEnvironment was
last shut down are rolled back, and work done by completed
transactions is committed.
START DBE 'PartsDBE.SomeGrp.SomeAcct'
RELEASE
SQLUtil is used to disassociate the existing log files PartsLg1
and PartsLg2 from the DBEnvironment and replace them with log files
PtsLgA1 and PtsLgB1.
The log files are reinitialized. Audit logging is enabled.
START DBE 'PartsDBE.SomeGrp.SomeAcct' MULTI NEWLOG DUAL LOG
AUDIT LOG,
DUAL LOG,
AUDIT NAME = 'PrtsDBE1',
DEFAULT PARTITION = 1,
MAXPARTITIONS = 20,
DATA AUDIT ELEMENTS,
LOG DBEFILE PtsLgA1 AND PtsLgB1
WITH PAGES = 1000, NAME = 'PtsLgA1' AND 'PtsLgB1'
MPE/iX 5.0 Documentation