In-Database Deployment Package for Teradata

Prerequisites

SAS Foundation and the SAS/ACCESS Interface to Teradata must be installed before you install and configure the in-database deployment package for Teradata.

Overview of the In-Database Deployment Package for Teradata

This section describes how to install and configure the in-database deployment package for Teradata (SAS Formats Library for Teradata 2.1).
The in-database deployment package for Teradata must be installed and configured before you can perform the following tasks:
  • use the %INDTD_PUBLISH_FORMATS format publishing macro to create or publish the SAS_PUT() function and to create or publish user-defined formats as format functions inside the database.
  • use the %INDTD_PUBLISH_MODEL scoring publishing macro to create or publish scoring model functions inside the database.
The format and scoring publishing macros are included in SAS/ACCESS Interface to Teradata. For more information about using the format and scoring publishing macros, see the SAS In-Database Products: User's Guide.
The in-database deployment package for Teradata contains the SAS formats library.
The SAS formats library is a run-time library that is installed on your Teradata system so that the SAS scoring model functions or the SAS_PUT() function created in Teradata can access the routines within its run-time library.
Note: If you are performing a system expansion where additional nodes are being added, the version of the SAS formats library on the new database nodes must be the same as the version that is being used on already existing nodes.

Teradata Installation and Configuration Steps

  1. If you are installing the in-database deployment package for Teradata during a maintenance update, run the SAS Deployment Wizard twice as you upgrade to this latest version.
    The first time you run the SAS Deployment Wizard, you apply any maintenance for your software. You must run it a second time to install the update to the in-database deployment package.
  2. If you are upgrading from a previous version, follow the instructions in Upgrading from Previous Versions.
  3. Install the in-database deployment package.
  4. If you plan to use SAS Model Manager with the SAS Scoring Accelerator for in-database scoring, perform the additional configuration tasks provided in Configurations for SAS Model Manager.

Upgrading from Previous Versions

To upgrade the SAS formats library from a previous version:
  1. Shut down the Teradata database.
    tpareset -y -x shutdown_comment
    This step is required because an older version of the SAS formats library might be loaded in a currently running SAS query.
  2. Confirm that the database is shut down.
    pdestate -a
    DOWN/HARDSTOP is displayed if the database is shut down.
  3. Check the current installed version of the SAS formats library.
    1. If a SAS 9.2 version of the formats library is currently installed, run this command:
      psh "rpm -	q -a" | grep jazxfbrs
      If a previous version is installed, a result similar to this is displayed.
      jazxfbrs-9.2-1.6
    2. If a SAS 9.3 version of the formats library is currently installed, run this command:
      psh "rpm -	q -a" | grep acc
      If a previous version is installed, a result similar to this is displayed.
      accelterafmt-2.1-1
    If the library is not installed on the Teradata nodes, no output is displayed.
  4. If a version of the SAS formats library with the same name (for example, jazxfbrs or accelterfmt), was previously installed, then remove the old version before you install the updated version of the in-database deployment package.
    Remove the old version.
    • To remove the SAS formats library from all nodes concurrently, run this command:
      psh "rpm -e package-name"
      For example, to remove jazxfbrs, run the command psh "rpm —e jazxfbrs".
    • To remove the SAS formats library from each node, run this command on each node:
      rpm -e package-name
      package-name is either jazxfbrs.9.version or accelterafmt-2.version.
  5. (Optional) To confirm removal of the old SAS formats library before installing the new formats library, run this command on all nodes:
    psh "rpm -q package-name"
  6. Restart the database.

Moving and Installing the SAS Formats Library

Moving the SAS Formats Library Package to the Server Machine

  1. Locate the in-database deployment package file, accelterfmt-2.1-1.x86_64.rpm.
    The RPM file is located in the SAS-install-directory/SASFormatsLibraryforTeradata/2.1/TeradataonLinux/ directory.
  2. Put the package file on your Teradata database server in a location where it is both read and write accessible.
    The package must be readable by the Teradata Parallel Upgrade Tool. You need to move this package file to the server machine in accordance with procedures used at your site.

Installing the SAS Formats Library with the Teradata Parallel Upgrade Tool

This installation should be performed by a Teradata systems administrator. The steps assume some knowledge of the Teradata Parallel Upgrade Tool (TDPut) and your environment. For more information about using the Teradata Parallel Upgrade Tool, see the Parallel Upgrade Tool (PUT) Reference Release 3.05.01B035–5713–011K January 2011, located at http://www.info.teradata.com/edownload.cfm?itemid=110550001. Search on this page for “Parallel Upgrade Tool” and download the appropriate document for your system.
The following steps explain the basic steps to install the SAS formats library package by using the Teradata Parallel Upgrade Tool.
Note: TDPut prompts are subject to change as Teradata enhances its software.
  1. Move the SAS Formats Library package to your server machine where it can be accessed from at least one of the Teradata nodes.For more information, see Moving the SAS Formats Library Package to the Server Machine.
  2. Be sure to select all Teradata TPA nodes for installation, including Hot Stand-By nodes.
  3. If Teradata Version Migration and Fallback (VM&F) is installed, you might be prompted whether to use VM&F or not. If you are prompted, choose a Non-VM&F installation.
  4. Verify that the install is successful. Run this command from the shell command prompt.
    psh "rpm -q accelterafmt"
    If the install is successful, accelterfmt-2.1-1 is displayed.
  5. Restart the server so that all database processes can load the new version of the library.
    /etx/init.d/tpa start
  6. Verify that the correct version of the SAS formats library is installed and active on all nodes.
    psh "rpm -q -a" | grep accelterafmt
    You should see a line with accelterafmt-2.1-1 displayed for each Teradata node.

Teradata Permissions

Because functions are associated with a database, the functions inherit the access rights of that database. It might be useful to create a separate shared database for the SAS scoring functions or the SAS_PUT() function so that access rights can be customized as needed.
In addition, you must grant the following permissions to any user who runs the scoring or format publishing macros:
CREATE FUNCTION
DROP FUNCTION
EXECUTE FUNCTION
ALTER FUNCTION
Note: If you plan to use SAS Model Manager with the SAS Scoring Accelerator for in-database scoring, additional permissions are required. For more information, see Configurations for SAS Model Manager.

Documentation for Publishing SAS Scoring Models and Formats in Teradata

For information about how to publish SAS formats, the SAS_PUT() function, and scoring models, see the SAS In-Database Products: User's Guide located at http://support.sas.com/documentation/onlinedoc/indbtech/index.html.