Netezza find Database Objects – nz_find_object

  • Post author:
  • Post last modified:February 27, 2018
  • Post category:Netezza
  • Reading time:3 mins read

If you are working on the huge data warehouse and that requires to create thousands of dimension and fact tables in hundreds of databases. You may want search for existence of particular table in hundreds of databases available in Netezza data warehouse appliance, this manual process is time consuming. In this article, we will discuss on Netezza find Database Objects to search the objects.

Netezza find Database Objects – nz_find_object

Netezza find Database Objects – nz_find_object

Luckily, IBM has provided a script nz_find_object, that can be used to find the objects in Netezza data warehouse appliance. You can find any objects such as table, system tables, view external table, synonym, materialized views etc.

nz_find_object prerequisites

To find objects in all databases, you should be either Netezza database administrator or you sould have read access to all databases.

nz_find_object Usage

Below is the usage of the object:

nz_find_object [string]

where string is;

The object name to be searched for:

  • Case insensitive
  • Automatically wild-carded (i.e., partial strings are permitted)
  • Performed against all objects of all types
  • The objects ‘object id’ value. If a number is entered, it will be considered an object id.

Netezza find Database Objects using nz_find_object Example

Below is the example that shows how to use the nz_find_object script to find the objects in Netezza data warehouse appliances.

[nz@netezza bin]$ nz_find_object patient 
 The Object Name Is | It Is Of Type | Its 'objid' Is | In The Database | In The Schema 
--------------------+----------------+----------------+-----------------+--------------- 
 PATIENT | VIEW | 214891 | TRAINING | ADMIN 
 PATIENT_1 | TABLE | 212328 | TRAINING | ADMIN 
 PATIENT_2 | TABLE | 212330 | TRAINING | ADMIN 
 PATIENT_EXT | EXTERNAL TABLE | 213282 | TRAINING | ADMIN 
(4 rows)

[nz@netezza bin]$

Read: