DB2 V9 commonly used SQL finishing

  Affirms that: if reproduced, please reference! 

/***************************************

  DB2 V9 commonly used SQL finishing – Part 1 

  Finishing: Peng Jianjun 

  Last updated :2006-8-8 11:20 

  OS: Windows XP SP2 

  DB2 Version: V9.1.0.356 

  Following an order except in special state, the orders are to DB2 CLP 

  Following are the test order 

***************************************/

  1, the start DB2 server 

DB2START

  2, and stop DB2 server 

DB2STOP

  3, mandatory stop DB2 server 

  DB2STOP FORCE 

  4, create a database 

  DB2 CREATE DATABASE PjjTest 

  5, delete the database 

  DB2 DROP DATABASE PjjTest 

  6, connecting to the database 

  — Default to Windows users connecting to the database landing 
  DB2 CONNECT TO PjjTest 

  — Specified by users connecting to the database 
  DB2 CONNECT TO PjjTest USER db2admin USING **** 

  7, disconnect the database connection 

  — Disconnect 
  DB2 CONNECT RESET 

  — Termination of the database running order and disconnect the database connection 
  DB2 TERMINATE 

  8, presents examples of DB2 

DB2ILIST

  9, listed examples of the current DB2 

  DB2 GET INSTANCE 

  10, see examples of configuration files 

  — Default 
  DB2 GET DBM CFG 

  — Sub-screen display 
  DB2 GET DBM CFG | More 

  — The results will be displayed in the document deposited pjj.out 
  DB2 GET DBM CFG> pjj.out 

  11, update the database management parameters 

  DB2 UPDATE DBM CFG USING Para_Name Para_Value 

  12, see the configuration parameters specified database 

  — Default 
  DB2 GET DB CFG FOR PjjTest 

  — Sub-screen display 
  DB2 GET DB CFG FOR PjjTest | More 

  — The results will be displayed in the document deposited pjj.out 
  DB2 GET DB CFG FOR PjjTest> pjj.out 

  13, list the current activities of the database 

  DB2 LIST ACTIVE DATABASES 

  14, list all system database directory 

  DB2 LIST DATABASE DIRECTORY 

  15, list all DBMS directory nodes 

  DB2 LIST NODE DIRECTORY 

  16, listing application information 

  — Default 
  DB2 LIST APPLICATIONS 

  — Presents detailed information 
  DB2 LIST APPLICATIONS SHOW DETAIL 

  — List the designated database applications to connect 
  DB2 LIST APPLICATIONS FOR DB PjjTest 

  — List the designated database applications to connect the detailed information 
  DB2 LIST APPLICATIONS FOR DB PjjTest SHOW DETAIL 

  17, listed DB2 Information Division 

  — Default 
  DB2 LIST DATABASE PARTITION GROUPS 

  — Presents detailed information 
  DB2 LIST DATABASE PARTITION GROUPS SHOW DETAIL 

  18, listing database table space 

  — Default 
  DB2 LIST TABLESPACES 

  — Presents detailed information 
  DB2 LIST TABLESPACES SHOW DETAIL 

  19, listed DB2 set up a command line processor options 

  DB2 LIST COMMAND OPTIONS 

  20, related to the history list DB2 

  DB2 LIST HISTORY (BACKUP | ROLLFORWARD | REORG | 
  CREATE TABLESPACE | ALTER TABLESPACE | DROPPED TABLE | LOAD | 
  RENAME TABLESPACE | ARCHIVE LOG) 
  (ALL | SINCE timestamp | CONTAINING (schema.object_name | object_name)) 
  FOR [DATABASE] database-alias 

  21, access to information related to DB2 

  — Get tips information database to help 
  DB2? SQLCODE 

  — Access to the database of information to help orders 
  DB2? LIST 

  – Adjourned – 

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Google
  • DZone
  • Netvouz
  • NewsVine
  • Technorati

You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

AddThis Social Bookmark Button

Tags: ,