dbu_menu

The dbu_menu utility enables you to facilitate day-to-day maintenance and diagnostics for Control-M/Server PostgreSQL, Oracle, and MSSQL databases.

The Database Utilities Menu is only relevant for PostgreSQL, Oracle, and MSSQL database functionality.

You can also access the Database Utilities Menu from the ctm_menu utility.

Accessing the Database Utilities Menu

This procedure describes how to access the Database Utilities Menu on Control-M/Server.

Begin

  1. Do one of the following:

    • UNIX: Log in to a Control-M/Server account

    • Windows: Open a command prompt as an Administrator and navigate to <Control-M/Server_Home>>\ctm_server\exe\DBUtils.

  2. Run the following command:

    dbu_menu

    The following Database Utilities Menu appears:

    Copy
    Select one of the following options:
    1 - Management
    2 - Maintenance
    3 - Report
    q - quit
    Enter option number --->   [q]:

Management Menu Options

The following table lists the options in the Management Menu.

Option

Database Server

Description

Start Database

PostgreSQL

Starts the PostgreSQL database server, and services involved.

This is option is possible only when Control-M/Server is installed with a dedicated PostgreSQL database server.

If this option is invoked on Control-M/Server that has an existing database, an error message appears.

Stop Database

PostgreSQL

Stops the PostgreSQL database server, and services involved.

This is option is possible only when Control-M/Server is installed with a dedicated PostgreSQL database server.

If this option is invoked on Control-M/Server running with an existing database, an error message appears.

Set Database Archive Mode

PostgreSQL

Changes the archive mode of the PostgreSQL database server.

This is option is possible only when Control-M/Server is installed with a dedicated PostgreSQL database server.

Parameters Available:

  • Mode

    • On

    • Off

    Default: Off

  • Archive Directory (only available when Mode is ON)
    Full directory pathname where the database server logs are archived.

    This directory should be empty. When Archive mode is On, the Hot Database Backup option is enabled.

Build Database

  • PostgreSQL

  • MSSQL

  • Oracle

Creates a Control-M/Server database.

This option is only enabled on a Control-M/Server with an existing or dedicated database server.

Extend Database

  • Oracle

  • MSSQL

Extends the size of the existing user database data file or adds a new data file to provide extra space for schema objects.

Parameters:

  • Mode: Current or New.

  • Current: A current data file is extended.

  • New: An additional data file is added to the database.

  • Directory Path: The full directory pathname of the new data file if the parameter Mode is set to New.

  • (Oracle only) Administrator Password: DBA password.

  • Size: Defined in MB.

  • (MSSQL only) Type: Data or Log

Maintenance Menu Options

The following table describes the Maintenance Menu options for Control-M/Server.

Options

Database

Description

Update Database Statistics

  • PostgreSQL

  • MSSQL

  • Oracle

Updates statistic procedures in the database server.

Database Consistency Check

  • PostgreSQL

  • MSSQL

  • MSSQL: Performs allocation checks and verifies the structural and logical integrity of all objects in the database

  • Oracle: Detects bad blocks and checks table and index schema consistency.

Hot Database Backup

PostgreSQL

Only enabled when:

  • Database Archive Mode is set to On

  • Control-M/Server is active and running with a dedicated database server.

Online backup of a dedicated PostgreSQL database server file system and the Control-M/Server databases. This backup can be used to restore the database up to and including the last completed transaction.

Parameters:

  • Backup Directory: Full path to the directory into which the server file system and Control-M/Server databases should be backed up.

    This directory should be empty.

  • Administrator password: Password of the PostgreSQL database server administrator.

Cold Database Backup

  • PostgreSQL

  • MSSQL

Exports the database schema to the specified file when Control-M/Server is shut down.

You must shut down Control-M/Server and the Control-M/Server Configuration Agent before you activate this backup.

Parameters:

  • Backup File: Full pathname to the file where the database should be backed up.

  • Administrator Password: The PostgreSQL database server administrator password.

Hot Database Restore

PostgreSQL

Only enabled when Control-M/Server is active and running with a dedicated PostgreSQL database server.

Online restore of the PostgreSQL database server file system and the Control-M/Server databases. When this option completes successfully, the previous PostgreSQL database server file system is saved to the following location:

<pghome_directory/old_pgsql_<date of operation>

If Control-M/Server databases do not exist in the <pghome_directory> it is saved in the following location:

<db location>/<db name>_old_<date of operation>

You must shut down Control-M/Server and the Control-M/Server Configuration Agent before you enable this option.

Parameters:

  • Restore Directory: Full pathname to the directory where the server file system and Control-M/Server databases are restored.

  • Archive Directory: Value and location specified in the Archive Directory parameter of the Set Database Archive Mode option, as described in Management Menu Options.

    The PostgreSQL database server archive mode switches to off, and the PostgreSQL database server shuts down after this action is successfully completes.

  • The specified directory should be exported from the PostgreSQL database server with the same parameter values as the destination PostgreSQL database server.

Cold Database Restore

  • PostgreSQL

  • MSSQL

Imports the Control-M/Server database schema from the file specified in Backup File parameter of the Cold Database Backup menu option.

You must shut down Control-M/Server and the Control-M/Server Configuration Agent before you enable this option.

Parameters:

  • Restore File: Value and location specified in the Backup File parameter of the Cold Database Backup option.

  • Administrator Password: The PostgreSQL database server administrator password.