Libname Engine (from Fraktal SAS Programming): Unterschied zwischen den Versionen

Aus phenixxenia.org
Zur Navigation springen Zur Suche springen
K
K
Zeile 13: Zeile 13:
 
  libname ORA oracle user="&USER." password="&ORAPW." path="&ORADB." schema="ops$&SYSUSERID." dbindex=yes ORACLE_73_OR_ABOVE=YES dbserver_max_bytes=1 dbmax_text=32000;
 
  libname ORA oracle user="&USER." password="&ORAPW." path="&ORADB." schema="ops$&SYSUSERID." dbindex=yes ORACLE_73_OR_ABOVE=YES dbserver_max_bytes=1 dbmax_text=32000;
  
Once this statement was issued, you will have access to '''your database schema''' on the called database server by using the '''libref ''"ORA"'''''.
+
Apart from the '''connection options ''"user"'', ''"password"'' and ''"path"''''' there's a large number of other options to almost perfectly integrate DBMS data into your SAS environment, only few of which shall be mentioned here, e.g.:
 +
* dbindex = yes (makes SAS using indexes on the DBMS level, thus increasing server workload to decrease response times)
 +
* dbserver_max_bytes = 1 (specifies the '''number of bytes''', the server uses to code one '''character''')
 +
* dbmax_text = 32000 (overrides the default value of 1024 and applies for CLOB, BLOB, LONG, and LONG RAW data types with 32767 (32k) at maximum)
 +
 
 +
Finally there are DBMS specific options as used for the Oracle DBMS in this example:
 +
* ORACLE_73_OR_ABOVE = YES (use the ''"SERIALIZABLE isolation level"'' for update locking, available with Oracle 7.3 and above)
 +
 
 +
Once this statement is issued, you will have access to '''your database schema''' on the called database server by using the '''libref ''"ORA"'''''.
  
 
{{SeitenNavigation1
 
{{SeitenNavigation1

Version vom 30. Juni 2014, 19:49 Uhr

Zurück

Übersicht

Vorwärts

It's awesome easy, to connect to your DBMS data using the SAS libref statement with a suitable qualifier "oracle". Since Oracle data are not kept on some file system path but are managed by a running server process on some hardware on the network, the "path" parameter supplies the name of the process on the network you are having access to. Credentials are passed to the database server process using "user" and "password" parameters accordingly:

libname ORA oracle user="&USER." password="&ORAPW." path="&ORADB." schema="ops$&SYSUSERID." dbindex=yes ORACLE_73_OR_ABOVE=YES dbserver_max_bytes=1 dbmax_text=32000;

Apart from the connection options "user", "password" and "path" there's a large number of other options to almost perfectly integrate DBMS data into your SAS environment, only few of which shall be mentioned here, e.g.:

  • dbindex = yes (makes SAS using indexes on the DBMS level, thus increasing server workload to decrease response times)
  • dbserver_max_bytes = 1 (specifies the number of bytes, the server uses to code one character)
  • dbmax_text = 32000 (overrides the default value of 1024 and applies for CLOB, BLOB, LONG, and LONG RAW data types with 32767 (32k) at maximum)

Finally there are DBMS specific options as used for the Oracle DBMS in this example:

  • ORACLE_73_OR_ABOVE = YES (use the "SERIALIZABLE isolation level" for update locking, available with Oracle 7.3 and above)

Once this statement is issued, you will have access to your database schema on the called database server by using the libref "ORA".

Zurück

Übersicht

Vorwärts