Skip Headers
Oracle® Clinical Installation Guide
Release 5.0.1

E36499-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

9 Setting Up SAS

This chapter includes the following topics:

Oracle Clinical 5.0 supports the following configurations with SAS:

The SAS/ACCESS Interface to Oracle requires Oracle SQL*NET on the computer with the SAS software installation. For this statistics application to function with Oracle Clinical Data Extract, you must install these SAS components:

9.1 Setting Up SAS Data Extract

Users need access to the opapps account to run Oracle Clinical SAS Data Extract jobs.

9.1.1 Give Users Access to the opapps Account

The same setup is required for SAS users in Oracle Clinical as for PSUB users; see Section 8.1.2, "Enable Users to Submit PSUB Jobs".

9.1.2 Add opapps Account to the oclsascr User Group

In addition, you must add the opapps user to the oclsascr user group. It is the only user required to be in this group; see the Oracle Clinical Administrator's Guide for more information.

9.1.3 Give opapps Access to the Directory Specified in the RXC_SAS_VIEW Environment Variable

See the Oracle Clinical Administrator's Guide for more information.

9.1.4 Set Up SAS User Authentication and Set OCL_STATE Reference Codelist Values

Choose one of two methods—Oracle Wallet or SAS password encryption with a proxy user—and indicate your choice in the OCL_STATE local reference codelist along with other SAS-related settings. See the Oracle Clinical Administrator's Guide for more information.

9.2 Installing SAS on a UNIX Computer

This section contains the following topics:

9.2.1 Modifying SAS 9.3 and opa_settings on UNIX

Oracle Clinical supports SAS 9.3. You can validate your Oracle Clinical installation, and then upgrade SAS 9.3 later. The SAS/ACCESS Interface to Oracle requires Oracle SQL*NET on the computer with the SAS software installation.

9.2.1.1 Prepare the SAS Template File

Make the following modifications to the SAS template file:

  1. Copy the SAS template file from OPA_HOME/oc/50/tools to OPA_HOME/bin.

  2. Open the SAS file in a text editor and find this text string:

    <path_to_SAS_executable>

  3. Replace the string with the actual SAS executable path; for example:

    root/SAS93/SASFoundation/9.3/sas $*

  4. Save your work.

9.2.1.2 Setting up a SAS Connection

You can set up a SAS connection to the Oracle database in two ways—using Oracle Wallet or SAS encryption. During installation, the database Installer prompts you for the SAS_CONNECTION value and adds it to the OCL_STATE reference code list. The short value is SAS_CONNECTION and the long value can be either ORACLE_WALLET or SAS_ENCRYPTION.

  • Oracle Wallet: This is the default option.

    • If your SAS server is the same as the database server, and you set ORACLE_WALLET as the long value, the SAS connection is set up automatically.

    • If your SAS server is on a different machine from the database and you want to use ORACLE_WALLET, you must first set up the Oracle Wallet on the SAS server. See the section "Configuring Data to Use Transparent Data Encryption" in Oracle® Database 2 Day + Security Guide 11g Release 2 (11.2) at http://docs.oracle.com/cd/E11882_01/server.112/e10575.pdf for instructions.

  • SAS Encryption: To set up a SAS connection using SAS encryption:

    1. Log in to the database as the system user and create a database account:

      create user sas_proxy_user

      For example, abc123

    2. Grant proxy connection for the database user account:

      alter user <oc user> grant connect through <sas_proxy_user>

    3. Log in to the PSUB server as RXC_SAS_VIEW owner and run the commands:

      opa_setup <dbname> <codenv>

      cd $RXC_SAS_VIEW

    4. Create a SAS file with the following content:

      filename pwfile 'sas_proxy_password_encoded_file';
      proc pwencode in='abc123' out=pwfile method=sas002;
      run;
      
    5. Run the file created in Step 4. This creates the sas_proxy_password_encoded_file which stores the encrypted password of the sas_proxy_user db user.

    6. Remove the file created in Step 4.

    7. Run the SAS files.

      The sas_proxy_user does not have create session privileges and so cannot be directly connected through an SQL*Plus session.

      Other OS users can run SAS jobs from their accounts if they have read access to the path $RXC_SAS_VIEW. In other words, if the OS user belongs to the oclsascr group.

