db2 command line notes

 

db2ilist - list instances

db2 attach to <instance> user <username> using <password>   // this will attach to the instance as the specified user.

db2 create database feedb automatic storage yes

db2 list applications

db2stop

db2start

 

db2 list active databases

db2 list database directory show detail

db2 connect to feedb user <user_name> using <password>

db2 values current user

db2 values current schema

 

 

 

db2 -tvsf sample.sql

-t use semicolon as statement termination character;

-v verbose, echo input text to stdout

-s stop processing if error

-f file input

 

db2 list tables for all

db2 list tables for schema <schema_name>

db2 describe table <schema.table_name>

db2 select * from table

 

posted @ 2015-12-13 14:31  qsort  阅读(357)  评论(0编辑  收藏  举报