| DBの作成 |
$ db2 create database DB名 |
| DBの情報表示 |
$ db2 list database directory |
| DBの構成パラメータ表示 |
$ db2 get database configuration |
| DBの構成パラメータ変更 |
$ db2 update database configuration ・・・ |
| DBへの接続 |
$ db2 connect to DB名 |
| DBへのテーブル作成権限付与 |
$ db2 grant createtab on databse to user ユーザー名 |
| 現在の接続状況表示 |
db2 => get connection state |
| 対話モードの終了 |
db2 => quit |
| tablespaceの表示 |
db2 => list tablespaces |
| 表の一覧表示 |
db2 => list tables |
| 表の項目等の表示 |
db2 => describe table table名 |
| indexの表示 |
db2 => describe index for table table名
|
| tableのコピー |
create table table名 like コピー元table名 その後データのコピーは insert into コピー先table select * from コピー元table |
| 障害のログ |
~db2inst1/sqllib/db2dump/db2diag.log |
| DB2 Administration Server (DAS)の起動 |
/opt/IBM/db2/V8.1/das/bin/db2admin start |