Netezza Installation and Configuration

Netezza Installation and Configuration Steps

  1. If you are upgrading from or reinstalling a previous version, follow the instructions in Upgrading from or Reinstalling a Previous Version.
  2. Install the in-database deployment package.
  3. Run the %INDNZ_PUBLISH_JAZLIB macro to publish the SAS formats library as an object.
    For more information, see Running the %INDNZ_PUBLISH_JAZLIB Macro.
  4. Run the %INDNZ_PUBLISH_COMPILEUDF macro.
  5. If you plan to use SAS Model Manager with the SAS Scoring Accelerator for in-database scoring, perform the additional configuration tasks in Configurations for SAS Model Manager.

Upgrading from or Reinstalling a Previous Version

Overview of Upgrading from or Reinstalling a Previous Version

You can upgrade from or reinstall a previous version of the SAS Formats Library and binary files, the SAS Embedded Process, or both. See the following topics:

Upgrading from or Reinstalling the SAS Formats Library and Binary Files

To upgrade from or reinstall a previous version of the SAS Formats Library and binary files, follow these steps.
Note: These steps apply if you want to upgrade from or reinstall only the SAS Formats Library and binary files. If you want to upgrade from or reinstall the SAS Embedded Process, see Upgrading from or Reinstalling the SAS Embedded Process.
  1. Run the %INDNZ_PUBLISH_JAZLIB macro with ACTION=DROP to remove the SAS formats library as an object.
    For more information, see Running the %INDNZ_PUBLISH_JAZLIB Macro.
  2. Run the %INDNZ_PUBLISH_COMPILEUDF macro with ACTION=DROP to remove the SAS_COMPILEUDF, SAS_DIRECTORYUDF, and SAS_HEXTOTEXTUDF functions.
  3. Navigate to the /nz/extensions/SAS directory and delete the SASFormatsLibraryForNetezza directory.
    Note: Under the SAS directory, the installer for the SAS Formats Library and binary files and the SAS Embedded Process installer both create a directory under the SAS directory. These directories are named SASFormatsLibraryForNetezza and SASTKInDatabaseServerForNetezza, respectively. If you delete everything under the SAS directory, the SAS Embedded Process, the SAS Formats Library, and the binary files are removed. If you want to remove only one, then you must leave the other directory.
  4. If you are also upgrading from or reinstalling the SAS Embedded Process, continue the installation instructions in Upgrading from or Reinstalling the SAS Embedded Process. Otherwise, continue the installation instructions in Installing the SAS Formats Library, Binary Files, and the SAS Embedded Process.

Upgrading from or Reinstalling the SAS Embedded Process

To upgrade from or reinstall a previous version of the SAS Embedded Process, follow these steps.
Note: These steps are for upgrading from or reinstalling only the SAS Embedded Process. If you want to upgrade from or reinstall the SAS Formats Library and binary files, you must follow the steps in Upgrading from or Reinstalling the SAS Formats Library and Binary Files.
  1. Check the current installed version of the SAS Embedded Process.
    nzcm --installed
  2. Enter these commands to unregister and uninstall the SAS Embedded Process.
    nzcm -u SASTKInDatabaseServerForNetezza
    nzcm -e SASTKInDatabaseServerForNetezza
  3. Navigate to the /nz/extensions/SASTKInDatabaseServerForNetezza directory and verify that the directory is empty.
    Note: Under the SAS directory, the installer for the SAS Formats Library and binary files and the SAS Embedded Process installer both create a directory under the SAS directory. These directories are named SASFormatsLibraryForNetezza and SASTKInDatabaseServerForNetezza, respectively. If you delete everything under the SAS directory, the SAS Embedded Process, the SAS Formats Library, and the binary files are removed. If you want to remove only one, then you must leave the other directory.

Installing the SAS Formats Library, Binary Files, and the SAS Embedded Process

Moving and Installing the SAS Formats Library and Binary Files

