Creating, dropping, and migrating databases


You can use PATROL for DB2 UDB to create new DB2 databases and drop databases. You can also migrate a database. The Create Database command creates three initial tablespaces and the system tables in the specified directory, allocates the recovery log, and catalogs the new database in the system database directory.

To create a database

  1. Right-click on the DB2 DBM instance icon for which you want to create a new database.

  2. select Database Administration > Database Mgmt > Create Database.
  3. Enter the required information.

    Warning

    Note

    See the online Help for more details about completing this task. This command can require an extended period of time to complete. You can monitor the progress of this command by viewing the command status icon that PATROL displays in the console window. This icon indicates the status as input, running, or output.

    Success

    Tip

    You can have a problem creating a new database if your file system has insufficient space for the new database. Also, a new database cannot have the same name as an existing one. Use the List DB Directory command in the instance menu to view all existing database names.

To drop a database

Warning

Note

This task removes the contents of the database and all log files for the database, uncatalogs the database, and removes the database subdirectory, if the database is not in use. All users must be disconnected before you can drop a database. The KM detects that a database is in use under the following circumstances:

  • A SQL Viewer is active.
  • Deadlock detection is enabled.

If the log files are needed for a possible roll-forward recovery after a restore operation, be sure to save the log files before dropping the database.

  1. Right-click on the DB2 DBM instance icon and select Database Administration > Database Mgmt > Drop Database.
  2. Enter the database alias name of the database that you want to delete.

To migrate a database

  1. Right-click on the DB2 DBM instance icon and select*Database Administration > Database Mgmt*> Migrate Database.
  2. Enter the database alias name for the database that you are migrating.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC PATROL for DB2 Universal Database 9.0