Sybase monProcessActivity

Posted on 2011-03-22
Last Modified: 2012-05-11
Hello All,

I've noticed in 12.5 monProcessActivity (MDA Table), there is no timestamp column.  Anybody know how offen monProcessActivity retain its data? Does it get refresh?  I'm trying to collect total number of committed transaction in a 24 hours period without using sp_sysmon.

Thank you,
Question by:tranicus
  • 3
  • 2
LVL 24

Expert Comment

by:Joe Woodhouse
Comment Utility
The monProcess% tables are only a snapshot of the process activity at the time they are queried - exactly like querying sysprocesses (and in fact hooking into many of the same areas of the ASE kernel).

Thus monProcessActivity retains no data at all, under any circumstances. Each time you query it you get a new snapshot of the process activity at that moment.

Good practice with any MDA table is to copy it into a "real" table and work with that data. You might think you could therefore insert to some kind of transaction history table the current contents of monProcessActicity, possibly formatted/manipulated/aggregated, but this is not actually a good idea. The MDA tables are not real tables, they are stored procedures whose result set is exposed as a table, and you can get poor performance issues if you hold that result set open for any kind of join, aggregation or other processing. Also anything that requires accessing the MDA table more than once (like a subquery being run once for each qualifying outer row) will behave strangely as the MDA table will return different results each time it is run.

So best practice with MDA is to dump it, as is, with as little processing as possible (preferably no processing at all, not even a WHERE clause), straight into a temp table. Then you can go to work on it - filter it, aggregate it, index it, format it - and send those results to your more permanent archive table.

To answer your specific question, all monProcess% tables are refreshed every time they are accessed.

Author Comment

Comment Utility
Hello Joe,

Thank you for the info but it still bug me. How does sp_sysmon able to pull those 'transaction summary, committed Xacts'?  One would think it have to come from somewhere.  I can't imagine an automated process run on hourly, dumping data from monProcessActiviry into a historical table.  
LVL 24

Accepted Solution

Joe Woodhouse earned 500 total points
Comment Utility
sp_sysmon doesn't use MDA tables, but it is using some of the same underlying infrastructure.

You may find what you want in the history tables rather than the session tables, ie the monSys% MDA tables.

Like the monProcess% tables, they are refreshed each time they are accessed... but they contain a cumulative history of everything that's happened since the last time it was accessed or since ASE was booted if they haven't been accessed yet.

sp_sysmon is doing something similar. It inspects a bunch of monitor counters at the start of its sample interval, and again at the end, and calculates a number of deltas or changes between the start and end numbers.

monProcessActivity can't give you what you say you want, because it only knows about what's running right then. It doesn't aggregate over time, and has no history, it only shows a snapshot in time. This is useless for what you want.

In fact I've just gone and reread all my MDA docs and presentations from Techwave and I don't think MDA can give you this number (total committed xacts per day).

Is there a reason you don't want to use sp_sysmon? It would do the job - run it every 20 minutes, grep for the committed xacts, sum them.

If you really don't want to or can't use sp_sysmon, the Monitor Server and Historical Server can do this for you. They still exist and still work, but there is a bit of a learning curve to using them, and they interfere with using sp_sysmon (and to some extent the MDA tables too).

Take a step backwards. Why do you want to know the number of committed xacts per day? What will knowing that allow you to do? We may be able to get at it from another direction.

Author Comment

Comment Utility
Much appreciated Joe... You gave me alot to think about the MDA tables, I wish Sybase were better in it explaination.
LVL 24

Expert Comment

by:Joe Woodhouse
Comment Utility
Glad that helped!

You and others might find the resources at helpful. Good luck!

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

HOW TO: Install and Configure VMware vSphere Hypervisor 6.5 (ESXi 6.5), Step by Step Tutorial with screenshots. From Download, Checking Media, to Completed Installation.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now