HP 3000 Manuals

CREATE PARTITION [ ALLBASE/Replicate User's Guide ] MPE/iX 5.0 Documentation


ALLBASE/Replicate User's Guide

CREATE PARTITION 

The CREATE PARTITION statement defines a partition to be used for table
audit logging purposes.

Scope 

ISQL or Application Programs

SQL Syntax 

CREATE PARTITION PartitionName WITH ID = PartitionNumber 

Parameters 

PartitionName           specifies the logical name to be given to the new
                        partition.  Two partitions in the same
                        DBEnvironment cannot have the same name.
                        PartitionName cannot be DEFAULT or NONE.

PartitionNumber         is an integer specifying the partition number.
                        It must be a positive integer in the range 1 to
                        32767.  The partition number identifies the
                        partition in the audit log record.

Description 

   *   The CREATE PARTITION statement creates a new audit partition,
       which is a unit of data logging for an audit environment.

   *   Creation of a partition does not cause a check against the maximum
       number of partitions.  Only creation of audit log records in a
       partition checks if the maximum number of partitions is exceeded.
       To determine the number of partitions in a DBEnvironment, refer to
       the description in the START DBE NEW statement.

   *   One data partition can be defined with START DBE NEW or START DBE
       NEWLOG--the DEFAULT partition.  By default, tables in any
       DBEnvironment are placed in the DEFAULT partition.

   *   To put a table in a partition, use the CREATE TABLE or ALTER TABLE
       SET PARTITION statement.

   *   To remove a table from a partition, or change the partition it is
       in, use the ALTER TABLE SET PARTITION statement.

   *   To delete the definition of a partition, use the DROP PARTITION
       statement.

   *   Partitions can be created and tables placed in them without audit
       logging being enabled for a DBEnvironment.  However, the partition
       information is only used in audit log records.  Thus, partition
       information will not be utilized in logging until the
       DBEnvironment has audit logging enabled.

   *   Data partition information (including the default partition)
       appears in the system view SYSTEM.PARTITION. If the default
       partition is set to NONE, or is never defined, no row appears in
       SYSTEM.PARTITION for it.

   *   To change the partition number assigned to a partition other than
       the default partition, the DROP PARTITION and CREATE PARTITION
       statements must be issued.  To change the partition number of the
       default partition, the START DBE NEWLOG statement is used.

   *   The COMMENT partition defined with START DBE NEW or START DBE
       NEWLOG is not a table data partition but is used by the LOG
       COMMENT statement.  A data partition named COMMENT can be created,
       but its partition number is independent of the COMMENT partition's
       number.

   *   Only the partition number is used in audit logging.  Thus,
       resynchronization uses the partition number rather than the
       partition name.  A partition name is used in the CREATE TABLE and
       ALTER TABLE statements to associate a table with a partition.

Authorization 

You must have DBA authority to use this statement.

Example 

      CREATE PARTITION PartsPartition WITH ID = 10; 

     ALTER TABLE PurchDB.Parts SET PARTITION PartsPartition;

     ALTER TABLE PurchDB.Parts SET PARTITION NONE;

     DROP PARTITION PartsPartition;



MPE/iX 5.0 Documentation