Preparing a Database for Use with SAS Model Manager

Prerequisites

SAS Foundation, the SAS/ACCESS Interface, and the in-database deployment package for the database must be installed and configured, before you can prepare a database for use with SAS Model Manager. For more information, see the chapter for your type of database in this guide. Here are the databases that can be used with SAS Model Manager:

Overview of Preparing a Database for Use with SAS Model Manager

The SAS Model Manager In-Database Scoring Scripts product must be installed before the database administrator (DBA) can prepare a database for use with SAS Model Manager. Additional configuration steps are required to prepare the database for publishing and scoring in SAS Model Manager.
During the installation and configuration of SAS 9.3 products, the SAS Model Manager In-Database Scoring Scripts product is installed on the middle-tier server.
The location of the SAS installation directory is specified by the user. Here is the default installation location for the SAS Model Manager In-Database Scoring Scripts product on a Microsoft Windows server: C:\Program Files\SASHome\SASModelManagerInDatabaseScoringScripts
In the script installation directory, includes a directory that specifies the version of SAS Model Manager, which is currently 3.1. The files and subdirectories that are needed to prepare a database for use by SAS Model Manager are located in the version directory. The Utilities subdirectory contains two SQL scripts for each type of database, a Create Tables script and a Drop Tables script. The DBA needs these SQL scripts to create the tables needed by the SAS Model Manager to publish scoring functions.
Note: The database tables store SAS Model Manager metadata about scoring functions.

Configuring a Database

To enable users to publish scoring functions to a database from SAS Model Manager, follow these steps:
  1. Create a separate database where the tables can be stored.
  2. Set the user access permissions for the database.
    1. GRANT CREATE, DROP, EXECUTE, and ALTER permissions for functions and procedures. For more information about permissions for the specific database, see the following topics:
    2. GRANT SELECT, INSERT, UPDATE, and DELETE permissions for SAS Model Manager metadata tables.
    3. GRANT SELECT permission for the following views to validate the scoring function names:
      • syscat.functions for DB2
      • dbc.functions for Teradata
      • _v_function for Netezza
    Note: If scoring input tables, scoring output tables or views exist in another database, then the user needs appropriate permissions to those tables or views.
  3. Navigate to the \sasinstalldir\SASModelManagerInDatabaseScoringScripts\3.1\Utilities directory to find the Create Tables and Drop Tables scripts for your database, and then perform the following steps:
    1. Verify the statements that are specified in the Create Tables script. Here are the names of the scripts for each type of database:
      • Teradata SQL scripts: createTablesTD.sql and dropTablesTD.sql
      • DB2 SQL scripts: createTablesDB2.sql and dropTablesDB2.sql
      • Netezza SQL scripts: createTablesNetezza.sql and dropTablesNetezza.sql
    2. Execute the Create Tables script for a specific type of database.
  4. Download the JDBC driver JAR files and place them in the \lib directory on the Web application server where the SAS Model Manager Web application is deployed. The default directory paths for the Web application servers are the following:
    JBOSS
    \JBoss_Home\server\SASServer1\lib
    An example of the directory path is the following: C:\JBoss4.3.0.GA\server\SASServer1\lib
    WebLogic
    \Weblogic_HOME\server\lib
    An example of the directory path is the following: C:\bea10.3.2\wlserver_10.3\server\lib
    WebSphere
    WebSphere_HOME\lib
    An example of the directory path is the following: C:\Program Files\IBM\WebSphere7\AppServer\lib
    Note: You must have WRITE permission to place the JDBC driver JAR files in the \lib directory. Otherwise, you can have the server administrator download them for you.
    For more information, see Finding the JDBC JAR Files.

Finding the JDBC JAR Files

The Teradata JDBC JAR files are terajdbc4.jar and tdgssconfig.jar. The Teradata JDBC JAR files can be found on the Teradata Web site at http://www.teradata.com. Select Support & Downloadsthen selectDownloadsthen selectTeradata JDBC Driver.
The DB2 JDBC JAR files are db2jcc.jar and db2jcc_license_cu.jar. The DB2 JDBC JAR files can be found on the server on which the database client was installed. For example, the default location for Windows is C:\Program Files\IBM\SQLLIB\java.
The Netezza JDBC JAR file is nzjdbc.jar. The Netezza JDBC JAR file can be found on the server on which the database client was installed. For example, the default location for Windows is C:\JDBC.
For more information about the database versions that are supported, see the SAS Scoring Accelerator System Requirements.