Skip Headers
Oracle® Clinical Installation Guide
Release 4.6.2

E18817-04
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

11 Setting Up SAS

This chapter includes the following topics:

UNIX Performing the steps in Section 11.1 and in either Section 11.2 or Section 11.3 is required before you use SAS for Oracle Clinical Data Extract. The steps are the same for any supported UNIX platform.

Windows Performing the steps in Section 11.4 and either Section 11.5 or Section 11.6 is required before you use SAS for Oracle Clinical Data Extract.

11.1 Modifying SAS 9.2 and opa_settings on UNIX

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

11.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/462/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 SAS executable path.

  4. Save your work.

11.1.2 Edit the opa_settings File

To use SAS 9.2 with Oracle Clinical on a UNIX platform:

  1. Navigate to the following directory:

    OPA_HOME/bin

  2. Open the opa_settings file.

  3. Change the value of the SASORA environment variable from V8 to V9. For example:

    db_env_setting:_DEFAULT_:SASORA:V9

    You can use the scope to apply your change only to certain databases. In the following example, all databases use the V9 SAS/ACCESS engine with the exception of database OC45, which uses the V8 engine.

    db_env_setting:OC45:SASORA:V8

11.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.2) Patch Set 1

Using Oracle Database 11g Release 2 (11.2.0.2) Patch Set 1 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

11.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.

11.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.8, "Set Initialization Parameters" for further information.

11.2.2 Edit the opa_setup Script

Change the following lines:

if [ $local_db = TRUE ] ; then
   RXC_SAS_CONNECT='oracle(path='"'"${ORACLE_SID}"'"')'
   # 20010308 (dkacher) bug 749959: force reference to ORACLE_SID to lowercase
   RXC_SAS_VIEW=$RXC_USER/sas_view/`echo $ORACLE_SID | tr "[:upper:]" "[:lower:]"

to:

if [ $local_db = TRUE ] ; then
  # RXC_SAS_CONNECT='oracle(path='"'"${ORACLE_SID}"'"')'
   RXC_SAS_CONNECT='oracle()'
   # 20010308 (dkacher) bug 749959: force reference to ORACLE_SID to lowercase
   RXC_SAS_VIEW=$RXC_USER/sas_view/`echo $ORACLE_SID | tr "[:upper:]"  "[:lower:]"

The changed portions are in bold text.

11.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, you need to set up a connection to SAS. To set up a connection, you create SAS view descriptors on the Oracle Clinical Database Server in the $RXC_USER directory that the SAS server can access.

11.3.1 Establish the Connection to SAS

Note:

The following procedure uses secure shell (ssh) to 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 UNIX user accounts on the SAS server for all users of SAS within Oracle Clinical. Create identical groups for these users and put the users in the same groups. You may have to link /etc/group with /etc/logingroup on the SAS server if it is not the primary group for these users.

  3. Open the init.ora file.

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

    REMOTE_OS_AUTHENT=TRUE

    See Section 4.1.8, "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 the following code lines into the SAS file:

      :

      #!/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

11.3.2 Configuring Private and Public Keys for Using SSH with SAS

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 database user running SAS Data Extract jobs. The user must have PSUB privileges.

  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.

Perform the following tasks on the SAS Server computer:

  1. Log in to the SAS Server computer as the same database PSUB user that you logged in as on the Oracle Clinical Database Server.

  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

  5. Repeat this procedure for each user who runs SAS Data Extract jobs.

11.4 Modifying SAS 9.2 for Windows

To use SAS 9.2 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

11.5 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 11.6, "Installing SAS on a Different Windows Server Computer".

11.5.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.8, "Set Initialization Parameters" for further information.

11.5.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 process 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.2 is installed in C:\Program Files):

    C:\Program Files\SAS92\SharedFiles\Formats(32);C:\Program Files\SAS92\SASFoundation\9.2;

    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\SAS92\SharedFiles\Formats(32);C:\Program Files\SAS92\SASFoundation\9.2;

      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.

11.5.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.2 is installed in C:\Program Files):

    C:\Program Files\SAS92\SASFoundation\9.2\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.

11.6 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.

11.6.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.8, "Set Initialization Parameters" for further information.

11.6.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.

    (Because you must have a local account on the computer that runs PSUB, you may have already created this account. See the user account requirements in the Oracle Clinical Administrator's Guide.)

  2. Create a local user account on the computer with the SAS application. The password you specify must be the same as the password you specified in Step 1.

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

  4. Enroll the user in the oclsascr group.

  5. 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.

11.6.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.2 is installed in C:\Program Files):

    C:\Program Files\SAS92\SASFoundation\9.2\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.