Maintenance by Paul Yip
IBM Toronto Laboratory
December 2002
The readers of this article are those who participate in the project, they use DB2 Everyplace to plan, set and execute a motorized project. It is plan to describe the life cycle of a motorized mobile project with DB2 Everyplace, thereby reducing development intensity and reducing project costs. Our tips and recommendations are based on the experience of participating on-site personnel of various mobile projects of DB2 Everyplace version 7.2 and Version 7.2.1.
Summary The following is a quick reference for the most common DB2 CLP command. Although it is not a complete reference, this document can prove the value-valuable reference material for any user who just contact DB2. Feedback can be sent to YPAUL@ca.ibm.com.
The parameters in square brackets are optional parameters, and the content represents variables in angle brackets. For example, the syntax of Connect is:
Connect to
[[user ] Using ]
This means that the use of the password with the database with the database MYPASS and the database Sample connections can be used in the following forms:
Connect to Sample
Connect to Sample User 1
Connect to Sample User1 Using Mypass
Organize all commands based on the scope of command. For any CLP command, you can enter a keyword with the prefix number ("?") To see its full syntax.
best regard!
Example
The CLP command describes the DB2Start launched the database manager instance. DB2STOP stops the database manager instance. Get DBM CFG Returns the Database Manager configuration settings. Get DBM CFG Show Detail Displays the current value and delay value of the database manager parameter (from V8). 1UPDATE DBM CFG USING
Putting Database Manager Configuration Parameters is values . Get instance returns the value of the DB2Instance environment variable. List Active Databases lists the active database and connections. List Application [Show Detail] Returns information about the currently connected application. Force Application (H1 [, H2, .., HN]) is disconnected from the sentence handle and the specific application. FORCE Application ALL Disconnects all applications and database connections. Attach to User Using Available in user Connection using password with remote instances identified as .
database
Create Database Creating a database named . Activate Database Explicitly activates the database. deActivate Database Explicitly invalidate the database. Connect to [[user ] Using ] As needed, explicitly uses the user and password and Database connection as needed. 1UPDATE DBM CFG USING Putting Database Manager Configuration Parameters is values . Connect RESET is disconnected from the current database. GET DB CFG Show Detail Displays the current value and delay value of the database configuration parameter (available only to V8). Get DB CFG for Returns the database configuration settings for database . Update DB CFG for Using Putting Database Database Configuration Parameters is . List tables [for {user | all | system | schema }] [show detail] lists the tables in the database. If no parameters are specified, the default is to list the list of current users. Describe Table Displays column information for a table or view. List tablespaces [Show Detail] Displays the identity, name, type, content, and status of the table space. List tablePace Containers for [Show Detail] displays container information for tablespace specified by . Quiesce TableSpaces for Table RESET resets the status of the table space to normal. Connectivity
Catalog [admin] node ... To protocol Create an item in the node directory. List [admin] Node Directory returns the content of the node directory. Catalog Database creates an item for database in the Database Directory. List Database Directory [ON ] Returns the content of the database directory.
performance
Get Monitor Switches returns the status of the session monitoring switch. Update Monitor Switches Using Setting the Session Monitoring Switch in . Reset Monitor All Reset Performance Monitor value. Get Snapshot for DBM Returns the performance information of the instance level. Get Snapshot for All on Returns all performance information at the database level. Get Snapshot for Dynamic SQL ON Returns the content of dynamic SQL cache. Runstats on Table . Collection of statistics on the table . The table name must be all defined by . Reorgchk on Table ALL determines whether you need to reorganize the table. This is useful for automating Runstats for all tables. REORG TABLE The "fragment" data is removed by reconstructing and recombine the table. management
Export extracts database data into a flat file. Import imports data into the database by using the Import utility. Load Query Table [to local-message-file] [noDelta | Summaryonly] [showDelta] Returns the progress of the LOAD utility. Backup Database [to ] performs database backup. RESTORE DATABASE [from ] performs database recovery. GET Health Snapshot for DBM Returns the normal snapshot information of the instance (available only to V8). Get Health Snapshot for all on Returns all normal snapshots of database (available only to V8).
Management server
GET Admin CFG Returns the configuration settings for the management server. Update Admin CFG Using
Distributes the management server configuration parameter to the value .
Application development
Get Routine Into from [specific] procedure [Hide Body] extracts the SQL process into binary files. Put Routine from [Owner [use register]] Deploys the SQL process from the binary file.