Netezza Installation and Configuration

Netezza Installation and Configuration Steps

  1. If you are upgrading from a previous version, follow the instructions in Upgrading from 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 Configuring SAS Model Manager.

Upgrading from a Previous Version

Overview of Upgrading from a Previous Version

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

Upgrading the SAS Formats Library and Binary Files

To upgrade from a previous version of the SAS Formats Library and binary files, follow these steps.
Note: These steps apply if you want to upgrade only the SAS Formats Library and binary files. If you want to upgrade only the SAS Embedded Process, see Upgrading 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 the SAS Embedded Process, continue the installation instructions in Upgrading the SAS Embedded Process. Otherwise, continue the installation instructions in Installing the SAS Formats Library, Binary Files, and the SAS Embedded Process.

Upgrading the SAS Embedded Process

To upgrade the SAS Embedded Process, follow these steps.
Note: These steps are for upgrading only the SAS Embedded Process. If you want to upgrade the SAS Formats Library and binary files, you must follow the steps in Upgrading 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 YourSASDepot/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 a location on your Netezza server.
    n is a number that indicates the latest version of the file. If this is the initial installation, n has 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 server, log on as the user who owns the Netezza appliance (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 named sepcorenetz-12.00000-1.sh. This file is contained in a ZIP file that is put in your SAS Software Depot directory.
To unzip and unpack the self-extracting archive file and create a Netezza cartridge file, follow these steps:
  1. Create a new temporary directory on your client machine such as /sasep. The new directory is referred to as EPZipDir throughout this section.
  2. Navigate to the YourSASDepot/SAS_Core_Embedded_Process_Package_for_Netezza/12_0/Netezza_TwinFin_64bit_host directory. This directory was created when you created your SAS Software Depot.
  3. Locate the en_sasexe.zip file. The en_sasexe.zip file is located in the YourSASDepot/SAS_Core_Embedded_Process_Package_for_Netezza/12_0/Netezza_TwinFin_64bit_host directory.
    The sepcorenetz-12.00000-1.sh file is included in this ZIP file.
  4. Copy the en_sasexe.zip file to your EPZipDir temporary directory on the client machine.
    cp en_sasexe.zip /EPZipDir
  5. Navigate to your EPZipDir temporary directory and unzip en_sasexe.zip.
    After the file is unzipped, a sasexe directory is created in the same location as the en_sasexe.zip file. The self-extracting archive file is in the /EPZipDir/sasexe directory.
  6. Using a method of your choice, transfer the sepcorenetz-12.00000-1.sh to any directory on the Netezza server. This directory will be referred to as path_to_sh_file
  7. After the sepcorenetz-12.00000-1.sh file has been transferred to the Netezza server, log on as the user who owns the Netezza appliance (usually the “nz” ID).
  8. 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 the SAS Embedded Process cartridge file is created. The creation of the SAS_EP database overwrites any existing database that is named SAS_EP.
  9. Unpack the self-extracting archive file and create a Netezza cartridge file.
    1. Change to the directory where you put the sepcorenetz-12.00000-1.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 6.
    2. Change permissions on the file to enable you to execute the script.
      chmod 755 -r sepcorenetz-12.00000-1.sh
    3. Use the following command at the UNIX prompt to unpack the self-extracting archive file:
      ./sepcorenetz-12.00000-1.sh
      After the script runs, the sepcorenetz-12.00000-1.sh file goes away, and the SASTKInDatabaseServerForNetezza-12.0.0.0.nzc Netezza cartridge file is created in its place.
  10. Use the following 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.
  11. Use the following nzcm commands to install and register the SAS Embedded Process:
    nzcm -i SASTKInDatabaseServerForNetezza-12.0.0.0.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 SSASTKInDatabaseServerForNetezza-12.0.0.0.nzc
nzcm -i SSASTKInDatabaseServerForNetezza-12.0.0.0.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<'> SCHEMA=<'>schema-name<'>

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.

SCHEMA=<'>schema-name<'>

specifies the name of the schema where the SAS formats library is published.

Restriction This argument is supported only on Netezza v7.0.3 or later.
Interaction The schema that is specified by the %INDNZ_PUBLISH_JAZLIB macro’s DBSCHEMA= argument takes precedence over the schema that you specify in the INDCONN macro variable. If you do not specify a schema in the DBSCHEMA= argument or the INDCONN macro variable, the default schema for the target database is used.

%INDNZ_PUBLISH_JAZLIB Macro Syntax

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.

DBSCHEMA=schema-name

specifies the name of a Netezza schema to which the SAS formats library is published.

Restrictions This argument is supported only on Netezza v7.0.3 or later.
This argument is supported only on Netezza v7.0.3 or later.
Interaction The schema that is specified by the DBSCHEMA= argument takes precedence over the schema that you specify in the INDCONN macro variable. If you do not specify a schema in the DBSCHEMA= argument or the INDCONN macro variable, the default schema for the target database is used.

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<'> SCHEMA=<'>schema-name<'>

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.

SCHEMA=<'>schema-name<'>

specifies the name of the schema where the SAS_COMPILEUDF, SAS_DIRECTORYUDF, and SAS_HEXTOTEXTUDF functions are published.

Restriction This argument is supported only on Netezza v7.0.3 or later.
Interaction The schema that is specified by the %INDNZ_PUBLISH_COMPILEUDF macro’s DBSCHEMA= argument takes precedence over the schema that you specify in the INDCONN macro variable. If you do not specify a schema in the DBSCHEMA= argument or the INDCONN macro variable, the default schema for the target database is used.

%INDNZ_PUBLISH_COMPILEUDF Macro Syntax

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.

DBSCHEMA=schema-name

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

Restriction This argument is supported only on Netezza v7.0.3 or later.
Interaction The schema that is specified by the DBSCHEMA= argument takes precedence over the schema that you specify in the INDCONN macro variable. If you do not specify a schema in the DBSCHEMA= argument or the INDCONN macro variable, the default schema for the target database is used.

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.
Last updated: February 9, 2017