As a database administrator, you might be responsible for maintaining, managing, and administering DB2® instances, databases, and database objects such as table spaces, tables, and views. For example, your backup and recovery strategy might require you to take periodic backups of your databases. Or, over time, the data in your tables might become fragmented, increasing the size of your tables and indexes as the records are distributed over more and more data pages. To reclaim wasted space and improve data access, you likely will need to reorganize your tables and indexes.
For a detailed description of the database administration tasks that are supported, see the following table.
When you right-click an object in the Administration Explorer or the Object List, a context-sensitive menu displays the list of the database administration commands that are available for that object. When you select a database administration command for that object, a database administration task assistant is displayed. The task assistant guides you through the process of setting any options for the database administration command, previewing the commands that are automatically generated, and running the commands for the object.
Object | Action | Database administration command | Description |
---|---|---|---|
Instance | Configure | UPDATE DATABASE MANAGER CONFIGURATION | Modifies individual entries in the database manager configuration file. |
Quiesce | QUIESCE | Forces all users off the specified instance puts the instance into quiesced mode. | |
Start | db2start | Starts the DB2 instance. | |
Stop | db2stop | Stops the DB2 instance. | |
Unquiesce | UNQUIESCE | Restores user access to instances that were quiesced for maintenance or other reasons. | |
Databases | Backup | BACKUP DATABASE | Creates a backup copy of a database or table space. |
Configure | UPDATE DATABASE CONFIGURATION | Modifies individual entries in a specific database configuration file. | |
Configure Automatic Maintenance | UPDATE DATABASE CONFIGURATION | Enables or disables the various automatic maintenance activities that can be performed and defines a maintenance interval and window in which the activities can occur. Maintenance activities can occur during the maintenance window only If DB2 determines that the maintenance is required. | |
Configure Database Logging | UPDATE CONFIGURATION LOGGING | Modifies the data logging options for your database, such as the type of logging to use, the size of the log files, and the location where log files will be stored. | |
Create | CREATE DATABASE | Creates a database with either automatic or manual storage. | |
Drop | DROP DATABASE | Deletes the database contents and all log files for the database, uncatalogs the database, and deletes the database subdirectory. | |
HADR Setup | Various | Sets up the High Availability Disaster Recover (HADR) feature for your database. The HADR feature ensures that changes to the database can be replicated to a standby database. The standby database takes over in the event of a failure on the primary system. | |
HADR Manage | START HADR, STOP HADR, TAKEOVER HADR | Starts and stops HADR operations on either the primary or standby database. You can also instruct the standby database to take over as the new primary database in the event of a failure on the primary system. | |
List or Force Applications | FORCE APPLICATIONS | Forces local or remote users or applications off of the system to allow for maintenance on a server. | |
Manage Storage | ALTER DATABASE ADD STORAGE | Specifies that one or more new storage locations are to be added to the collection of storage locations that are used for automatic storage table spaces. | |
Quiesce | QUIESCE | Forces all users off of the specified database and puts the database into quiesced mode. | |
Recover | RECOVER DATABASE | Restores and rolls forward a database to a particular point in time or to the end of the logs. | |
Restart | RESTART DATABASE | Restarts a database that has been abnormally terminated and left in an inconsistent state. | |
Restore | RESTORE DATABASE | Re-creates a damaged or corrupted database that has been backed up by using the DB2 backup utility. | |
Roll Forward | ROLLFORWARD DATABASE | Recovers a database by applying transactions that were recorded in the database log files. | |
Start | ACTIVATE DATABASE | Activates the specified database and starts all necessary database services so that the database is available for connection and use by any application. | |
Stop | DEACTIVATE DATABASE | Deactivates the specified database. | |
Complete roll-forward recovery | ROLLFORWARD DATABASE with COMPLETE option | For databases that have been archived and restored, but have not had the logs rolled forward, rolls forward the logs. The logs can be rolled forward to a point in time or to the end of the log. | |
Unquiesce | UNQUIESCE | Restores user access databases that have been quiesced for maintenance or other reasons. | |
Table spaces | Backup | BACKUP | Creates a backup copy of a table space. |
Restore | RESTORE | Re-creates a damaged or corrupted table space that has been backed up by using the DB2 backup utility. The task assistant does not support restoring multiple table spaces. | |
Rollforward | ROLLFORWARD DATABASE | Recovers a table space by applying transactions that were recorded in the log files. | |
Complete roll-forward recovery | ROLLFORWARD DATABASE with COMPLETE option | For table spaces that have been archived and restored, but have not had the logs rolled forward, rolls forward the logs. The logs can be rolled forward to a point in time or to the end of the log. | |
Tables | Export Table | EXPORT | Exports data from a table to one of several external file formats. |
High Performance Unload | DB2 HPU unload | Uses DB2 High
Performance Unload commands to unload data from a DB2 table or to copy data from source tables
to target tables by using temporary files to store the data. To specify High Performance Unload as the unload method, DB2 High Performance Unload for Multiplatforms or DB2 High Performance Unload for Workgroups must be installed. These products are separately priced and separately installed. |
|
Import Table | IMPORT | Inserts data from an external file with a supported file format into a table. | |
Load Table | LOAD | Loads data into a DB2 table. | |
Reorg Table | REORG TABLE | Reorganizes a table. | |
Reorg Index | REORG INDEX | Reorganizes all of the indexes that are defined for the table. | |
Set Integrity | SET INTEGRITY | Brings tables out of set integrity pending state, places tables in set integrity pending state, places tables into full access state, or prunes the contents of staging tables. | |
Packages | Rebind | REBIND PACKAGE | Re-creates a package without needing the original bind file. |