9.2.1.3 Additional Modifications for Oracle Solaris

This section describes Oracle Solaris-specific installation issues.

LD_LIBRARY_PATH

On Oracle Solaris, in previous releases of Oracle Clinical and versions of SAS before 8.2, you had to configure a script in OPA_HOME/bin that intercepted the SAS command to set some additional environment variables. The script then called the actual SAS executable. In Oracle Clinical, the SAS script file includes a step that points to the 32-bit libraries.

SAS/ACCESS Error with Oracle Database 11g Release 2 (11.2.0.4)

Using Oracle Database 11g Release 2 (11.2.0.4) may cause an error with SAS/ACCESS to Oracle. When using SAS/ACCESS to Oracle's SQL Pass Through Facility or Libname engine, you may receive an error similar to this one:

error: ld.so.1 sas: fatal: libclntsh.so.9.0:        open failed: no such file or directory

To work around this problem, create a link from libclntsh.so.11.0 to libclntsh.so.9.0:

ln -s libclntsh.so.11.0 libclntsh.so.9.0

9.2.2 Installing SAS on the Same UNIX Computer as Oracle Clinical

Oracle recommends installing SAS on the same server computer as the Oracle Clinical Database Server installation, following instructions in this section.

9.2.2.1 Set REMOTE_OS_AUTHENT to FALSE

Verify that the REMOTE_OS_AUTHENT initialization parameter is set to FALSE for the Oracle Clinical database instance in the init.ora file:

REMOTE_OS_AUTHENT=FALSE

See Section 4.1.7, "Set Initialization Parameters" for more information.

9.2.3 Installing SAS on a Different UNIX Computer from Oracle Clinical

Oracle recommends installing SAS on the same UNIX server computer as the Oracle Clinical database server installation.

If you choose to install SAS on a UNIX server computer different from that of the Oracle Clinical Database Server installation, it must be on the same intranet and you need to set up a connection to SAS.

Note:

The following procedure uses secure shell (ssh) to establish the connection to SAS.

9.2.3.1 Establish the Connection to SAS

To set up SAS on a different UNIX server computer

  1. Use Network File System (NFS) protocol to make the directory on the Oracle Clinical server pointed to by the $RXC_USER environment variable visible to the SAS server. You must export this directory with write privileges because the SAS scripts generated by Oracle Clinical produce SAS view descriptors that are created in this directory tree.

  2. Create the opapps UNIX user account on the SAS server. Create a group for opapps and put it in the group. You may have to link /etc/group with /etc/logingroup on the SAS server if it is not the primary group for opapps.

  3. Open the init.ora file.

  4. Verify that the REMOTE_OS_AUTHENT initialization parameter is set to FALSE for the Oracle Clinical database instance in the init.ora file:

    REMOTE_OS_AUTHENT=FALSE

    See Section 4.1.7, "Set Initialization Parameters" for more information.

  5. Create a shell script that forces a "SAS" invocation on the Oracle Clinical Database Server to run as a remote shell on the SAS server that invokes the SAS engine, passing it the name of the SAS file:

    1. Create the shell script on the Oracle Clinical Database Server in a publicly visible directory, such as opapps/bin.

    2. Name the script SAS.

    3. Set the protection mode to 755.

    4. Insert code lines into the SAS file.

      If SAS is installed on the same server, insert:

      #!/bin/sh
      SASDIR='pwd'
      ssh sas_server /bin/sh -c ". .profile; cd $SASDIR; /usr/bin/sas $*"
      

      where:

      • sas_server is the name of the computer with the SAS installation

      • /usr/bin/sas is the absolute pathname for the SAS engine

      If SAS is installed on a different server in the intranet, insert:

      #!/bin/sh
      RXC_LOG1=/export/home/opapps/log/
      SASDIR=`dirname $3`
      FILENAME=`basename $2`
      LOGNAME=$RXC_LOG1$FILENAME
      ssh opapps@hsdevsp0030 /bin/sh -c ". .profile;setenv TNS_ADMIN $HOME ;setenv ORACLE_HOME /u01/app/oracle/product/11.2.0.4.0;cd $SASDIR ; /home/opapps/bin/sas -log $LOGNAME $3 $4 $5 $6 "
      

