Showing posts with label db2. Show all posts
Showing posts with label db2. Show all posts

Wednesday, June 25, 2008

db2 8.1 describe table

on db2 8.1, the user cannot do 'describe table tablename', it gives error message 'user doesn't have select privileage on syscat.columns '.

solution 1:
use db2inst1, then 'describe table schema.table'' e.g. describe table jephe.user_account.


solution 2:

grant select on table syscat.columns to user 'username' e.g. grant select on table syscat.columns to user jephe

Thursday, June 12, 2008

SQL0805N for NULLID.SYSxyN03 (x, Y and N maybe of varying values)

do the following at the db2 client side which might be your tomcat application server.
-------------
[db2inst1@app bnd]$ db2 bind @db2cli.lst blocking all sqlerror continue grant public CLIPKG 30
LINE MESSAGES FOR db2cli.lst------ -------------------------------------------------------------------- SQL0061W The binder is in progress. SQL0091N Binding was ended with "0" errors and "0" warnings.

[db2inst1@app bnd]$ pwd/opt/IBM/db2/V8.1/bnd

Thursday, May 8, 2008

db2 commands

  • get db configuration
db2 get db cfg for databasename
db2 update db cfg for dbname using screenname value
db2 get dbm cfg
  • to list all tables, filtering out views
db2 list tables show detail | grep -v ' V ' | awk '{print $1}'