Chapter Contents

Previous

Next
SASTRACE

SASTRACE



Generates trace information from a DBMS engine

Default: NONE
Valid in: Wherever SAS sytem options are valid: OPTIONS statement, configuration file, SAS invocation.


Syntax
SAS/ACCESS Specific Details
Example

Syntax

SASTRACE= ',,,d'

',,,d'
gives information about SAS/ACCESS engine calls to a relational DBMS.


SAS/ACCESS Specific Details

SASTRACE is a SAS system option that has SAS/ACCESS-specific behavior. SASTRACE is a very powerful tool to use when you want to see the commands sent to your DBMS by the SAS/ACCESS engine. SASTRACE output is DBMS-specific; however, most SAS/ACCESS engines will show you statements like SELECT or COMMIT as the DBMS processes them for the SAS application. It replaces the DBDEBUG option from Version 6; this option name might be different for your DBMS or operating environment.

See Advanced Topics in SAS/ACCESS for more information.

Note:   Output from SASTRACE differ depending on your DBMS.  [cautionend]


Example

The following example generates several messages from the SASTRACE= system option. SAS Log Output from the SASTRACE= and SASTRACELOC= System Options was written to the SAS log, as specified by the SASTRACELOC=SASLOG option.

data work.winter_birthdays;
   input empid birthdat date9. lastname $18.;
   format birthdat date9.;
datalines;
678999 28DEC1966 PAVEO             JULIANA        3451
456788 12JAN1977 SHIPTON           TIFFANY        3468
890123 20FEB1973 THORSTAD          EDVARD         3329
;
run;

libname mydblib oracle user=dmitry password=elvis schema=bday_data;

options sastrace=',,,d' sastraceloc=saslog;
data mydblib.snow_birthdays;
   set work.winter_birthdays;
run;

libname mydblib clear;

SAS Log Output from the SASTRACE= and SASTRACELOC= System Options
50   data work.winter_birthdays;
51      input empid birthdat date9. lastname $18.;
52      format birthdat date9.;
53   datalines;

NOTE: The data set WORK.WINTER_BIRTHDAYS has 3 observations and 3 variables.
NOTE: DATA statement used:
      real time           0.08 seconds
      cpu time            0.03 seconds

...
57   ;
58   run;
59
60   libname mydblib oracle user=dmitry password=XXXXX schema=bday_dat;
NOTE: Libref MYDBLIB was successfully assigned as follows:
      Engine:        ORACLE
      Physical Name:
61
62   options sastrace=',,,d' sastraceloc=saslog;
63   data mydblib.snow_birthdays;
64      set work.winter_birthdays;
65   run;

DEBUG: Open Cursor - CDA=2060054152 49 923702189 orusti 296 DATASTEP
DEBUG: PREPARE SQL statement:  50 923702189 orprep 63 DATASTEP
 SELECT * FROM SNOW_BIRTHDAYS 51 923702189 orprep 64 DATASTEP
DEBUG: Close Cursor - CDA=2060054152 52 923702189 orustt 365 DATASTEP
DEBUG: PHYSICAL connect. 53 923702190 orcon 372 DATASTEP
DEBUG: USER=scott 54 923702190 orcon 373 DATASTEP
DEBUG: Open Cursor - CDA=2057325192 55 923702190 orusti 296 DATASTEP
DEBUG: Open Cursor - CDA=2057332360 56 923702190 orusti 296 DATASTEP
NOTE: SAS variable labels, formats, and lengths are not written to DBMS
      tables.
DEBUG: EXECUTE SQL statement:  57 923702190 orexec 75 DATASTEP
CREATE TABLE SNOW_BIRTHDAYS(empid NUMBER ,birthdat DATE,lastname VARCHAR2
(18)) 58 923702190 orexec 76 DATASTEP
DEBUG: PREPARE SQL statement:  59 923702190 orins 330 DATASTEP
INSERT INTO SNOW_BIRTHDAYS (empid,birthdat,lastname) VALUES
(:empid,TO_DATE(:birthdat,'DDMONYYYY','NLS_DATE_LANGUAGE=American'),:lastnam
e) 60 923702190 orins 331 DATASTEP
NOTE: There were 3 observations read from the dataset WORK.WINTER_BIRTHDAYS.
DEBUG: *-*-*-*-*-*-* COMMIT *-*-*-*-*-*-* 61 923702190 orforc 102 DATASTEP
NOTE: The data set MYDBLIB.SNOW_BIRTHDAYS has 3 observations and 3
      variables.
DEBUG: *-*-*-*-*-*-* COMMIT *-*-*-*-*-*-* 62 923702190 orforc 102 DATASTEP
DEBUG: Close Cursor - CDA=2057325192 63 923702190 orustt 365 DATASTEP
DEBUG: Close Cursor - CDA=2057332360 64 923702190 orustt 365 DATASTEP
DEBUG: PHYSICAL disconnect. 65 923702190 ordcon 445 DATASTEP
DEBUG: USER=scott 66 923702191 ordcon 446 DATASTEP
NOTE: DATA statement used:
      real time           1.30 seconds
      cpu time            0.18 seconds


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.