Oracle Installation and Configuration

Installing and Configuring Oracle

To install and configure Oracle, follow these steps:
  1. If you are upgrading from or reinstalling a previous release, follow the instructions in Upgrading from or Reinstalling a Previous Version before installing the in-database deployment package.
  2. Install the in-database deployment package.
  3. Create the required users and objects in the Oracle server.
  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 Configuring SAS Model Manager.
Note: If you are installing the SAS High-Performance Analytics environment, there are additional steps to be performed after you install the SAS Embedded Process. For more information, see SAS High-Performance Analytics Infrastructure: Installation and Configuration Guide.

Upgrading from or Reinstalling a Previous Version

You can upgrade from or reinstall a previous version of the SAS Embedded Process. Before installing the In-Database Deployment Package for Oracle, have the database administrator (DBA) notify the user community that there will be an upgrade of the SAS Embedded Process. The DBA should then alter the availability of the database by restricting access, or by bringing the database down. Then, follow the steps outlined in Installing the In-Database Deployment Package for Oracle.

Installing the In-Database Deployment Package for Oracle

Overview

The in-database deployment package for Oracle is contained in a self-extracting archive file named tkindbsrv-9.43-n_lax.sh. 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.
The self-extracting archive file is located in the SAS-installation-directory/SASTKInDatabaseServer/9.4/OracleDatabaseonLinuxx64/ directory.

Move the SAS Embedded Process Package to the Oracle Server

To move and copy the Oracle in-database deployment package, follow these steps:
  1. Using a method of your choice (for example, PSFTP, SFTP, SCP, or FTP), move the tkindbsrv-9.43-n_lax.sh file to directory of your choice. It is suggested that you create a SAS directory under your home directory. An example is /u01/pochome/SAS.
  2. Copy the tkindbsrv-9.43-n_lax.sh file onto each of the RAC nodes using a method of your choice (for example, DCLI, SFTP, SCP, or FTP).
    Note: This might not be necessary. For RAC environments with a shared Oracle Home, you can also use one of these methods:
    • Copy the extracted directories from a single node.
    • Copy the self-extracting archive file to a directory common to all the nodes.
    • If the file system is not a database file system (DBFS), extract the file in one location for the whole appliance.

Unpack the SAS Embedded Process Files

For each node, log on as the owner user for the Oracle software using a secured shell, such as SSH. Follow these steps:
  1. Change to the directory where the tkindbsrv-9.43-n_lax.sh file is located.
  2. If necessary, change permissions on the file to enable you to execute the script and write to the directory.
    chmod +x tkindbsrv-9.43-n_lax.sh
  3. Use this command to unpack the self-extracting archive file.
    ./tkindbsrv-9.43-n_lax.sh
    After this script is run and the files are unpacked, a SAS tree is built in the current directory. The content of the target directories should be similar to the following, depending on the path to your self-extracting archive file. Part of the directory path is shaded to emphasize the different target directories that are used.
    /path_to_sh_file/SAS/SASTKInDatabaseServerForOracle/9.43/bin
    /path_to_sh_file/SAS/SASTKInDatabaseServerForOracle/9.43/misc
    /path_to_sh_file/SAS/SASTKInDatabaseServerForOracle/9.43/sasexe
    /path_to_sh_file/SAS/SASTKInDatabaseServerForOracle/9.43/utilities
    /path_to_sh_file/SAS/SASTKInDatabaseServerForOracle/9.43/admin
    /path_to_sh_file/SAS/SASTKInDatabaseServerForOracle/9.43/logs
  4. On non-shared Oracle home systems, update the contents of the $ORACLE_HOME/hs/admin/extproc.ora file on each node. On shared Oracle home systems, you can update the file in one location that is accessible by all nodes.
    1. Make a backup of the current extproc.ora file.
    2. Add the following settings to the file making sure to override any previous settings.
      SET EXTPROC_DLLS=ANY
      SET EPPATH=/path_to_sh_file/SAS/SASTKInDatabaseServerForOracle/9.43/
      SET TKPATH=/path_to_sh_file/SAS/SASTKInDatabaseServerForOracle/9.43/sasexe
    Note: Ask your DBA if the ORACLE_HOME environment variable is not set.
  5. On non-shared Oracle home systems, update the contents of the $ORACLE_HOME/network/admin/sqlnet.ora file on each node. On shared Oracle home systems, you can update the file in one location that is accessible by all nodes.
    1. Make a backup of the current sqlnet.ora file. If the file does not exist, create one.
    2. Add the following setting to the file.
      DIAG_ADR_ENABLED=OFF

Creating Users and Objects for the SAS Embedded Process

After the In-Database Deployment Package for Oracle is installed, the DBA must create the users and grant user privileges. The DBA needs to perform these tasks before the SAS administrator can create the objects for the Oracle server. The users and objects are required for the SAS Embedded Process to work.
Note: SQLPLUS or an equivalent SQL tool can be used to submit the SQL statements in this topic.
  1. Create a SASADMIN user.
    To create the user accounts for Oracle, the DBA must perform the following steps:
    1. Change the directory to /path_to_sh_file/SAS/SASTKInDatabaseServerForOracle/9.43/admin.
    2. Connect as SYS, using the following command:
      sqlplus sys/<password> as sysdba
    3. Create and grant user privileges for the SASADMIN user.
      Here is an example of how to create a SASADMIN user.
      CREATE USER SASADMIN IDENTIFIED BY <password> 
         DEFAULT TABLESPACE <tablespace-name> 
         TEMPORARY TABLESPACE <tablespace-name>;
         GRANT UNLIMITED TABLESPACE TO SASADMIN;
    4. Submit the following SQL script to grant the required privileges to the SASADMIN user.
      SQL>@sasadmin_grant_privs.sql
    5. Log off from the SQLPLUS session using “Quit” or close your SQL tool.
  2. Create the necessary database objects.
    To create the objects and the SASEPFUNC table function that are needed to run the scoring model, the SAS administrator (SASADMIN) must perform the following steps:
    1. Change the current directory to /path_to_sh_file/SAS/SASTKInDatabaseServerForOracle/9.43/admin (if you are not already there).
    2. Connect as SASADMIN, using the following command:
      sqlplus sasadmin/<password>
    3. Submit the following SQL statement:
      @create_sasepfunc.sql;
      
      Note: You can ignore the following errors:
      ORA-00942: table or view does not exist
      ORA-01432: public synonym to be dropped does not exist