WEB开发网
开发学院数据库DB2 DB2 日常维护技巧,第 2 部分:实例和常用备份策略... 阅读

DB2 日常维护技巧,第 2 部分:实例和常用备份策略

 2010-04-15 00:00:00 来源:WEB开发网   
核心提示: 如果想查看 DB2DART 的相关语法,可以在当前 DB2CLP 窗口中,DB2 日常维护技巧,第 2 部分:实例和常用备份策略(4),发出 DB2DART 命令(不带任何参数),就可以看到其相关选项了

如果想查看 DB2DART 的相关语法,可以在当前 DB2CLP 窗口中,发出 DB2DART 命令(不带任何参数),就可以看到其相关选项了,具体如清单 01-34 所示:

清单 3 . DB2DART 命令的相关选项

C:\> db2dart 
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
 
 
   - - - - - - -  D B 2 D A R T  - - - - - - - - - 
 
        Database Analysis Tool 
 
            IBM 
 
            DB2 NT 
 
 
     The DB2DART Tool is a utility for the analysis of databases, 
      tablespaces, and tables. DART's primary function is to 
     examine databases for their architectural correctness, and to 
             report any encountered errors. 
- - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - 
 
 
- - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - 
            DB2 V9.1 DB2DART HELP 
 db2dart - Database Analysis Tool 
 
  The db2dart command analyses databases , table spaces and tables . 
  The primary function of this command is to examine databases for 
  architectural correctness , and to report any encountered errors . 
 
 Requirements : 
  db2dart must be run with no users connected to the database . 
 
 Syntax: 
  db2dart < database name > [ action ] [ options . . . ] 
 
  ( ' db2dart /H ' for extended help ) 
 
 Command parameters : 
  /H   Displays this help . 
 
( press < enter > for more text ) 
 
 
 Inspect actions : 
  /DB  (default) Inspects entire database . 
  /T   Inspects a single table . ( See notes 1 , 3 , 13 ) 
  /TSF  Inspects only the table space files and containers . 
  /TSC  Inspects a table space's constructs ( but not its tables ) . 
  /TS  Inspects a single table space and its tables . 
      ( /TSC and /TS require a table space id . See notes 1 , 2 ) 
  /ATSC Inspects constructs of all table spaces ( but not their tables ) . 
 
 Data format actions : 
  /DD  Dumps formatted table data . ( See notes 1 , 4 , 13 ) 
  /DM  Dumps formatted block map data . ( See notes 1 , 4 , 13 ) 
  /DI  Dumps formatted index data . ( See notes 1 , 4 , 12 ) 
  /DXA  Dumps formatted xda data in ASCII . ( See notes 1 , 4 , 13 ) 
  /DXH  Dumps formatted xda data in Hex . ( See notes 1 , 4 , 13 ) 
  /DP  Dumps pages in hex format .  ( See notes 1 , 6 , 13 ) 
  /DTSF Dumps formatted table space file information . 
  /DEMP Dumps formatted EMP information for a DMS table . 
      ( See notes 1 , 3 , 13 ) 
  /DDEL Dumps formatted table data in delimited ASCII format . 
      ( See note 13 ) 
  /DHWM Dumps highwater mark information . ( See notes 1 , 2 , 01 ) 
  /LHWM Suggests ways of lowering highwater mark . 
      ( See notes 1 , 7 , 14 ) 
 
( press < enter > for more text ) 
 
 
 Repair actions : 
 Make sure the database is offline for these actions . 
  /MI  Marks index as invalid . 
      ( Database must be offline . See notes 1 , 5 ) 
  /ETS  Extends the table limit in a 4K DMS table space , if possible . 
      ( This action requires a table space id . See notes 1 , 2 ) 
  /RHWM Reduces highwater mark through empty SMP extents . 
      ( See notes 1 , 2 ) 
 
 Change state actions : 
 Make sure the database is offline for this action . 
  /CHST Change a state of the database . 
 
