Considerations for SAS Stored Process and SAS Pooled Workspace Servers

In the SAS Intelligence Platform, a stored process is a SAS program that is stored on a server and can be executed as requested by users that have ReadMetadata access to the stored process program's metadata. If a library is not pre-assigned, it is the responsibility of the stored process program's author or the SAS administrator to ensure that the library is assigned. Assigning the library can be done with SAS code that is written in the stored process program or that is linked to the stored process with an %INCLUDE statement from an external file.
It is important to understand how SAS Stored Process Servers and SAS Pooled Workspace Servers access data in libraries that are pre-assigned or not pre-assigned, and how they use the metadata engine or a native engine. The following table describes how these interactions affect data access.
SAS Engine Assignment Interactions for SAS Stored Process and SAS Pooled Workspace Servers
Metadata Engine
Native Engine
Library is pre-assigned
  • The library is assigned to use the metadata engine at server initialization by the SAS Spawned Servers account (sassrv).
  • Metadata authorization layer permissions for the SAS Spawned Servers account are checked at server initialization and for each data access request.
  • Metadata authorization layer permissions for the user ID that uses the server are not used.
  • The library is assigned to use the native engine for the library type at server initialization by the SAS Spawned Servers account (sassrv).
  • Metadata authorization layer permissions are checked for the SAS Spawned Servers account. The SAS Spawned Servers account must have ReadMetadata access to the library. (The access is typically inherited through a grant to the SAS General Servers group.) The metadata authorization layer permissions for the user ID that uses the server are not used.
These two items apply to pre-assigned libraries, regardless of the SAS engine that is used for data access. 1
  • If the Base SAS engine is used, then the SAS Spawned Servers account (sassrv) operating system permissions for the path to the physical library are checked at server initialization.
  • If a SAS/ACCESS engine is used, then database credentials must be stored in metadata. The SAS Spawned Servers account must have access to the credentials stored in metadata at server initialization.
Library is not pre-assigned
  • The library is not assigned at server initialization. It is assigned to use the metadata engine by the SAS code that is submitted to the server.
  • The metadata authorization layer and data-level permissions are checked for the user ID that submits the code.
  • The SAS Spawned Servers account metadata authorization layer permissions are not used.
  • The library is not assigned at server initialization. It is assigned to use a native engine by the SAS code that is submitted to the server.
  • Metadata authorization layer permissions are not used. They are never checked for the SAS Spawned Servers account or the user ID that uses the server.
1If you change metadata permissions on a pre-assigned library or its tables, you must restart the SAS Object Spawner. This is needed so that the SAS server initializes again.
Tip
Regardless of the engine used and whether the library is pre-assigned or not pre-assigned, if the library is a Base SAS library, then the SAS Spawned Servers account must have operating system permissions for the path to the physical library. The operating system permissions for the user ID that submitted the code are not used.

Error Messages

ERROR: Libname libref is not assigned.
If the library is not pre-assigned, then check the syntax for your LIBNAME statement. If the library is pre-assigned to use the metadata engine, then make sure that the SAS General Servers user ID has ReadMetadata permission to the library. If the library is pre-assigned to use a native engine, then make sure that the user ID accessing the data has ReadMetadata permission to the library.
ERROR: The Read permission is required to read data in table/view libref.table.DATA.
This message is generated for libraries that use the metadata engine only. If the table belongs to a pre-assigned library, then grant Read permission to the SAS General Servers user ID on the table. If the table does not belong to a pre-assigned library, then grant Read permission to the user ID on the table.
ERROR: File libref.table.DATA does not exist.ERROR: The metadata for the table/view libref.table does not exist.
This message is generated for libraries that use the metadata engine only and means that the table is not registered in metadata. If the library is pre-assigned to use the metadata engine, then disable that setting temporarily while you register the table. If you do not disable the pre-assignment, then be aware that the library is assigned to use the metadata engine with the METAOUT=ALL option. This METAOUT option does not permit registering tables.