Search notes:

SAS and Oracle: libname

Using path

libname ora_lib clear;

libname ora_lib
   oracle
   user     = rene
   password = secretGarden
   path = "(
       description=(
           address =(protocol=tcp)
          (host    = ora12.renenyffenegger.ch)
          (port    = 1521)
       )
       (
           connect_data=(service_name=ora12.renenyffenegger.ch)
        )
     )"
;

proc sql;
  select g.global_name from ora_lib.global_name g;
quit;
Github repository about-SAS, path: /programming/proc/sql/oracle/libname/path.sas

Schema

The schema option allows to set the default schema for a connection.
%let ora_user     = rene;
%let ora_password = secretGarden;
%let ora_server   = ora12.renenyffenegger.ch;

libname tq84_ora
   oracle 
   user                     = &ora_user
   password                 = &ora_password
   schema                   = sys             /* Set 'default' schema */
   path                     = &ora_server
   sql_functions            = all
   db_length_semantics_byte = no;
   
/* Use sastrace option to see what Oracle actually sends to SAS. */
options
  sastrace    =  ',,,d'
  sastraceloc =  saslog;
  
  
proc sql;
  select
    dummy
  from
    tq84_ora.dual;
quit;
/*
ORACLE_15: Prepared: on connection 37
SELECT * FROM sys.DUAL
*/
Github repository about-SAS, path: /programming/proc/sql/oracle/libname/schema.sas

See also

SAS and Oracle

Index