db2 command line notes

 

db2ilist - list instancessql

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

db2 create database feedb automatic storage yesthis

db2 list applicationsci

db2stopinput

db2startio

 

db2 list active databasestable

db2 list database directory show detailfile

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

db2 values current usererror

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

相關文章
相關標籤/搜索