The SAS formats library and the binary files for the SAS_COMPILEUDF function are contained in a self-extracting archive file. The self-extracting archive file is located in the SAS-iinstallation-directory/SASFormatsLibraryforNetezza/3.1/Netezza32bitTwinFin/ directory.
To move and unpack the self-extracting archive file, follow these steps:
  1. Using a method of your choice, transfer the accelnetzfmt-3.1-n_lax.sh to your Netezza system.
    n is a number that indicates the latest version of the file. If this is the initial installation, nhas a value of 1. Each time you reinstall or upgrade, n is incremented by 1.
  2. After the accelnetzfmt-3.1-n_lax.sh file has been transferred to the Netezza machine, log on as the user who owns the Netezza software (usually the “nz” ID).
  3. Use the following commands at the UNIX prompt to unpack the self-extracting archive file.
    mkdir –p /nz/extensions
    chmod 755 /nz/extensions
    cd /nz/extensions
    chmod 755 path_to_sh_file/accelnetzfmt-3.1-n_lax.sh
    path_to_sh_file/accelnetzfmt-3.1-n_lax.sh
    path_to_sh_file is the location to which you copied the self-extracting archive file in Step 1.
    After the script runs and the files are unpacked, the target directories should look similar to these.
    /nz/extensions/SAS/SASFormatsLibraryForNetezza/3.1-n/bin/InstallAccelNetzFmt.sh
    /nz/extensions/SAS/SASFormatsLibraryForNetezza/3.1-n/lib/SAS_CompileUDF.o_spu10
    /nz/extensions/SAS/SASFormatsLibraryForNetezza/3.1-n/lib/SAS_CompileUDF.o_x86
    /nz/extensions/SAS/SASFormatsLibraryForNetezza/3.1-n/lib/libjazxfbrs_spu10.so
    /nz/extensions/SAS/SASFormatsLibraryForNetezza/3.1-n/lib/libjazxfbrs_x86.so
    There also is a symbolic link such that /nz/extensions/SAS/SASFormatsLibraryForNetezza/3.1 points to the latest version.

Moving and Installing the SAS Embedded Process

The SAS Embedded Process is contained in a self-extracting archive file. The self-extracting archive file is located in the SAS-installation-directory/SASTKInDatabaseServer/9.4/Netezza64bitTwinFin/ directory.
To move and unpack the self-extracting archive file to create a Netezza cartridge file, follow these steps:
  1. Using a method of your choice, transfer the tkindbsrv-9.4_M2-n_lax.sh to any directory on the Netezza host machine.
    n is a number that indicates the latest version of the file.
  2. After the tkindbsrv-9.4_M2-n_lax.sh file has been transferred to the Netezza, log on as the user who owns the Netezza appliance (usually the “nz” ID).
  3. If you have a database named SAS_EP, you should rename it.
    When you unpack the self-extracting archive file, a SAS_EP database that contains SAS Embedded Process function is created. The creation of the SAS_EP database overwrites any existing database that is named SAS_EP.
  4. Unpack the self-extracting archive file and create a Netezza cartridge file.
    1. Change to the directory where you put the tkindbsrv.sh file.
      cd path_to_sh_file
      path_to_sh_file is the location to which you copied the self-extracting archive file in Step 1.
    2. Use the following command at the UNIX prompt to unpack the self-extracting archive file.
      ./tkindbsrv-9.4_M2-n_lax.sh
      After the script runs, the tkindbsrv-9.4_M2-n_lax.sh file goes away, and the SASTKInDatabaseServerForNetezza-9.4.1.n.nzc Netezza cartridge file is created in its place.
  5. Use these nzcm commands to install and register the sas_ep cartridge.
    nzcm -i sas_ep
    nzcm -r sas_ep
    Note: The sas_ep cartridge creates the NZRC database. The NZRC database contains remote controller functions that are required by the SAS Embedded Process. The sas_ep cartridge is available on the Netezza website. For access to the sas_ep cartridge, contact your local Netezza representative.
  6. Use these nzcm commands to install and register the SAS Embedded Process.
    nzcm -i SASTKInDatabaseServerForNetezza-9.4.1.n.nzc
    nzcm -r SASTKInDatabaseServerForNetezza
    Note: The installation of the SAS Embedded Process is dependent on the sas_ep cartridge that is supplied by Netezza.
    For more NZCM commands, see NZCM Commands for the SAS Embedded Process.

NZCM Commands for the SAS Embedded Process

