Some DB2 database FAQs

Jephe Wu - http://linuxtechres.blogspot.com

 1. Install IBM DB2 Client Version 9 on Windows 7 Professional 32bit


Problem: after configuring remote database profiles, it works in control center, but not in command editor.

Also, when you issue command 'db2' under db2 command prompt, it doesn't show anything.


Solution: go to Control Panel, User Account and Family Safety, User Accounts, Change user account control settings, put as 'Never notify'.

Note: If you enabled db2 operating system security, which means db2 installation created db2admins and db2users groups, you have to put the Windows logon user name into the corresponding groups before using db2 client.

2. db2advis usage
db2advis -d dbname -q schema_name -n schema_name -i input_file
Reference: http://publib.boulder.ibm.com/infocenter/db2luw/v8/index.jsp?topic=/com.ibm.db2.udb.doc/core/r0002452.htm

3. SQL0575N - View or materialized query table name cannot be used because it has been marked inoperative.
If name is a view, recreate the view by issuing a CREATE VIEW statement using the same view definition as the inoperative view. (see http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp?topic=/com.ibm.db2.udb.msg.doc/doc/sql0575.htm )

Note: how to check if there are any other inoperative views in database schema name starting with NC.

db2 "select viewschema,viewname,valid from syscat.views where viewschema like 'NC%' and valid <> 'N'";
db2 "describe table syscat.views"
db2 "select viewschema,viewname,valid,text from syscat.views where viewname='NAMEOFVIEW' and viewschema = 'JEPHE'";

4. reason code 7 
you need to reorg that table first before and after altering table.

5. DB2 version 9 comparison
http://www.slideshare.net/deepblue5479/a-comparison-reviewofdb29releases