NOVOTS KMS 词汇表 Glossary    联系我们 Contact Us
查询 Search  
   
按类别浏览 Browse by Category
NOVOTS KMS .: 数据库 .: db2&aix日常维护

db2&aix日常维护

1. 检查主机信息
用命令: prtconf|head 
  将出以下信息:
/usr/sbin/prtconf[156]: /usr/lib/boot/bin/dmpdt_chrp: cannot execute
System Model: IBM,9119-595
Machine Serial Number: 02D683C
Processor Type: PowerPC_POWER5
Number Of Processors: 15
Processor Clock Speed: 1900 MHz
CPU Type: 64-bit
Kernel Type: 64-bit
LPAR Info: 2 crmd3_lpar
Memory Size: 114688 MB
Good Memory Size: 114688 MB
/usr/sbin/prtconf: Broken pipe
2. 查看数据库目录:
  用命令:db2 list db directory
  将出以下类似信息:
System Database Directory

 Number of entries in the directory = 7

Database 1 entry:

 Database alias = DWSEC43
 Database name = DWSECUR
 Node name = NODE43
 Database release level = a.00
 Comment =
 Directory entry type = Remote
 Catalog database partition number = -1

3. 查看补丁信息:
  用命令:db2level
  将出以下类似信息:
  DB21085I Instance "dwmon" uses "64" bits and DB2 code release "SQL08016" with 
level identifier "02070106".
Informational tokens are "DB2 v8.1.1.58", "s040914", "U800265", and FixPak "6".
Product is installed at "/usr/opt/db2_08_01".

4. 查看节点:
查看文件sqllib/db2nodes.cfg内容;
使用命令统计:db2_ps|wc -l
5. 测试数据库连接情况:
  用命令:db2_all “db2 connect to sccrm”

6. 查看系统情况:
用命令:oslevel;instfix -i|grep ML

7. 查看数据库配置情况:
用命令:db2set –all
将有以下类似信息:
[i] DB2TERRITORY=CN
[i] DB2_PINNED_BP=YES
[i] DB2_STRIPED_CONTAINERS=ON
[i] DB2ATLD_PORTS=62000:65000
[i] DB2CHECKCLIENTINTERVAL=0
[i] DB2_HASH_JOIN=ON
[i] DB2MEMMAXFREE=0
[i] DB2_FORCE_FCM_BP=yes
[i] DB2COUNTRY=86
[i] DB2COMM=tcpip
[i] DB2CODEPAGE=1386
[i] DB2_PARALLEL_IO=*
[g] DB2_EEE_LICENSE_POLICY=3659178992271360

用命令:db2licm –l
将有以下类似信息:
Product Name = "DB2 Enterprise Server Edition"
Product Password = "DB2ESE"
Version Information = "8.1"
Expiry Date = "Permanent"
Registered Connect User Policy = "Disabled"
Number Of Entitled Users = "5"
Enforcement Policy = "Soft Stop"
Number of processors = "15"
Number of licensed processors = "14"
Annotation = ""
Other information = ""

8. 查看数据库配置情况:
用命令:db2 get dbm cfg 
  db2 get db cfg for sccrm
将有以下类似信息:(java配置情况也在其中)
  Database Manager Configuration

  Node type = Enterprise Server Edition with local and remote clients

 Database manager configuration release level = 0x0a00

 CPU speed (millisec/instruction) (CPUSPEED) = 4.487270e-07
 Communications bandwidth (MB/sec) (COMM_BANDWIDTH) = 1.000000e+02

 Max number of concurrently active databases (NUMDB) = 2
 Data Links support (DATALINKS) = NO
 Federated Database System Support (FEDERATED) = YES
 Transaction processor monitor name (TP_MON_NAME) = 

 Default charge-back account (DFT_ACCOUNT_STR) = 

Java Development Kit installation path (JDK_PATH) = /usr/java13_64

9. 系统用户资源情况:
用命令:ulimit –a
将有以下类似信息:
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) unlimited
stack(kbytes) 4194304
memory(kbytes) unlimited
coredump(blocks) unlimited
nofiles(descriptors) 2000

10. 查看db2diag.log文件大小
   
11. 计算数据库表数量和近期产生表数量
用命令:db2 "select count(0)from syscat.tables where type='T'"(可跟时间判定条件)
db2 "select count(0)from syscat.tables where type='T' and stats_time>='2007-03-24-19.37.48.782181'"
  db2 "select bpname,npages,pagesize from syscat.bufferpools"
将有以下类似信息:
1  
-----------
  9724

  1 record(s) selected. 
   

12. 查看top图
用命令:topas
将有以下类似信息:
Topas Monitor for host: crmd3 EVENTS/QUEUES FILE/TTY
Sun Apr 29 13:23:05 2007 Interval: 2 Cswitch 6977 Readch 0.2G
  Syscall 24147 Writech2700.6K
