艾辉 发表于 2016-11-19 03:52:57

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
页: [1]
查看完整版本: db2 command line notes