9.2.3.2 Configuring Private and Public Keys for Using SSH with SAS

If you are installing SAS on different server on an intranet , do the following to establish an ssh connection from PSUB server to SAS server.

Oracle Clinical DB Server Perform the following tasks on the Oracle Clinical UNIX Database Server computer:

  1. Log in to the Oracle Clinical UNIX Database Server computer as the opapps user.

  2. Use ssh-keygen to create a password-less set of identity keys:

    ssh-keygen -t rsa -N ''

    The system prompts for the file into which you want to save the set of identity keys.

  3. Press Return to accept the default location. This process creates two files in the user's home directory:

    • ~/.ssh/id_rsa This file contains the private key that represents your identity on that particular machine. Note that the private key is neither world nor group readable. You should never transfer the private key from the machine or change its modes.

    • ~/.ssh/id_rsa.pub This file contains the public key, which is world readable. The ssh program and other programs can use the public key to encrypt messages that only you can decrypt using the private key. The -N ' ' argument to the ssh-keygen command specifies that no passwords are associated with the public keys.

  4. Transport the file id_rsa.pub to a location on the SAS Server (for example, /tmp) using a secure method as defined by the policies of your organization.

SAS Server Perform the following tasks on the SAS Server computer:

  1. Log in to the SAS Server computer as opapps.

  2. In the home directory Create the .ssh directory if it does not exist, and set the permission to 700:

    mkdir .ssh 
    chmod 700 .ssh 
    cd ~/.ssh
    
  3. Append the contents of the id_rsa.pub file in the /tmp directory to the authorized_keys file in the GUEST1_HOME/.ssh directory. For example:

    cat /tmp/id_rsa.pub >> authorized_keys

  4. Change the permission of the authorized_keys file to 600:

    chmod 600 authorized_keys

9.3 Installing SAS on a Windows Computer

This section contains the following topics:

9.3.1 Modifying SAS 9.3 for Windows

To use SAS 9.3 with Oracle Clinical on a Windows platform:

  1. Navigate to the following directory:

    OPA_HOME\bin

  2. Open the opa_settings.bat file.

  3. Verify that the value of the SASORA environment variable is commented in opa_settings.bat (is preceded by REM).

    REM set SASORA=V9

9.3.2 Installing SAS on the Same Windows Server Computer

Oracle recommends installing SAS on the same Windows server computer as the Oracle Clinical database server installation.

If you choose to install SAS on a Windows server computer different from that of the Oracle Clinical database server installation, you must execute SAS jobs manually. However that configuration is also possible; see Section 9.3.3, "Installing SAS on a Different Windows Server Computer".

9.3.2.1 Set REMOTE_OS_AUTHENT to FALSE

Verify that the REMOTE_OS_AUTHENT initialization parameter is set to FALSE for the Oracle Clinical database instance in the init.ora file; see Section 4.1.7, "Set Initialization Parameters" for further information.

9.3.2.2 Set System Path

Ensure that the system path is updated with respect to SAS:

  1. Log in to the Oracle Clinical Database Server as an administrator.

  2. If the PSUB service is running, stop it.

  3. In the command prompt, enter: path

    The system lists the set of directories in which the system will search for an executable file (in this case, the SAS executable). Among others, the following path must be present (in this example, SAS 9.3 is installed in C:\Program Files):

    C:\Program Files\SAS93\SharedFiles\Formats(32);C:\Program Files\SAS93\SASFoundation\9.3;

    If not present:

    1. Navigate to the Control Panel, then System and Security, then System.

    2. Select the Advanced tab, then Environment Variables.

    3. In the System Variable sections select PATH and click the Edit button.

    4. In the Variable Value box, append the correct value for your location, for example:

      ;C:\Program Files\SAS93\SharedFiles\Formats(32);C:\Program Files\SAS93\SASFoundation\9.3;

      to the existing value and click OK.

    5. Click OK in the Environment Variables dialog box.

    6. Click OK in the System Properties dialog box.

  4. If PSUB should be running, start it.

  5. Log out of the computer.

