As the first step in the decommissioning of sasCommunity.org the site has been converted to read-only mode.


Here are some tips for How to share your SAS knowledge with your professional network.


SASTRACE system option

From sasCommunity
Jump to: navigation, search
This is a work in progress. You can contribute to this article.


The SASTRACE system option enables reporting of information about database engine activity in the SAS log or elsewhere. This option allows one to see how SAS is accessing another database, including the number of connections, processing threads, submitted SQL and processing times. The information provided by this option can be used to optimise SAS performance.

Syntax

Usually SASTRACE is off by default, unless it was previously turned on as part of the initial startup configuration or in a previous OPTIONS statement. To turn off SASTRACE use an OPTIONS statement like this:

OPTIONS < other options > SASTRACE = OFF < other options > ;

or to enable SASTRACE use an OPTIONS statement similar to:

OPTIONS < other options > SASTRACE = trace_string < other options > ;
Where the trace_string is a comma separated list enclosed in quotes such as:
'd,' - which shows all DBMS calls.
',,d,' - which shows a DBMS log.
',,t,' - which shows threadded read processing information.
',,,d' - which shows the submitted SQL information.
',,,db' - which shows brief information about the submitted SQL.
',,,s' - which shows summary processing time statistics
',,,sa' - which shows all processing time statistics
',,t,dbs' - which shows how a combination of the above strings can be used to show threadded read, brief SQL and a processing time summary.

Usage

The SASTRACE system option should be used in conjunction with the SASTRACELOC, NOSTSUFFIX and DBIDIRECTEXEC system options.

Further reading

  • SAS/ACCESS for Relational Databases: SASTRACE= System Option : Version 9.2, 9.3, 9.4
  • SAS/ACCESS for Relational Databases: Generating Trace Information for Threaded Reads : Version 9.2, 9.3, 9.4