How to find view dependencies in Netezza

ibm-netezza-administratornetezza

I want to find the dependent table of views in Netezza. Is there a table that provides the details?

Best Answer

This is actually pretty hard to do on Netezza because there are no system tables keeping track of table dependencies in views. Therefore you need to parse every view to get the referenced objects. There is a Unix support script on the server which does exactly this and will dump the results in a table. You might need to install the support package. Replace the database name with your database and run this command.

nz_view_references -create -schemas ALL DATABASENAME

When the script is finished (be patient), the results are located in table SYSTEM.NZ_VIEW_REFERENCES