9.3.2.3 Edit the SAS Config File and Grant Permissions

To be able to run SAS on the SAS server of a Windows computer, the user must have full control directory permissions to the following folders located in the SAS software folder:

  • SASWORK

  • SASUSER

To accomplish this:

  1. Log in to the Oracle Clinical Database Server as an a dministrator.

  2. Using Windows Explorer, navigate to the following location (in this example SAS 9.3 is installed in C:\Program Files):

    C:\Program Files\SAS93\SASFoundation\9.3\nls\en

  3. Open SASV9.cfg file in a text editor.

  4. Comment the existing lines about -SASUSER and -WORK and add new ones, substituting any directory you choose for D:\sasuser and D:\sastemp, so that the section looks like this:

    /* Setup the default SAS System user profile folder    */ 
    /*-SASUSER "?CSIDL_PERSONAL\My SAS Files\9.2"*/ 
    -SASUSER "D:\sasuser" 
    
    /* Setup the default SAS System user work folder       */ 
    /*-WORK "!TEMP\SAS Temporary Files"*/ 
    -WORK "D:\sastemp" 
    
  5. Save the file.

  6. Create directories D:\sasuser and D:\sastemp or your preferred equivalents. (In Windows Explorer, right-click and then select New, then Folder.)

  7. Give full control directory permissions on these directories to the oclsascr group.

9.3.3 Installing SAS on a Different Windows Server Computer

You can also install SAS on a computer other than the Oracle Clinical database. However, if you do you must execute SAS jobs manually after their generation from Oracle Clinical. See the Data Extract chapter in the Oracle Clinical Conducting a Study manual for more information.

9.3.3.1 Set REMOTE_OS_AUTHENT to TRUE

Verify that the REMOTE_OS_AUTHENT initialization parameter is set to TRUE for the Oracle Clinical database instance in the init.ora file; see Section 4.1.7, "Set Initialization Parameters" for further information.

9.3.3.2 Enable Executing Data Extract PSUB Jobs

To enable executing data extract PSUB jobs:

  1. Create a local account on the computer with the PSUB service. Note the password you create for this account. You must specify the same password when you create the SAS account in the next step.

  2. Create the oclsascr local group on the computer with the SAS application.

  3. Enroll the user in the oclsascr group.

  4. Set up RXC_SAS_VIEW:

    1. Using Universal Naming Conventions, define the RXC_SAS_VIEW environment variable in the opa_settings.bat file. For example:

      \\server_name\sas_view\database_name

    2. Create a folder on the computer with the SAS application you defined in the RXC_SAS_VIEW environment variable.

    3. Give full control share permissions to oclsascr on the folder you defined in the RXC_SAS_VIEW environment variable.

    4. Give full control directory permissions to oclsascr on the folder you defined in the RXC_SAS_VIEW environment variable.

9.3.3.3 Edit the SAS Config File and Grant Permissions

To be able to run SAS on the SAS server of a Windows computer, the user must have full control directory permissions to the following folders located in the SAS software folder:

  • SASWORK

  • SASUSER

To accomplish this:

  1. Log in to the Oracle Clinical Database Server as Administrator.

  2. Using Windows Explorer, navigate to the following location (in this example SAS 9.3 is installed in C:\Program Files):

    C:\Program Files\SAS93\SASFoundation\9.3\nls\en

  3. Open SASV9.cfg file in a text editor.

  4. Comment the existing lines about -SASUSER and -WORK and add new ones, substituting any directory you choose for D:\sasuser and D:\sastemp, so that the section looks like this:

    /* Setup the default SAS System user profile folder    */ 
    /*-SASUSER "?CSIDL_PERSONAL\My SAS Files\9.3"*/ 
    -SASUSER "D:\sasuser" 
    
    /* Setup the default SAS System user work folder       */ 
    /*-WORK "!TEMP\SAS Temporary Files"*/ 
    -WORK "D:\sastemp" 
    
  5. Save the file.

  6. Create directories D:\sasuser and D:\sastemp or your preferred equivalents. (In Windows Explorer, right-click and then select New, then Folder.)

  7. Give full control directory permissions on these directories to the oclsascr group.