IBM Books

Administration Guide

Dropping a Database Partition from a System

You can drop a database partition by using the DB2STOP command with the DROP NODENUM parameter, or the sqlepstp API. Before doing this, you must first ensure that the database partition being dropped is not being used by any database. To check, issue the DROP NODE VERIFY command.

You should ensure that all transactions for which this database partition was the coordinator have all committed or rolled back successfully. This may require doing crash recovery on other servers.

For example, if you drop the coordinator database partition (that is, the coordinator node), and another database partition participating in a transaction crashed before the coordinator node was dropped, the crashed database partition will not be able to query the coordinator node for the outcome of any indoubt transactions.

To drop a database partition from a partitioned database system:

  1. Redistribute the data for every database that resides on this node. This ensures that the partitioning map is kept current. For details, see Chapter 18. "Redistributing Data Across Database Partitions".

  2. Issue the DROP NODE VERIFY command or the sqledrpn API to verify that the server is not in use.

    Depending on the message you receive, proceed with either step 3 or step 4.

  3. If you receive message SQL6034W (Node not used in any database), you can do the following:

    1. Issue the DB2STOP command with the DROP NODENUM parameter to drop the database partition. After the command completes successfully, the system is stopped.

    2. If you want to, start the database manager with the DB2START command.

  4. If you receive message SQL6035W (Node in use by database), do the following:

    1. Use the REDISTRIBUTE NODEGROUP command to redistribute the data from the database partition you are dropping to other database partitions from the database alias, as indicated in message SQL6035W. You cannot drop the database partition until this is done.

    2. Drop any event monitors defined on the database partition.

    3. Return to step 2 and continue.

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

[ DB2 List of Books | Search the DB2 Books ]