Rename a Target Database - System Emulation Tool

Teradata System Emulation Tool User Guide

Product
System Emulation Tool
Release Number
15.00
Language
English (United States)
Last Update
2018-09-28
dita:id
B035-2492
lifecycle
previous
Product Category
Teradata Tools and Utilities

Rename a Target Database

Use Teradata Set to rename a target database when the database already exists on the test system and must remain on the test system.

The name change affects:

  • Statistics
  • RAS
  • DDLs of the objects in the database
  • DDLs of the objects that have dependencies on the renamed object
  • Use the Replace dialog box to change the database name for all object definitions.

    To rename a target database

    This procedure can be performed offline or while connected to a Teradata Database.

    1 Do one of the following:

  • When connected to a Teradata Database, click .
  • See “Connect to a Teradata Database” on page 31.

  • When not connected to a Teradata Database, click .
  • The Open dialog box appears and displays the available .mcf files.

    2 Select an .mcf file.

    3 Click Open.

    4 From the Import window, select the target database to rename.

    5 From the toolbar, click .

    6 Type a new database name.

    7 Press Enter.

    A confirmation message appears.

    8 [Optional] To prevent the message from appearing each time this procedure is performed, select the Don’t ask this question again check box.

    9 [Optional] To keep the original database name in the object definitions, click No.

    The status bar displays:

    Target database has been changed from old name to new name

    The target database name is changed. The object definitions are not renamed. Skip the remaining steps in this procedure.

    10 [Optional] To update the name change in the object definitions, click Yes.

    The Replace dialog box appears.

    11 Define the search‑and‑replace operation using the options in the Replace dialog box.

     

    Option

    Description

    Find what

    Search for this database name.

    Replace with

    Replace the database name listed in the Find what box with this database name.

    Match whole word only

    Search for whole words.

    This check box is selected by default.

    Match case

    Search for characters that match the case used in the Find what box.

    Search in all DDLs

    Search all object definitions.

    This check box is selected by default.

    12 Find and replace the database name in the object definitions:

    a Click Find Next to find the next matching instance in the object definitions.

    b Do one or more of the following:

  • Click Replace to replace the selected instance in a single object definition.
  • The import tree in the left pane expands, and the corresponding DDL is selected.

  • Click Replace All to replace all instances of the database name in a single object definition.
  • The total number of replacements appears at the bottom of the Replace dialog box.

  • Click Replace in all DDLs to replace all instances of the database name in all object definitions.
  • The total number of replacements appears at the bottom of the Replace dialog box.

    Note: The first time Replace is clicked, the Allow Edit command becomes available on the Edit menu. When editing is allowed, object definitions, RAS, statistics, cost parameters, DBS Control information, and cost profiles can be modified in the right pane of the Import window.

    13 After all of the intended replacements have been made, click Cancel to close the Replace dialog box.

    14 To commit the name change, click .

    The status bar displays Changes applied.

    Note: All changes must be committed and applied before conducting the import operation. The changes are applicable only to the next import operation. See “Import to a Test System” on page 95.