The following table lists and describes the NZCM commands that you can use with the SAS Embedded Process.
Command
Action performed
nzcm -help
Displays help for NZCM commands
nzcm --installed
nzcm - i
Displays the filename (SASTKInDatabaseServerForNetezza) and the version number that is installed
nzcm --registered
nzcm - r
Displays the filename (SASTKInDatabaseServerForNetezza) and the version number that is registered
nzcm --unregister SASTKInDatabaseServerForNetezza
nzcm -u SASTKInDatabaseServerForNetezza
Unregisters the SAS Embedded Process
nzcm --unregister sas_ep
nzcm -u sas_ep
Unregisters the sas_ep cartridge
Note: The sas_ep cartridge is installed only once. It does not need to be unregistered or uninstalled when the SAS Embedded Process is upgraded or reinstalled. The sas_ep cartridge needs to be unregistered and uninstalled only when Netezza changes the cartridge version.
nzcm -uninstall SASTKInDatabaseServerForNetezza
nzcm -e SASTKInDatabaseServerForNetezza
Uninstalls the SAS Embedded Process
nzcm --uninstall sas_ep
nzcm -e sas_ep
Uninstalls the sas_ep cartridge
Note: The sas_ep cartridge is installed only once. It does not need to be unregistered or uninstalled when the SAS Embedded Process is upgraded or reinstalled. The sas_ep cartridge needs to be unregistered and uninstalled only when Netezza changes the cartridge version.
nzcm --install SASTKInDatabaseServerForNetezza-9.4.1.n.nzc
nzcm -i SASTKInDatabaseServerForNetezza-9.4.1.n.nzc
Installs the SAS Embedded Process
nzcm --install sas_ep
nzcm -i sas_ep
Installs the sas_ep cartridge
nzcm --register SASTKInDatabaseServerForNetezza
nzcm -r SASTKInDatabaseServerForNetezza
Registers the SAS Embedded Process
nzcm --register sas_ep
nzcm -register sas_ep
Registers the sas_ep cartridge

Running the %INDNZ_PUBLISH_JAZLIB Macro

Overview of Publishing the SAS Formats Library

The SAS formats library is a shared library and must be published and registered as an object in the Netezza database. The library is linked to the scoring and format publishing macros through a DEPENDENCIES statement when the scoring model functions or formats are created.
You must run the %INDNZ_PUBLISH_JAZLIB macro to publish and register the SAS formats library. The %INDNZ_PUBLISH_JAZLIB macro publishes and registers the SAS formats library in the database as the sas_jazlib object.

%INDNZ_PUBLISH_JAZLIB Macro Run Process

To run the %INDNZ_PUBLISH_JAZLIB macro, follow these steps:
  1. Start SAS and submit the following command in the Enhanced Editor or Program Editor:
    %let indconn=SERVER=yourservername USER=youruserid PW=yourpwd DB=database;
    
    For more information, see the INDCONN Macro Variable.
  2. Run the %INDNZ_PUBLISH_JAZLIB macro. For more information, see %INDNZ_PUBLISH_JAZLIB Macro Syntax.

INDCONN Macro Variable

The INDCONN macro variable is used to provide credentials to connect to Netezza. You must specify server, user, password, and database information to access the machine on which you have installed the Netezza data warehouse. You must assign the INDCONN macro variable before the %INDNZ_PUBLISH_JAZLIB macro is invoked.
The value of the INDCONN macro variable for the %INDNZ_PUBLISH_JAZLIB macro has this format:
SERVER=<'>server<'> USER=<'>userid<'> PASSWORD=<'>password<'>
DATABASE=<'>database<'>

SERVER=<'>server<'>

specifies the server name or IP address of the server to which you want to connect. This server accesses the database that contains the tables and views that you want to access. If the server name contains spaces or nonalphanumeric characters, enclose the server name in quotation marks.

USER=<'>userid<'>

specifies the Netezza user name (also called the user ID) that you use to connect to your database. If the user name contains spaces or nonalphanumeric characters, enclose the user name in quotation marks.

PASSWORD=<'>password<'>

specifies the password that is associated with your Netezza user name. If the password contains spaces or nonalphanumeric characters, enclose the password in quotation marks.

Tip Use only PASSWORD=, PASS=, or PW= for the password argument. PWD= is not supported and causes an error.

DATABASE=<'>database<'>

specifies the name of the database on the server that contains the tables and views that you want to access. If the database name contains spaces or nonalphanumeric characters, enclose the database name in quotation marks.

