dbu_menu

The dbu_menu utility can be invoked interactively to facilitate day-to-day maintenance and diagnostics of Control-M/Server database running with PostgreSQL, Oracle and MSSQL databases. On Windows, the utility is called dbu_menu.bat.

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

You can access the Database Utilities Menu from the ctm_menu and selecting Database Menu. For more information about the ctm_menu, see ctm_menu.

Some of the options can be run as interactive utilities by either logging on to a Control-M/Server account (UNIX) or open a command prompt and go to the <Control-M/Server>\ctm_server\exe\DBUtils directory (Windows) and then type the relevant utility. For more information about some of the utilities, see Interactive Database Utilities.

To facilitate day-to-day maintenance and diagnostics of Control-M/EM database use the em_database_menu utility, as described in em_database_menu Options.

Accessing the dbu_menu

This procedure describes how to access the Database Utilities menu for Control-M/Server.

Begin

  1. Do one of the following:

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

    • Windows: Open a command prompt window and go to Control-M/Server>\ctm_server\exe\DBUtils.

  2. Open a command prompt as an Administrator and type the following command:

    dbu_menu

    The Database Utilities Menu is displayed:

    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

Only enabled when Control-M/Server is running with a dedicated database server. Starts the PostgreSQL database server, and services involved.

If this option is invoked on Control-M/Server running with an existing database, an error message is displayed. To run this utility interactively, see Running the DBUStart Utility.

Stop Database

PostgreSQL

Only enabled when Control-M Server is running with a dedicated database server.

Stops the PostgreSQL database server, and services involved.

To run this utility interactively, see Running the DBUStop Utility.

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

Set Database Archive Mode

PostgreSQL

Only enabled when Control-M/Server is running with a dedicated PostgreSQL database server. Changes the archive mode of the PostgreSQL database server.

Parameters available:

Mode

  • On

  • Off

    Default: Off

Archive Directory (only available when Mode is ON)
Full directory path to which the database server logs are archived.

This directory should be empty. When Archive mode is On, the Hot Database Backup option is enabled. You can also run this as an interactive utility by typing DBUArchive.

Build Database

  • PostgreSQL

  • MSSQL

  • Oracle

Creates a Control-M/Server database.

This option is only enabled on Control-M/Server running with either an existing or a dedicated database server. You can also run this as an interactive utility by typing DBUBuild.

Extend Database

  • Oracle

  • MSSQL

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

Parameters:

  • Mode: Current or New

  • Current: a current data file is extended

  • New: an additional data file will be added to the database

  • Directory Path: the full directory path to the new datafile if parameter mode is set to New

  • Administrator Password: DBA password (for Oracle only)

  • Size: specified 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.

You can also run this as an interactive utility by typing DBUUpdateStatistics.

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.

To run this as an interactive utility, see Running the DBUHotBackup Utility.

Cold Database Backup

  • PostgreSQL

  • MSSQL

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

The following Control-M/Server components must be shut down prior to activating this backup:

  • Control-M/Server Configuration Agent (shut_ca)

  • Control-M/Server (shut_ctm)

Parameters:

  • Backup File: Full path to the file into which the database should be backed up.

  • Administrator password: Password of the PostgreSQL database server administrator

To run this utility interactively, see Running the DBUColdBackup Utility

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>

The PostgreSQL database server and the following Control-M/Server components must be shut down for this option to be enabled:

  • Control-M/Server Configuration Agent (shut_ca)

  • Control-M/Server (shut_ctm)

Parameters:

  • Restore Directory: Full path to the directory from which the server file system and Control-M/Server databases should be restored.

  • Archive Directory: Value and location specified in the Archive Directory parameter of the Set Database Archive Mode option.

    When this action is finished successfully, the PosgreSQL database server archive mode switches to off, and the PosgreSQL database server shuts down.

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

You can also run this as an interactive utility by typing DBUHotRestore.

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 option.

The following Control-M/Server components must be shut down for this option to be enabled:

  • Control-M/Server Configuration Agent (shut_ca)

  • Control-M/Server (shut_ctm)

Parameters:

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

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

To run this utility interactively, see Running the DBUColdRestore Utility.