Example libnames.parm Parameter File Configurations

The following examples show the range of domains that you can define in the libnames.parm parameter file. The examples begin with the simplest form and increase in complexity.

Example 1: Minimum Configuration for Domain

This example contains the syntax that is required for the simplest form of a domain configuration. This statement defines the domain SKULIST. All tables that are associated with the SKULIST domain (table data, metadata, index data, and intermediate data) reside in the single directory that is referenced in the path specification c:\data\skulist.
libname=skulist pathname=c:\data\skulist;

Example 2: Specify Domain Paths for Data, Index, and Workspace Tables

This example contains the syntax that is required to define a domain with separate paths allocated for the data tables, index tables, and intermediate data files. The domain metadata continues to be stored in the location specified by the PATHNAME= specification.
libname=skulist pathname=/metadata/skulist
   roptions="
    datapath=('/data01/skulist'
              '/data02/skulist'
              '/data03/skulist'
              '/data04/skulist'
              '/data05/skulist'
              '/data06/skulist')
    indexpath=('/idx01/skulist'
               '/idx02/skulist'
               '/idx03/skulist'
               '/idx04/skulist')
    workpath=('/work01/skulist'
              '/work02/skulist'
              '/work03/skulist'
              '/work04/skulist')";
This example uses the options DATAPATH=, INDEXPATH=, and WORKPATH=. You can achieve optimal performance with this configuration when each domain path resides on a separate disk or on network components that can take advantage of parallelism.
The INDEXPATH= option takes advantage of multiple file systems. Starting in SPD Server 5.1, index components can take advantage of the RANDOMPLACEDPF feature. You can configure smaller disk partitions for index space with the RANDOMPLACEDPF feature, which benefits backup and recovery operations.
The WORKPATH= specified for the SKULIST domain enables users to override a default workpath that is specified in the spdsserv.parm parameter file.

Example 3: Query-Rewrite Domain Configuration

This example shows how to use temporary tables to configure a domain for optimal performance when you are using the SPD Server SQL query rewrite facility.
The SQL query rewrite facility finds the most processor-efficient method to evaluate SQL statements. The SQL query rewrite facility uses numerous temporary tables that are distributed across a parallelized environment to rapidly evaluate and process the SQL statements.
At the end of the SPD Server session, temporary tables are automatically deleted. Some SPD Server users might use the QRW domain for its temporary tablespace, even if they are not submitting code for an SQL query rewrite job.
This example defines a query rewrite domain named QRW that uses distributed temporary tables. To use SPD Server QRW:
  • Define a domain for the query rewrite operations in the libnames.parm parameter file. This example names the query rewrite domain QRW.
  • In the spdsserv.parm parameter file, include the TMPDOMAIN=option that references the QRW domain that is defined in the libnames.parm parameter file.
The following libnames.parm parameter file defines a domain for the query rewrite tables:
libname=qrw pathname=/metadata/qrw
   roptions="
    datapath=('/data01/qrw'
              '/data02/qrw'
              '/data03/qrw'
              '/data04/qrw'
              '/data05/qrw'
              '/data06/qrw'
              '/data07/qrw'
              '/data08/qrw'
              '/data09/qrw')
    indexpath=('/idx01/qrw'
               '/idx02/qrw'
               '/idx03/qrw'
               '/idx04/qrw'
               '/idx05/qrw')";
In the spdsserv.parm parameter file, the TMPDOMAIN=QRW option references the domain for query rewrite tables.
tmpdomain=qrw;

Example 4: Multiple Domain Types and Paths Configuration

This example uses a combination of libnames.parm parameter file settings, spdsserv.parm parameter file settings, and user-issued SAS code that is submitted to SPD Server to define multiple domains that store the following items:
  • permanent production tables
  • permanent to semi-permanent user tables
  • temporary tables for intermediate calculations
In this environment, users can access information from permanent production-type tables, manipulate the information, and save and delete the results in a semi-permanent user space. At the same time, they can use temporary tables with sufficient disk space to perform large or optimized intermediate table calculations. The code specifies data and index paths to take advantage of RAID-configured disk arrays.
This libnames.parm parameter file defines the domain PROD, which contains permanent production and historical data tables.
libname=prod pathname=/metadata/prod
  roptions="
    datapath=('/data01/prod'
              '/data02/prod'
              '/data03/prod'
              '/data04/prod'
              '/data05/prod'
              '/data06/prod'
              '/data07/prod'
              '/data08/prod'
              '/data09/prod')
    indexpath=('/idx01/prod'
               '/idx02/prod'
               '/idx03/prod'
               '/idx04/prod'
               '/idx05/prod')";
Additional libnames.parm parameter file code defines the domain USERTBLS, which contains semi-permanent tables for user projects. SPD Server users can save and delete content in USERTBLS.
libname=usertbls pathname=/metadata/usertbls
   roptions="
    datapath=('/data01/usertbls'
              '/data02/usertbls'
              '/data03/usertbls'
              '/data04/usertbls'
              '/data05/usertbls'
              '/data06/usertbls'
              '/data07/usertbls'
              '/data08/usertbls'
              '/data09/usertbls')
    indexpath=('/idx01/usertbls'
               '/idx02/usertbls'
               '/idx03/usertbls'
               '/idx04/usertbls'
               '/idx05/usertbls')";
Finally, more libnames.parm parameter file code defines the domain named SPDTEMP, which contains temporary tablespace that is automatically deleted at the end of the session.
libname=spdtemp pathname=/metadata/spdtemp
   roptions="
    datapath=('/data01/spdtemp'
              '/data02/spdtemp'
              '/data03/spdtemp'
              '/data04/spdtemp'
              '/data05/spdtemp'
              '/data06/spdtemp')
    indexpath=('/idx01/spdtemp'
               '/idx02/spdtemp'
               '/idx03/spdtemp'
               '/idx04/spdtemp')";
The spdsserv.parm parameter file code uses the TMPDOMAIN=SPDTEMP option to reference the domain that was defined for temporary tables. This code also uses the WORKPATH= option to identify an array of RAID-enabled disk paths for temporary work tables and temporary intermediate files.
SORTSIZE=128M;
INDEX_SORTSIZE=128M;
GRPBYROWCACHE=128M;
BINBUFSIZE=32K;
INDEX_MAXMEMORY=8M;
NOCOREFILE;
SEQIOBUFMIN=64K;
RANIOBUFMIN=4K;
MAXWHTHREADS=8;
WHERECOSTING;
RANDOMPLACEDPF;
MINPARTSIZE=128M;
TMPDOMAIN=SPDTEMP;
WORKPATH="('/work1/spdswork'
           '/work2/spdswork'
           '/work3/spdswork'
           '/work4/spdswork'
           '/work5/spdswork')";

The following SAS code is submitted to SPD Server by the user. The code connects to the PROD, USERTBLS, and SPDTEMP domains, and configures SPDTEMP as a temporary domain space. Tables in the SPDTEMP domain are automatically deleted at the end of the session.
libname prod sasspds "prod"
   server=hostname.hostport
   user="user-id"
   password="password"
   ip=yes;

libname usertbls sasspds "usertbls"
   server=hostname.hostport
   user="user-id"
   password="password"
   ip=yes;

libname spdtemp sasspds "spdtemp"
   server=hostname.hostport
   user="user-id"
   password="password"
   ip=yes
   temp=yes;
Last updated: February 3, 2017