Creating and dropping databases
In PATROL for DB2 UDB, you can create new DB2 UDB EEE databases and drop databases in your partitioned environment.
To create a database globally (across all node partitions) use the Create Database command in the DB2EEE instance menu. This command creates three initial tablespaces and the system tables in the specified directory for all nodes, allocates the recovery log, and catalogs the new database in the system database directory.
You can also create a database on a selected node by using the Create Database at Node command. This command is useful for re-creating and restoring a database that was previously removed due to damage or corruption.
To create a database
The following procedure affects all nodes listed in the db2nodes.cfg file.
- Right-click on the DB2EEE instance icon for which you want to create a new database and select Database Administration > Database Mgmt > Create Database.
Enter the required information.
To create or re-create a database on a single node
Right-click the DB2 node icon where you want to create the database and select Database Administration > Database Mgmt > Create Database at Node.
To drop a database
This task removes the contents of the database and all log files for the database across all nodes and uncatalogs the database, if the database is not in use. All users must be disconnected before you can drop a database.
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.
- Right-click on the DB2EEE instance icon and select Database Administration > Database Mgmt > Drop Database.
- Enter the database alias name of the database that you want to drop.
If a problem occurs
The database is not dropped if it is in use. The KM detects that a database is in use under the following circumstances:
- A SQL Viewer is active.
- Deadlock detection is enabled.