Quantcast
Channel: SCN: Message List - SAP Adaptive Server Enterprise (SAP ASE) for Custom Applications
Viewing all articles
Browse latest Browse all 3587

About MDA table.

$
0
0

Hi all,

 

My ASE version is ASE15.0.x and ASE15.7, I had create a store procedure to select the online sql:

 

create proc sp_mon

as

select s.SPID,"login"=convert(char(10),suser_name(l.suid)), "ip"=convert(char(15),l.ipaddr) , "DB"=convert(char(10),db_name(l.dbid)) ,

"cmd"=convert(char(15),l.cmd) ,"status"=convert(char(10),l.status) ,s.CpuTime, s.PhysicalReads, s.LogicalReads,  t.SQLText 

from master..monProcessStatement s, master..monProcessSQLText t , master..sysprocesses l

where s.SPID = t.SPID 

and s.SPID =  l.spid

and l.spid != @@spid

order by s.SPID, t.LineNumber ,t.SequenceInLine

go

 

Is it possible to enrich this store procedure to provided:

1. how long does this cmd exec

2. If this cmd is exec in a store procedure, how to show the procedure's name

 

Regards.


Viewing all articles
Browse latest Browse all 3587

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>