Kernel 6.4 |## | Reads 2206 Rawin 0
User 93.3 |########################### | Writes 86 Ttyout 567
Wait 0.0 | | Forks 92 Igets 0
Idle 0.0 | | Execs 52 Namei 2639
  Runqueue 29.1 Dirblk 0
Network KBPS I-Pack O-Pack KB-In KB-Out Waitqueue 0.0
en0 2567.9 964.7 144.6 282.9 2285.1
lo0 741.7 48.7 48.7 370.8 370.8 PAGING MEMORY
en1 0.0 0.0 0.0 0.0 0.0 Faults 15368 Real,MB 114688
  Steals 450 % Comp 62.8
Disk Busy% KBPS TPS KB-Read KB-Writ PgspIn 0 % Noncomp 20.0
disk1856 13.5 1655.2 17.1 1655.2 0.0 PgspOut 0 % Client 19.7
disk1138 12.5 1124.9 12.6 1124.9 0.0 PageIn 514
disk1854 12.0 1494.5 17.1 1494.5 0.0 PageOut 3 PAGING SPACE
disk1598 11.5 1205.2 15.6 1205.2 0.0 Sios 517 Size,MB 73728
disk1866 11.5 1173.1 12.6 1173.1 0.0 % Used 0.8
disk1855 11.0 1205.2 14.6 1205.2 0.0 NFS (calls/sec) % Free 99.1
disk1366 11.0 1269.5 15.6 1269.5 0.0 ServerV2 0
disk1868 11.0 1076.7 12.1 1076.7 0.0 ClientV2 0 Press:
disk1847 10.5 932.0 11.6 932.0 0.0 ServerV3 0 "h" for help
disk1147 10.5 1607.0 21.1 1607.0 0.0 ClientV3 0 "q" to quit
disk1384 10.0 1076.7 12.6 1076.7 0.0
disk1599 10.0 1430.2 15.6 1430.2 0.0
disk1383 9.5 1285.6 16.6 1285.6 0.0
disk1773 9.5 803.5 10.0 803.5 0.0
disk1394 9.5 932.0 12.1 932.0 0.0


13. 查看snapshot报告
用命令:db2 get snapshot for database manager 
  db2 get snapshot for database on sccrm

14. 查看系统错误报告:
用命令:errpt -a
将有以下类似信息:
  LABEL: CORE_DUMP
IDENTIFIER: A63BEB70

Date/Time: Wed Apr 25 19:32:31 BEIST 2007
Sequence Number: 2389
Machine Id: 00CD684C4C00
Node Id: crmd5
Class: S
Type: PERM
Resource Name: SYSPROC  

Description
SOFTWARE PROGRAM ABNORMALLY TERMINATED

Probable Causes
SOFTWARE PROGRAM

User Causes
USER GENERATED SIGNAL
  Recommended Actions
  CORRECT THEN RETRY
15. 查看表空间情况
16. 察看节点文件
  ls -l /dwcdr_inst0/dwcdr/NODE0000/SQL00001/db2rhist.asc
ls -l /dwcdr_inst0/dwcdr/NODE0001/SQL00001/db2rhist.asc
ls -l /dwcdr_inst0/dwcdr/NODE0002/SQL00001/db2rhist.asc
ls -l /dwcdr_inst0/dwcdr/NODE0003/SQL00001/db2rhist.asc
ls -l /dwcdr_inst0/dwcdr/NODE0004/SQL00001/db2rhist.asc
ls -l /dwcdr_inst0/dwcdr/NODE0005/SQL00001/db2rhist.asc
ls -l /dwcdr_inst0/dwcdr/NODE0006/SQL00001/db2rhist.asc
ls -l /dwcdr_inst0/dwcdr/NODE0007/SQL00001/db2rhist.asc
ls -l /dwcdr_inst0/dwcdr/NODE0008/SQL00001/db2rhist.asc
ls -l /dwcdr_inst0/dwcdr/NODE0009/SQL00001/db2rhist.asc
ls -l /dwcdr_inst0/dwcdr/NODE0010/SQL00001/db2rhist.asc
ls -l /dwcdr_inst0/dwcdr/NODE0011/SQL00001/db2rhist.asc
ls -l /dwcdr_inst0/dwcdr/NODE0012/SQL00001/db2rhist.asc
ls -l /dwcdr_inst0/dwcdr/NODE0013/SQL00001/db2rhist.asc
ls -l /dwcdr_inst0/dwcdr/NODE0014/SQL00001/db2rhist.asc
ls -l /dwcdr_inst0/dwcdr/NODE0015/SQL00001/db2rhist.asc


这篇文章对你多有用?

用户评语

添加评语
当前还没有评语.


.: .: .: .: .:
[ 登陆 ]
北京护航科技有限公司 2006

Novots Technologies Limited