ASE Traceflag 100 prints out the parse tree after parsing a batch of sqlcmdtext
1> dbcc traceon(3604,100)
2> go
00:0006:00000:00013:2013/09/03 13:27:08.76 server DBCC TRACEON 3604, SPID 13
00:0006:00000:00013:2013/09/03 13:27:08.76 server DBCC TRACEON 100, SPID 13
DBCC execution completed. If DBCC printed error messages, contact a user with System Administrator (SA) role.
1> select name from sysusers
2> go
PARSE TREE
SEQ (!:0x100050edc88) (L: 0x100050edc70 R: 0x0) (TokClass: MARK) (seqline:1 seqaction:1 seqstmttype:0 (GENERIC_TOKEN) seqgoto:0x0 seqmpcr:0x0 seqautop:0x0 seqsetop:0x0 seqoffset:0 seqstat: (0x0800 (POST_10)) seqcursread: 0x0 (0x000
0) seqisolation: 0 (NOT_SPECIFIED))
seqstat3: (0x00)
seqstat2: (0x0000) seqstat4: (0x0000) seqstat5: (0x0000) seqomnistat: (0x0000) seqbmwktab: ()
CMD (!:0x100050edc70) (L: 0x100050ed800 R: 0x0) (TokClass: MARK)
ROOT
/
RESDOM
name
\
VAR
(-1,-1)
name
ROOT (L:0x100050ed800) (L: 0x100050edd98 R: 0x0) (TokClass: MARK) (querytype:SELECT resvar:-1 workvar:-1 varct:1 workct:0 subqct:0 toplimit:0 workrg:0x100050eda80 rootstat:(0x00000001 (USER)) root2stat:(0x00000000) root3stat:(0
x00000000) root4stat:(0x00000000) root5stat:(0x00000000) root6stat:(0x00000000) root7stat:(0x00000000) joindata:0x0 procnum:0 forupdlst: 0x0 )
RANGE: (0x100050ede20) (varno: 0 tablename:sysusers rgcorr: level: 0 subq: 0 rgcol: 0x0 rgjoin: 0x0 rgor: 0x0 rgviewp: 0x0 rgindname: 0x0 rgptnname: 0x0 rgtrigdata: 0x0 rgnondiskres=0x0rgcursor: -1 rgdbid: 0 rgtabid: 0 rgprefetch: 0 rgsch
ema2: 0 rgschema: 0 rglock: 0 rgcoldel: 0: rgcrtime: 0 rgstat:(0x00000000) rgstat2:(0x0000) rgstat3:(0x0000) rgstat4:(0x00) rgstat5:(0x01 (EXPLICIT NAME)) rgstat6:(0x00)
SUBQUERY LIST: (at 0x100050edbf0) (subqct=0) is empty.
RESDOM (L:0x100050edd98) (TokClass: MARK) (resname:name colid:0 coltype:0x0 (GENERIC_TOKEN) (hierarchy:0) colen:0 colstat: 0x0 (0x00) cstatus2: (0x00000000) cstatus3: (0x0000) colprec:0 colscale:0 coloff:0 resorder:0 resstat
2: (0x0000) resstat3: (0x0000) resstat4: (0x0000) resstat5: (0x0000) resstat6: (0x00) resstat7: (0x00) resstat8: (0x00000000) resomnistat: (0x0000) resvarno:0 resnamelist: 0x0 )
VAR (R:0x100050edd20) (TokClass: GVAR) (varname:name varno:-1 colid:-1 colstat: 0x0 (0x00) cstatus2: (0x00000000) cstatus3: (0x0000) coltype:0x0 (GENERIC_TOKEN) (hierarchy:0) colen:0 colprec:0 colscale:0 varjtcid:-1 varst
at:0x0 ((0x0000)) varstat2:0x0 ((0x00000000)) varlevel:0 varsubq:0)
name
------------------------------
dbo
dtm_tm_role
guest
ha_role
js_admin_role
js_client_role
js_user_role
keycustodian_role
messaging_role
mon_role
navigator_role
oper_role
probe
public
replication_role
sa_role
sa_serverprivs_role
sso_role
sybase_ts_role
usedb_user
webservices_role
(21 rows affected)
1>