Prepare a Database for Use with SAS Model Manager

To use the SAS Model Manager Publish Scoring Function, the Database Administrator (DBA) needs to prepare the database. In this exercise, the DBA sets up the publishing and scoring aspects of SAS Model Manager.
The SQL scripts that are required for this tutorial are on your local computer after you extract them from the ZIP file SMM31Tutorial.zip. If you have not extracted the tutorial files, see Install and Register the Tutorial Files.
Note: Contact your system administrator if you do not have the appropriate permissions to the installation and configuration directories on the SAS Model Manager server.
To enable the publishing of scoring functions to a database from SAS Model Manager, follow these steps:
  1. Create a database. You need to provide the server name, user ID, and password to users, so they can publish a scoring function from SAS Model Manager.
  2. Set the user access permissions for the database that you created in the previous step. For example, grant all Normal, Create, and Drop permissions that are available in the Grant/Revoke Objects dialog box using the Teradata Administrator 12.0 or 13.0 tool. Here is an example of the permissions that are set for a Teradata database:
    Teradata Administrator Grant/Revoke dialog box
    Note: For more information about configuring a database, see Preparing a Database for Use with SAS Model Manager in SAS In-Database Products: Administrator's Guide.
  3. Run the create tables script for the appropriate database to create the SAS Model Manager metadata tables in the database. For example, use the createTablesTD.sql script to create the metadata tables for a Teradata database. The SQL file is located in the Utilities subdirectory of the SAS Model Manager In-Database Scoring Scripts installation directory on the middle-tier server. Here is the default installation directory for a Microsoft Windows server:
    C:\Program Files\SASHome\SASModelManagerInDatabaseScoringScripts\3.1
  4. (Optional) Run the hmeq.sql script to create the hmeqid table in the database that can be used with a scoring application. The SQL file is located in the<drive>\Tutorial5 folder. To run the hmeq.sql file, follow these steps:
    1. Start a BTEQ session.
    2. Issue a login statement. For example:
      .login myserver.com/mmtest,mmtest1
    3. Set the scoring database as the active database in the BTEQ session. For example:
      database mmtest;
    4. Issue the command to run the SQL script. For example:
      .run file=“<drive>\Tutorial5\hmeq.sql”
  5. Install the SAS 9.3 Formats Library for the database. This library contains many of the formats that are available in Base SAS.
    For information about how to install and configure the SAS 9.3 Formats Library, see the chapter on post-installation configuration for the SAS Accelerator Publishing Agent software in the Configuration Guide for SAS 9.3 Foundation for your operating environment.
  6. Download the JDBC Driver. For example, download the jar files (terajdbc4.jar and tdgssconfig.jar) for Teradata 12.0 or Teradata 13.0 from the Teradata Web site (http://downloads.teradata.com/download) and place the jar files on the Web application server in the \JBoss_Home\server\SASServer1\lib\ directory.
    Note: For information about where to place the jar files or other Web application servers, see Preparing a Database for Use with SAS Model Manager in SAS In-Database Products: Administrator's Guide.
  7. Send a request to your system administrator to restart the Web application server to finish the installation of the JDBC jar files.
Note: For more information about preparing a database for use with SAS Model Manager, see the SAS Model Manager: Administrator's Guide.