兩大類:
Control Center(CC), 主要用來管理 DB2 服務器。
Configuration Assistant(CA), 用來設置客戶機/服務器通信和維護註冊表變量等等。
任何 DB2 工具中都應該能夠找到 6 種基本特性:
Wizards
Generate DDL
Show SQL/Show Command
Show Related
Filter
Help
兩個主要Advisor:
Configuration Advisor , 創建DB時可以給出參數建議。
Design Advisor 結合 Self Tuning Memory Manager(STMM)可以診斷調優。
數據轉移進新的數據庫對象,可以使用傳統的 LOAD 或 IMPORT 實用程序,或 db2move 命令。
db2move 查詢特定數據庫的系統編目表並編譯所有用戶表的列表,然後以 PC/IXF 格式導出這些表。
DB2 Command Line Processor(DB2 CLP)是所有 DB2 產品中都有的,
可以用來運行DB2 命令、操作系統命令或 SQL 語句.
DB2 Command Windows(DB2 CW)
對於除 Windows 之外的所有操作系統,DB2 CW 是在操作系統的本機 CLP 中內置的。
在 Windows 環境中,需要命令提示中輸入db2cmd 命令來啓動 DB2 CW,然後才能跑db2命令。
DB2 CLP 的命令行選項, 會影響輸入的語句和命令的行爲方式,包括一下幾點:
>db2 list command options
Command Line Processor Option Settings
Backend process wait time (seconds) (DB2BQTIME) = 1
No. of retries to connect to backend (DB2BQTRY) = 60
Request queue wait time (seconds) (DB2RQTIME) = 5
Input queue wait time (seconds) (DB2IQTIME) = 5
Command options (DB2OPTIONS) =
Option Description Current Setting
------ ---------------------------------------- ---------------
-a Display SQLCA OFF
-c Auto-Commit ON
-d Retrieve and display XML declarations OFF
-e Display SQLCODE/SQLSTATE OFF
-f Read from input file OFF
-i Display XML data with indentation OFF
-l Log commands in history file OFF
-m Display the number of rows affected OFF
-n Remove new line character OFF
-o Display output ON
-p Display interactive input prompt ON
-q Preserve whitespaces & linefeeds OFF
-r Save output to report file OFF
-s Stop execution on command error OFF
-t Set statement termination character OFF
-v Echo current command OFF
-w Display FETCH/SELECT warning messages ON
-x Suppress printing of column headings OFF
-z Save all output to output file OFF
-代表開,- - 或+ 代表關,如:
db2 -c command or statement... 開Auto-Commit
db2 -c- command or statement... 關Auto-Commit
db2 +c command or statement... 關Auto-Commit
續行字符是(/)
如果有特殊字符,需要加雙引號。
db2 CW中,
db2 "select * from staff where dept > 10"
db2 select * from staff where dept > 10
當然在db2 clp裏就不用了。
db2ca 啓動Configuration Assistant
操作現有的數據庫、添加新數據庫、綁定應用程序、設置客戶機配置和註冊表參數(如上所示)以及導入和導出配置文件
db2cc 啓動Control Center,裏面還可以選取到其他一些工具,通常的就不列了。
DB2 Satellite Administration Center
使用 Satellite Administration Center(DB2 SAC)來設置和管理執行同樣業務功能的 DB2 服務器組。
這些服務器稱爲衛星,它們都運行同一個應用程序並採用同樣的 DB2 配置(數據庫定義)來支持這個應用程序。
可以使用 DB2 SAC 讓幾個 DB2 數據服務器利用一個主服務器來同步和維護它們的配置和數據
db2hc 啓動DB2 Health Center , 健康性檢查。
DB2 Journal顯示關於任務、數據庫活動和操作、Control Center 操作、消息、出現的健康狀態警報等等的歷史信息
Snapshot和Event Monitor, 監控系統.
DB2 Governor 可以監視針對數據庫運行的應用程序的行爲
DB2 Developer Workbench DB2 9 一個集成開發環境(IDE)(DB2 DWB).
Memory Visualizer
這個工具監視的高層內存成分包括:數據庫管理程序共享的內存、數據庫全局內存、應用程序全局內存、代理/應用程序共享的內存和代理私有內存。每個高層成分劃分爲低層成分,這些成分決定內存如何分配和釋放。
db2indbt啓動 In-doubt Transaction Monitor 幫助 DBA 處理處於 in-doubt 狀態的全局事務。
Activity Monitor可以幫助監視應用程序性能、應用程序併發性、資源消耗和 SQL 語句的使用情況,對LOCK應該有幫助。