( press < enter > for more text ) 
 
 Input value options : 
  /OI object-id    Specifies the object ID . 
  /TN table-name    Specifies the table name . 
  /TSI tablespace-id  Specifies the table space ID . 
  /ROW sum       Identifies whether L/F descriptors , LOB descriptors 
             and control information should be checked . 
             ( 1 ) Checks control information in rows . 
             ( 2 ) Checks long field and LOB descriptors . 
             ( see note 8 ) 
  /PS number      Specifies the page number to start with . 
             ( Suffix page number with ' p ' for pool relative . ) 
  /NP number      Specifies the number of pages . 
  /V Y/N        Specifies whether or not to use verbose option . 
             ( Y ) Verbose . 
             ( N ) No verbose . 
  /RPT path      The path to place report output file ( optional ) . 
  /RPTN file-name   The name of the report file ( optional ) . 
  /SCR Y/M/N      Specifies the type of screen output , if any . 
             ( Y ) Produces normal screen output . 
             ( M ) Produces minimal screen output . 
             ( N ) Produces no screen output . 
  /RPTF Y/E/N     Specifies the type of report file output , if any . 
             ( Y ) Produces normal output . 
             ( E ) Sends only error information to report file . 
             ( N ) Produces no report file output . 
  /ERR Y/N/E      Specifies the type of log to produce in DART .INF , 
             if any . 
             ( Y ) Produces a normal log in DART . INF file . 
               ( default ) 
             ( N ) Minimizes output to log DART . INF file . 
             ( E ) Minimizes DART . INF file and screen output . 
               Only error information is logged . 
  /WHAT DBBP OFF/ON  Specifies the database backup pending state . 
             ( OFF ) Off state . 
             ( ON ) On state . 
  /QCK         Quick option . Only applies to /DB , /T , and /TS 
             Actions . Only inspects page 0 of the DAT 
             objects and partially inspects the index 
             objects ( does not inspect BMP , LOB , LF objects 
             and does not traverse the entirety of the DAT 
             or INX objects ) . 
  /TYP         Specifies the type of object . Valid values are : 
             ( DAT ) Object type is DAT . 
             ( INX ) Object type is INDEX . 
             ( BKM ) Object type is BMP . 
 
( press < enter > for more text ) 
 
Notes : 
1 - For actions that require additional input values for identifying the data 
  to act on , the input values can be specified as arguments along with the 
  action . If values are not specified you will be prompted for input values . 
  This does not apply for actions /DDEL . For this , you will be prompted for 
  the required input values . 
2 - Actions /TSC , /TS , /ETS , /DHWM and /RHWM require 1 input value - the 
  table space ID . 
3 - Actions /T and /DEMP require two input values consisting of 
  table space ID , and either of table object ID or table name . 
4 - Actions /DD , /DM , /DXA , DXH and /DI require five input values consisting of 
  either table object ID or table name, table space ID , page number to start 
  with, number of pages , and verbose choice . 
5 - Action /MI requires two input values consisting of table space ID and 
  index object ID . 
6 - For DMS table spaces , action /DP requires three input values consisting of 
  table space ID , page number to start with , and number of pages . 
  For SMS table spaces , action /DP requires five input values consisting of 
  table space ID , object ID , page number to start with , number of pages , 
  and object type . 
7 - Action /LHWM requires a table space ID and the number of pages for the 
  desired highwater mark after lowering it . 
8 - For value options where unique values identify different choices for 
  the option , sum up the values to get the combination of choices . 
9 - Default location for report output file is the current directory in a 
  non-MPP environment , and in the diagnostic directory in a MPP environment . 
10 - The scope of db2dart is single node . 
11 - In a MPP environment , you can use db2_all to invoke db2dart at all DB2 
  logical nodes in a single invocation . 
12 - For partitioned tables, the /DI action uses index_objectid and tbspaceid 
  from syscat . indexes as the first two inputs to /OI and /TSI options . 
  The table name ( /TN ) option is not supported for the action . 
13 - For partitioned tables , the /DD , /DM , /DEMP , /DDEL , /DP , /DXA , /DXH 
  actions use partitionobjectid and tbspaceid from syscat.datapartitions 
  as the input to the table object ID ( /OI ) and table space ID ( /TSI ) 
  for a specific partition . The table name option ( /TN ) is not supported 
  for these actions . The /T action supports the table name or global table 
  object ID when use with global table space ID to check the entire table , 
  and also supports using partitionobjectid and tbspaceid from 
  syscat.datapartitions as the input to /OI and /TSI to check a specific 
  partition . 
14 - In general , db2dart requests to be run when the database is offline . 
  However for /DHWM and /LHWM actions , this request is not strict . 
  The report can be generated without database being offline , but results 
  will vary depending on how much write/update activity has occurred 
  recently ( less activity implies more reliable results ) . 
 
- - - - -  D A R T  P R O C E S S I N G  C O M P L E T E  - - - - - - - 
 
 
 

上一页  1 2 3 4 5 6  下一页

Tags:DB 日常 维护

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接