2008/5/28

DB2上機操作指令指南

轉載自http://www.wgjz.com/database/other/20070515/89348.html

DB2上機操作指令指南


3.列出所有實例(db2inst1)

db2ilist

5.列出當前實例:

db2getinstance

4.察看示例配置文件:

db2getdbmcfg|more

5.更新數據庫管理器參數信息:

db2updatedbmcfgusingpara_namepara_value

6.創建數據庫:

db2createdbtest

7.察看數據庫配置參數信息

db2getdbcfgfortest|more

8.更新數據庫參數配置信息

db2updatedbcfgfortestusingpara_namepara_value

10.刪除數據庫:

db2dropdbtest

11.連接數據庫

db2connecttotest

12.列出所有表空間的詳細信息。

db2listtablespacesshowdetail

13.查詢數據:

db2select*fromtb1

14.數據:

db2deletefromtb1whereid=1

15.創建索引:

db2createindexidx1ontb1(id);

16.創建視圖:

db2createviewview1asselectidfromtb1

17.查詢視圖:

db2select*fromview1

18.節點編目

db2catalogtcpnodenode_nameremoteserver_ipserverserver_port

19.察看端口號

db2getdbmcfg|grepSVCENAME

20.測試節點的附接

db2attachtonode_name

21.察看本地節點

db2listnodedirecotry

22.節點反編目

db2uncatalognodenode_name

23.數據庫編目

db2catalogdbdb_nameasdb_aliasatnodenode_name

24.察看數據庫的編目

db2listdbdirectory

25.連接數據庫

db2connecttodb_aliasuseruser_nameusinguser_password

26.數據庫反編目

db2uncatalogdbdb_alias

27.導出數據

db2exporttomyfileofixfmessagesmsgselect*fromtb1

28.導入數據

db2importfrommyfileofixfmessagesmsgreplaceintotb1

29.導出數據庫的所有表數據

db2movetestexport

30.生成數據庫的定義

db2look-ddb_alias-a-e-m-l-x-f-odb2look.sql

31.創建數據庫

db2createdbtest1

32.生成定義

db2-tvfdb2look.sql

33.導入數據庫所有的數據

db2movedb_aliasimport

34.重組檢查

db2reorgchk

35.重組表tb1

db2reorgtabletb1

36.更新統計信息

db2runstatsontabletb1

37.備份數據庫test

db2backupdbtest

38.恢複數據庫test

db2restoredbtest

399\.列出容器的信息

db2listtablespacecontainersfortbs_idshowdetail

40.創建表:

db2ceatetabletb1(idintegernotnull,namechar(10))

41.列出所有表

db2listtables

42.插入數據:

db2insertintotb1values(1,』sam');

db2insertintotb2values(2,』smitty');

沒有留言:

JPA+complex key+custom Query

  來源: https://www.cnblogs.com/520playboy/p/6512592.html   整個來說,就是有複合主鍵 然後要使用  public interface XxXXxx DAO extends CrudRepository<Tc...