Interaction The database that is specified by the %INDNZ_PUBLISH_JAZLIB macro’s DATABASE= argument takes precedence over the database that you specify in the INDCONN macro variable. If you do not specify a value for DATABASE= in either the INDCONN macro variable or the %INDNZ_PUBLISH_JAZLIB macro, the default value of SASLIB is used. For more information, see %INDNZ_PUBLISH_JAZLIB Macro Syntax.
Tip The object name for the SAS formats library is sas_jazlib.

%INDNZ_PUBLISH_JAZLIB Macro Syntax

%INDNZ_PUBLISH_JAZLIB
(<DATABASE=database>
<, ACTION=CREATE | REPLACE | DROP>
<, OUTDIR=diagnostic-output-directory>
);
Arguments

DATABASE=database

specifies the name of a Netezza database to which the SAS formats library is published as the sas_jazlib object.

Default SASLIB
Interaction The database that is specified by the DATABASE= argument takes precedence over the database that you specify in the INDCONN macro variable.
Tip The object name for the SAS formats library is sas_jazlib.

ACTION=CREATE | REPLACE | DROP

specifies that the macro performs one of the following actions:

CREATE

creates a new SAS formats library.

REPLACE

overwrites the current SAS formats library, if a SAS formats library by the same name is already registered, or creates a new SAS formats library if one is not registered.

DROP

causes the SAS formats library to be dropped from the Netezza database.

Default CREATE
Tip If the SAS formats library was published previously and you specify ACTION=CREATE, you receive warning messages that the library already exists. You are prompted to use REPLACE. If you specify ACTION=DROP and the SAS formats library does not exist, you receive an error message.

OUTDIR=diagnostic-output-directory

specifies a directory that contains diagnostic files.

Tip Files that are produced include an event log that contains detailed information about the success or failure of the publishing process.

Running the %INDNZ_PUBLISH_COMPILEUDF Macro

Overview of the %INDNZ_PUBLISH_COMPILEUDF Macro

The %INDNZ_PUBLISH_COMPILEUDF macro creates three functions:
  • SAS_COMPILEUDF. This function facilitates the scoring and format publishing macros. The SAS_COMPILEUDF function compiles the scoring model and format source files into object files. This compilation uses a Netezza compiler and occurs through the SQL interface.
  • SAS_DIRECTORYUDF and SAS_HEXTOTEXTUDF. These functions are used when the scoring and format publishing macros transfer source files from the client to the host using the Netezza External Tables interface. SAS_DIRECTORYUDF creates and deletes temporary directories on the host. SAS_HEXTOTEXTUDF converts the files from hexadecimal back to text after the files are exported on the host. For more information about the file transfer process, see Function Publishing Process in Netezza.
You have to run the %INDNZ_PUBLISH_COMPILEUDF macro only one time.
The SAS_COMPILEUDF, SAS_DIRECTORYUDF, and SAS_HEXTOTEXTUDF functions must be published before the %INDNZ_PUBLISH_FORMATS or %INDNZ_PUBLISH_MODEL macros are run. Otherwise, these macros fail.
Note: To publish the SAS_COMPILEUDF, SAS_DIRECTORYUDF, and SAS_HEXTOTEXTUDF functions, you must have the appropriate Netezza user permissions to create these functions in either the SASLIB database (default) or in the database that is used in lieu of SASLIB. For more information, see Netezza Permissions.

%INDNZ_PUBLISH_COMPILEUDF Macro Run Process

To run the %INDNZ_PUBLISH_COMPILEUDF macro to publish the SAS_COMPILEUDF, SAS_DIRECTORYUDF, and SAS_HEXTOTEXTUDF functions, follow these steps:
  1. Create either a SASLIB database or a database to be used in lieu of the SASLIB database.
    This database is where the SAS_COMPILEUDF, SAS_DIRECTORYUDF, and SAS_HEXTOTEXTUDF functions are published. You specify this database in the DATABASE argument of the %INDNZ_PUBLISH_COMPILEUDF macro. For more information about how to specify the database that is used in lieu of SASLIB, see %INDNZ_PUBLISH_COMPILEUDF Macro Run Process.
  2. Start SAS and submit the following command in the Enhanced Editor or Program Editor.
    %let indconn = server=yourserver user=youruserid password=yourpwd
       database=database;
    
    For more information, see the INDCONN Macro Variable.
  3. Run the %INDNZ_PUBLISH_COMPILEUDF macro. For more information, see %INDNZ_PUBLISH_COMPILEUDF Macro Syntax.
