Database-Specific Maintenance

Maintenance functions applying to databases are called from the Maintain Database menu that is called with the command MAINTAIN DATABASE or with function code M and object type code DA in a Predict main menu.

This document covers the following topics:


Purge Database - Code P

Predict objects of type Database are purged with the Purge function (code P).

You have two purge options, DELETE and SCRATCH.

DELETE

The DELETE option applies to all database types apart from IMS. The following objects are deleted:

  • the database object

  • all links to parent and child objects.

  • Rules which apply to the individual database types are given below.

SCRATCH

The SCRATCH option deletes the following objects:

  • files contained in this database and the related userviews

  • fields of these files

  • generated code of these files

  • file relations based on these files

  • links to/from the scratched objects.

Two lists will be displayed before a database is purged:

  • A list of objects that will not be deleted because they are used in some other object which will not be deleted. This list will only be displayed if the Purge mode option in the session profile is set to Y. See Customizing Predict with Profiles in the section Predict User Interface in the Introduction to Predict documentation.

  • A list of objects and generated code that will be deleted.

Confirmation of the purge operation is then requested. A list of all deleted objects and links will be displayed after execution of the delete operation.

Database-specific Rules

For Database Objects of Type Adabas

  • A Purge operation is not executed if the database and files in the database are implemented.

  • The Delete operation purges a database object and all links to related objects. All Adabas attributes for files which are contained in this database are purged or changed to default if the file is not contained in another database.

  • File objects for which DDMs or table/cluster descriptions exist will not be purged.

For Database Objects of Type SQL

  • A Purge operation is not executed if the database and files contained in the database are implemented.

  • File objects for which DDMs or table/cluster descriptions exist will not be purged.

For Database Objects of Type IMS

  • The Purge function will not be executed if UDFs exist for the IMS files.

  • Delete is not available because Predict regards an IMS database object and the files contained in it as an integral unit.

Rename/Renumber/Retype Database - Code N

 13:48:50             *****  P R E D I C T  *****            2007-05-31
                               - Rename Database -
 Database ID ..... HNO-DA                              Added 2007-05-31 at 13:48
 Database type ... Adabas                                 by HNO
   
   
      Enter new values
   
        Database ID .......... HNO-DA
        Database type .......* A Adabas
        Belongs to VM .......* HOME
        Run mode ............* V Vista
        Physical DBnr .......* 1234
        Vista access only .... Y (Y,N)
   
      Enter '.' to return to menu.
  

This function can be used to change

  • Database ID

  • database type

  • the virtual machine that belongs to the database

  • the run mode

  • physical database number

  • the Vista access only flag.

Depending on the database to be processed, messages indicating the possible Rename/Renumber/Retype options are displayed at the bottom of the screen.

The following topics are covered below:

General Rules

  • Changes to database attributes are also applied to file objects if applicable. For example: if a database is linked to another virtual machine, existing Vista elements of files linked to the database are adapted accordingly.

  • Special rules apply when renaming/renumbering/retyping databases that are connected to implemented databases. Connecting documentation and external objects is described in the section Handling of External and Documentation Objects in the External Objects in Predict documentation.

Changing the Database ID

The new database ID must not already exist in the dictionary.

Changing the Database Type

  • If files contained in the database are connected to implemented files, the database type and the database number (DBnr) cannot be changed.

  • For a database of type C (conceptual) the following rules apply:

    • If all files contained in the database have the same type, the database type can be changed to this type.

    • If files contained in the database have different types, the database type must not be changed.

  • All other database types can be changed to type C (conceptual) without restrictions.

Linking the Database to another Virtual Machine

The following rules apply to Adabas databases:

  • Old virtual machine and new virtual machine are in the same network: the change is applied to the database and all files linked to the database.

  • Old virtual machine and new virtual machine are in different networks: new Vista elements are created and/or existing Vista elements are purged. Additional confirmation is requested when purging Vista elements (as shown in the screen below).

     13:13:38            *****  P R E D I C T  *****            2007-05-31
                                - Rename Database -
     Database ID ..... HEB-NO-TRANS                    Modified 2007-05-31 at 13:17
     Database type ... Adabas                                by JPE
       
                  +--------------------------------------------+
          Enter n !              A T T E N T I O N             !
                  !                                            !
            Datab ! Old and new virtual machine are not in the !
            Datab ! the same network.                          !
            Belon ! Vista elements will be purged.             !
            Run m ! old NW: HEB-NW-TEST                        !
            Physi ! new NW: HEB-NW                             !
            Vista !                                            !
                  ! Do you want to continue  N (Y/N)           !
          Enter ' +--------------------------------------------+
       
       
        File with phys. distribution type partitioned found.
        File with Vista element found.
      
    
  • If the Database is connected to an implemented database the new virtual machine must be in the same network as the old virtual machine.

Non-Adabas databases can be linked to another virtual machine without restrictions.

Changing the Run mode Parameter

The following rules apply:

  • Changing from Run mode parameter I (isolated) or L (local) to V (Vista) is not possible if a replicated or master file for Entire Transaction Propagator is linked to the database.

  • Changing from Run mode parameter V (Vista) to I (isolated) or L (local) is not possible if:

    • files with Vista elements are linked to the database, or

    • Vista elements for the database exist, or

    • files with phys. distribution type P (partitioned) are linked to the database.

Changing the Database Number

The following rule applies:

  • If files contained in the database are connected to implemented files, the database number (DBnr) cannot be changed.

Changing the Parameter Vista Access Only

The Vista Access Only flag indicates whether Adabas Vista is required to access files in a database. When creating a database object, Predict sets this flag to Y or N (according to the attributes of the database). The following rule applies:

  • Setting the flag from N to Y: Only possible for databases of type V (Vista). Vista elements for files will be created if they do not already exist.

Messages

If prerequisites for renaming/renumbering/retyping databases are not met, one of the following messages is issued.

Implemented file exists in the database

If files contained in the database are connected to implemented files, the database type and the database number (DBnr) cannot be changed.

File with physical distribution type 'partitioned' found / File with Vista element found / Database Vista element found

At least one file defined for use with Vista (phys. distribution type or Vista element is specified) is linked to the database. The Run mode parameter therefore must be V (Vista); the database type can only be changed to C (conceptual).

File with PROPAGATOR type 'master' or 'replicated' found

At least one replicated or master file for ENTIRE TRANSACTION PROPAGATOR has been found. The Run mode parameter can therefore not be changed to V (Vista); the database type can only be changed to C (conceptual).

Different File types in the database

Files of different types are linked to the database. Database therefore must be of type C (conceptual) and cannot be changed to another type.

Special Functions for Editing the List of Files Contained in a Database

The following line commands apply when editing the file list of a database.

Editor Commands
SORT LOG Sort the list of file IDs into ascending order of their logical file numbers.
SORT PHY Sort the list of file IDs into ascending order of their physical file numbers.
Line Commands
.A Calls the Modify Adabas Attributes screen for the file.
.T Calls the Modify Vista element screen for the file.