Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2089
  • Last Modified:

Sybase current executing query

Using Sybase Central, is there any way to know which query is currently executing to debug the database performance issues.
0
consultant12345
Asked:
consultant12345
  • 2
2 Solutions
 
hauieCommented:
Try this

open an interactive sql session to the server you are interested in using Sybase Central

do and sp_who and see who is running queries at the moment.

dbcc traceon(3604)
go

dbcc sqltext(spid)   --- where spid is the id of the client running the query you are interested in
go

This will give you the last executed statement.  If your data server isn't a busy one, then this may help you in debugging

0
 
grant300Commented:
What version of which Sybase product are you running?

Regards,
Bill
0
 
consultant12345Author Commented:
Hi Bill

I am using SQL Anywhere 10
0
 
grant300Commented:
Hmmm.  There are a bunch of tools available for ASE.

A look at the doc shows that ASA, via SQL Anywhere Studio, supports "Request Level Logging".  There are also some tools for manipulating the log which is both verbose and not well formatted.  You do get the complete text of each SQL statement along with some basic execution statistics.

Check out the SQL Anywhere Studio Developer's Guide.

Regards,
Bill
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now