DB2 Server for VSE & VM: Control Center Operations Guide for VM


Appendix B. Changing Database Name

If you need to change the name of a database (dbname, not machine name) that is managed by Control Center, you must make changes to database system files and Control Center control files.

For the sake of this discussion, OLDNAME refers to the name of the database that is being changed, and NEWNAME is the new name it is to be given.


Database Changes

  1. Log onto the OLDNAME virtual machine.
  2. Access the database 195 production code disk in WRITE mode with an available access mode.
  3. Use the CMS RENAME command to rename the following files to reflect the new database name:
         Old Name              New Name
    -------------------   -------------------
    OLDNAME  SQLDBGEN Q   NEWNAME  SQLDBGEN Q
    OLDNAME  SQLDBN   Q   NEWNAME  SQLDBN   Q
    OLDNAME  SQLFDEF  Q   NEWNAME  SQLFDEF  Q
    
  4. Use XEDIT to edit file NEWNAME SQLDBN Q.

    Locate the following statement and replace OLDNAME with NEWNAME (save your changes):

    DBMACHID=dbmachid,DCSSID=Dcssid,DBNAME=OLDNAME
    

NOTE: If your database name differs from the VM machine ID, please make the appropriate entry in the Control Center DBINIT Control file. See Maintaining the DBINIT CONTROL File. Also be sure to include the database name in the VM directory IUCV statement, as the example below shows:

IUCV ALLOW
IUCV *IDENT SQLDBA LOCAL

Control Center Changes

  1. Log onto the Control Center service machine that manages the database.
  2. Use XEDIT to edit the database parameters file which resides on the service machine's A-disk. The database parameters file is named 'database PARMS', where database is the database machine ID.

    Locate the following statement and replace OLDNAME with NEWNAME (save your changes):

    :Dbname.OLDNAME
    
    Note:

    Tokens in this file are case-sensitive; do not alter.

  3. Use XEDIT to edit the following two files; replace references to OLDNAME with NEWNAME (save your changes):
    DBINIT CONTROL
    SQLMSTR DIRECTRY
    

    These files exist on the Control Center code disk.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]