Basic Commands



=>Look at columns and data types of a table
$db2 describe table schema.tabelename
=>Look at one column's data type.
$db2 "describe select <colname> from schema.tablename"
=>Look at indexes on a table:
$db2 describe indexes for table schema.tablename
=>Build a file to set integrity on all tables that are in set integrity pending state.
$db2 "select 'set integrity for '||tabschema||'.'||tabname ||' immediate checked;' from syscat.tables
 where type = 'T' and status = 'C'" > /home/adm/kk/setint.out


=>View the names, pagesize, and number of pages of the bufferpools in your database:
$db2 "select bpname,pagesize,npages from syscat.bufferpools"
=>Make a bufferpool resize automatically.  You must have STMM turned on at the database 
     configuration level
$db2 alter bufferpool bp1 size AUTOMATIC 
=>Alter a bufferpool size that is a fixed size
$db2 ALTER BUFFERPOOL IBMDEFAULTBP SIZE 15000
=>Add space to a DMS tablespace:
$db2 "alter tablespace <tblspace> extend (all 8000)"





updating ...






No comments:

Post a Comment