ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 常用命令--不断更新中

常用命令--不断更新中

原创 Linux操作系统 作者:jinlonglv 时间:2011-05-31 10:07:40 0 删除 编辑

db2 list tablespaces show detail;

db2 list tablesapce containers number;

db2 list history backup since timestamp for database sample;

db2 list history backup dropped table all for database sample;

db2 backup database sample online/offline to datapath,datapath with number buffers without prompting;

db2 restore database sample from datapath taken at timestamp into newdatabase

db2 restore database sample from datapath redirect generate script. sample.clp(原来表空间的设备不存在)

db2 rollforward database sample to end of logs and complete(不能在进行roll forward)

db2 rollforward database sample to end of logs(不能再进行roll froward 到时间点,只能到 end of logs )

db2 rollforward database sample to timestamp using UTC(格林威治时间,默认的就是)

db2 rollforward database sample to end of logs and stop recover dropped table backup Id to datapath;

db2  select current timezone from sysibm.sysdummy1(查出timezone)

db2 "values(current timezone)"(查出timezone)

UTC(格林威治时间)=本地时间-timezone

db2 rollforward database sample to timestamp using local time

timestamp这个时间要比备份文件最末时间之后。

db2 get monitor switches(查看监控开关的情况)

db2 get connetion state ;db2 connect(都是获得当前的连接信息)

db2 set current schema schemename;

db2 select current schema from sysibm.sysdummy1;

db2 get dbm cfg | grep -ip dftdbpath;

db2 load client from absolute path/filename.ixf /del of ixf/del insert into tablename nonrecoverable(归档);

db2 export to filepath filename.ixf/del of ixf/del select * from table name;

db2 import from filename.ixf of ixf insert into tablename;

db2 terminate;

db2 connect reset;

db2 grant load on database to user/group username/groupname;

 db2 list command options;

db2 SET INTEGRITY for tablename_MQT IMMEDIATE CHECKED

db2 alter table tabschema.tabname data capture none;

db2 "declare mycursor cursor database dbname user username using passwd for select * from source table"
db2 "load from mycursor of cursor insert into targettable nonrecoverable"

db2 declare mycursor cursor for select * from tabschema.tabname
db2 load from mycursor of cursor insert into targettable nonrecoverable

 db2 list applications show detail可以查看连接的状态。

db2 create index db2admin.indx1 on db2admin.department(depanme) colect statistics;

db2 create index db2admin.indx1 on db2admin.department(depname) collect detailed statistics;

db2 create index db2admin.indx1 on db2admin.department(depname) collect sampled detailed statistics;

db2tbst 状态码.

我发现这个db2命令的缩写好像都是停留在这个重度音节上。

db2 update dbm cfg using MAX_COORDAGENTS 400 AUTOMATIC

db2 alter table tablename data capture none;

db2 alter table tablename data capture changes;

ps -emo THREAD -p 线程ID 可以查看进程下的所有线程

db2level 可以查看安装的版本路径,还有其他的一些信息。

db2 alter table alter cloumn name set not null

db2 alter table add primary key(column name)


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/24177460/viewspace-696741/,如需转载,请注明出处,否则将追究法律责任。

上一篇: 没有了~
请登录后发表评论 登录
全部评论

注册时间:2010-07-01

  • 博文量
    14
  • 访问量
    29292