Command line tool used to run Netezza SQL queries and scripts on Windows OS. Tool was created because we could not find native SQL runner that will work on Window platforms, at a time. This is simplified version of the NZSQL tool provided by Netezza for Unix based platforms.


nzwsql.exe [-s server -d database -u user -p password [-q "query"] [-i script_file.sql] [-o output_file]]


-q:   Specifies Netezza SQL Query to run;
-i:    Specifies SQL script file to be executed;
-s:   Specifies Server;
-u:   Specifies User Login ID;
-p:   Specifies User Password;
-d:   Specifies Database Name;
-o:   Specifies the output file. Result of a query or a script will be router in to this file;
-m:  Specifies column delimiter, used in the output file to separate data columns. Default value is ',' (comma);
-help:  Prints the help screen.

  • When query parameter has been supplied, then NZWSQL will ignore specified SQL script file and will run only a query;
  • When a script file, output file, or path to those files includes space in their names, the name should be wrapped in double quotation marks.