go
set showplan on set noexec on go select .......goset showplan offset noexec offgo
sp_showplan pid,null,null,null
--------------------------------------------------------- dbcc traceon(3604) go dbcc sqltext(spid) go --------------------------------------------------------- sp_showplan does not always work --------------------------------------------------------- You can also get iwatch to sniff out sql statements from the network, iwatch is made by Exact Inc. it is an expensive software. --------------------------------------------------------- If your ase server is 12.5x and above, you can get the sql statement out from master.dbo.monSysSQLText table. Check $SYBASE/$SYBASE_ASE/scripts/installmontables for details. --------------------------------------------------------- if your ase version is older than 11.92, try dbcc pss(suid, spid) To get the usage on dbcc command, try dbcc traceon(3604) go dbcc help(dbcc command) for example dbcc help(pss) go |