Look at columns and data types of a table
=>db2 describe table schema.tabelename
Look at one column's data type.
=>db2 "describe select from schema.tablename"
Look at indexes on a table:
=>db2 describe indexes for table schema.tablename
Export data to a file in ixf format:
=>db2 "select 'set integrity for '||tabschema||'.'||tabname ||' immediate checked;' from syscat.tables where type = 'T' and status = 'C'" > file.out
=>db2 describe table schema.tabelename
Look at one column's data type.
=>db2 "describe select
Look at indexes on a table:
=>db2 describe indexes for table schema.tablename
Export data to a file in ixf format:
- =>db2 export to tablename.ixf of ixf messages tablename.txt select * from SCHEMA.TABNAME
- =>db2 import from filename.ixf of ixf messages tablename.txt insert into SCHEMA.TABNAME
- =>db2 load from filename.ixf of ixf insert into SCHEMA.TABNAME nonrecoverable;
=>db2 "select 'set integrity for '||tabschema||'.'||tabname ||' immediate checked;' from syscat.tables where type = 'T' and status = 'C'" > file.out
No comments:
Post a Comment