Skip to main content

Posts

Showing posts from 2017

Netezza Interview Questions and Answers

Question and Answer What the utilities available in nz/bin? Driver: libnzodbc.so , Utilities  : nzconvert, nzds, nzevent, nzhw, nzload, nzodbcsql, nzpassword, nzreclaim, nzrev, nzsession, nzsql, nzstate, nzstats, nzsystem Where is the Configuration file available? Config file odbc.ini is available in nz/lib and it contains the Database Source properties and Connection parameters. What is NZSQL utility? This utility can be run from any machine on which it is installed i.e. it does not have be from netezza box itself. This utility can be used to run any sql statement like select or insert statement on the netezza database. In the below usage you see data extracted from the table into a output file and in the second mzsql command the data is also gzipped. nzsql -host <netezz_db_servername> -d <database> -u <username> -pw <password> -c -c "select * from tablename" -o /root/home/outputfilename.txt; What is NZLOAD utility? This utility can be us

Netezza Data Load using NZLOAD

NZLoad Its a SQL CLI command that you can use to load data from the local host or a remote client. The nzload command processes command-line load options to send queries to the host to create an external table definition, run the insert or select query to load data, and when the load is complete, drop the external table. The nzload command connects to a database with a database user name and password, like any other Netezza client application. The user name specifies an account with a particular set of privileges, and the system uses this account to verify access. Permission required to run NZLoad - Create External Table permission. NZLoad Syntax nzload [-h|-rev] [ options ]    You can used various parameters for NZLoad, some imp parameters are -Cf - Control file is important when you are planning to load multiple files to different tables -df - data file path -bf - bad file path etc For details you can refer to Netezza 7.2.1 documentation in IBM knowledge cent

Extent and Zonemaps

Extents and Zonemaps in Netezza An extent is the smallest unit of disk allocation on a SPU. One extent is equal to 3MB of a disk. A zonemap is an internal mapping structure to extents that take advantage of the internal ordering of data to eliminate extents that do not need to be scanned. Zonemaps transparently avoid scanning of unreferenced rows. Zonemaps are created for every column in the table and contain the minimum and maximum values for every extent. In layman terms zone maps contains the minimum and maximum values of a column. Whenever you issues an sql query with where clause, the netezza system first scans the zonemaps to find the addresses of the minimum and maximum extents that contains the column values. After that the netezza system scans the column values in sequential order, finds for a match and then displays the result. Zonemaps are created and refreshed for every SPU when you Generate statistics Nzload operation Insert, update operations N