Sybase ASE - Request / Process Tracking

If there are any Sybase ASE experts, I was wondering if there is a way to get Sybase to keep track of all the requests it receives.

I currently have a program that usually starts showing strange behavior 7 hours after launch. I would like to know what Sybase is doing at this time so that I can fix this problem.

I am using Sybase ASE 15.5. And my monitoring server does not start, for some strange reason.

+4
source share
1 answer

Yes, there are several ways to track all requests that Sybase receives.

However, given the second part of your question, as I understand it, you need to (1) understand what your request is doing (2) control your active spid in the context of other active spids and ... if this is not enough, then (3) control the server ; not a trace, and all requests. So I’ll take care of this and postpone the answers to the tracking elements available in Sybase.

Your connection to ASE is the server process identifier or spid.

  • Install SHOWPLAN ON and install NOEXEC ON, and complete your request. This will give you a very good understanding that your SQL is actually a cover. This is an important requirement, something every developer should be familiar with, and demanded before testing. Whenever it seems like your request is slow, always check your I / O operations: SET STATISTICS IO ON.

  • sp_who; sp_lock; and watch your spid tick, hang, wait for locks, locks that other pins support, etc. This is a basic set that every developer should use all the time.

  • sp_sysmon controls the (whole) server. It can be used in two ways: as a permanent monitoring tool, for example, grab a full hour of statistics, which is the basis for the configuration of the server changes; and as a snapshot, for example. grab 5-minute snapshot of the server when your process is running and when it is not, and the differences. This is usually for experienced database administrators, not developers, and you need sa_role.

This is all in the manuals, both online and in PDF.

Seven hours is very long, so you should use a cursor or similar, and handle individual lines than sets. Check regular nightly tasks (dumps, updates, reorgan), weighed with a mark of 7 hours; some of them hold table locks. Of course, if the server is running on Windoze, all kinds of strange things, from leaking memory up, are standard rates; refuse the box every week at least.

With this order of processing burden, you should keep track of the transaction log and usage of tempdb.

+7
source

All Articles