After the SAS_COMPILEUDF function is published, the model or format publishing macros can be run to publish the scoring model or format functions.

INDCONN Macro Variable

The INDCONN macro variable provides the credentials to make a connection to Netezza. You must specify the server, user, password, and database information to access the machine on which you have installed the Netezza database. You must assign the INDCONN macro variable before the %INDNZ_PUBLISH_COMPILEUDF macro is invoked.
The value of the INDCONN macro variable for the %INDNZ_PUBLISH_COMPILEUDF macro has this format.
SERVER=<'>server<'> USER=<'>userid<'> PASSWORD=<'>password<'>
DATABASE=SASLIB | <'>database<'>

SERVER=<'>server<'>

specifies the server name or IP address of the server to which you want to connect. This server accesses the database that contains the tables and views that you want to access. If the server name contains spaces or nonalphanumeric characters, enclose the server name in quotation marks.

USER=<'>userid<'>

specifies the Netezza user name (also called the user ID) that you use to connect to your database. If the user name contains spaces or nonalphanumeric characters, enclose the user name in quotation marks.

PASSWORD=<'>password<'>

specifies the password that is associated with your Netezza user name. If the password contains spaces or nonalphanumeric characters, enclose the password in quotation marks.

Tip Use only PASSWORD=, PASS=, or PW= for the password argument. PWD= is not supported and causes an error.

DATABASE=SASLIB | <'>database<'>

specifies the name of the database on the server that contains the tables and views that you want to access. If the database name contains spaces or nonalphanumeric characters, enclose the database name in quotation marks.

Default SASLIB
Interactions The database that is specified by the %INDNZ_PUBLISH_COMPILEUDF macro’s DATABASE= argument takes precedence over the database that you specify in the INDCONN macro variable. If you do not specify a value for DATABASE= in either the INDCONN macro variable or the %INDNZ_PUBLISH_COMPILEUDF macro, the default value of SASLIB is used. For more information, see %INDNZ_PUBLISH_COMPILEUDF Macro Syntax.
If the SAS_COMPILEUDF function is published in a database other than SASLIB, then that database name should be used instead of SASLIB for the DBCOMPILE argument in the %INDNZ_PUBLISH_FORMATS and %INDNZ_PUBLISH_MODEL macros. Otherwise, the %INDNZ_PUBLISH_FORMATS and %INDNZ_PUBLISH_MODEL macros fail when calling the SAS_COMPILEUDF function during the publishing process. If a database name is not specified, the default is SASLIB. For documentation on the %INDNZ_PUBLISH_FORMATS and %INDNZ_PUBLISH_MODEL macros, see Documentation for Using In-Database Processing in Netezza.

%INDNZ_PUBLISH_COMPILEUDF Macro Syntax

%INDNZ_PUBLISH_COMPILEUDF
(<DATABASE=database-name>
<, ACTION=CREATE | REPLACE | DROP>
<, OUTDIR=diagnostic-output-directory>
);
Arguments

DATABASE=database-name

specifies the name of a Netezza database to which the SAS_COMPILEUDF is published.

Default SASLIB
Interaction The database that is specified by the DATABASE= argument takes precedence over the database that you specify in the INDCONN macro variable. For more information, see INDCONN Macro Variable.

ACTION=CREATE | REPLACE | DROP

specifies that the macro performs one of the following actions:

CREATE

creates a new SAS_COMPILEUDF function.

REPLACE

overwrites the current SAS_COMPILEUDF function, if a SAS_COMPILEUDF function by the same name is already registered, or creates a new SAS_COMPILEUDF function if one is not registered.

DROP

causes the SAS_COMPILEUDF function to be dropped from the Netezza database.

Default CREATE
Tip If the SAS_COMPILEUDF function was published previously and you specify ACTION=CREATE, you receive warning messages that the function already exists and be prompted to use REPLACE. If you specify ACTION=DROP and the SAS_COMPILEUDF function does not exist, you receive an error message.

OUTDIR=diagnostic-output-directory

specifies a directory that contains diagnostic files.

Tip Files that are produced include an event log that contains detailed information about the success or failure of the publishing process.