SQL0575N; SQLSTATE 51024; DB2 database View marked inoperative in NCIM

Technote (troubleshooting)


Problem(Abstract)

Cannot access DB2 database VIEW called NCIM.INTERFACES although
the DB2 database TABLE called NCIM.INTERFACE is accessible.

Symptom

db2 => select * from ncim.interfaces
SQL0575N  View or materialized query table "NCIM.INTERFACES" cannot be used because it has been marked inoperative.  SQLSTATE=51024


Environment

DB2 NCIM database

Diagnosing the problem

Check to see if OTHER database views are inoperative as well ...


Use the SQL command below.

[db2inst1@redhat4 ~]$ db2 "select viewschema,viewname,valid from syscat.views where viewschema like 'NC%' and valid <> 'Y'"

If the database column valid = "Y", the view is OPERATIVE, but if the
database column valid is "X" or "N" or any other value, the database
view is INOPERATIVE.

The following command will tell us WHO has ACCESS / PRIVILEGES for
the NCIM.INTERFACES database VIEW, as an example.

[db2inst1@redhat4 ~]$ db2 "select definer from syscat.views where viewschema='NCIM' and viewname='INTERFACES'"

Try accessing the SAME database view as the definer userid reported from
the command above to see if the INOPERATIVE error still occurs for the
definer as well ..

Resolving the problem

The following statement is extracted from DB2 documentation:

"When a CREATE VIEW statement is executed that creates a VIEW with the
same schema name and view name as an existing inoperative view, the new
view replaces the inoperative view. ..Since all privileges held on a view are
revoked when a view becomes inoperative, the definer of the view must
grant these privileges again after recreating the inoperative view."

So, CREATE the VIEW again from the commands located in the database
creation script and then GRANT privileges to the VIEW as appropriate.

This should restore the VIEW to OPERATIVE.

Rate this page:

(0 users)Average rating

Document information


More support for:

Tivoli Network Manager IP Edition

Software version:

3.8, 3.9

Operating system(s):

AIX, HP-UX, Linux, Solaris

Reference #:

1429102

Modified date:

2011-03-25

Translate my page

Machine Translation

Content navigation