Solved

Sybase current executing query

Posted on 2008-06-23
6
1,709 Views
Last Modified: 2012-06-27
Using Sybase Central, is there any way to know which query is currently executing to debug the database performance issues.
0
Comment
Question by:consultant12345
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
6 Comments
 

Accepted Solution

by:
hauie earned 250 total points
ID: 21855580
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
 
LVL 19

Expert Comment

by:grant300
ID: 21858129
What version of which Sybase product are you running?

Regards,
Bill
0
 

Author Comment

by:consultant12345
ID: 21896949
Hi Bill

I am using SQL Anywhere 10
0
 
LVL 19

Assisted Solution

by:grant300
grant300 earned 250 total points
ID: 21899762
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Generating a Format File in Sybase ASE BCP 1 1,239
sql anywhere query 5 146
Default Read Only User Sybase DB 1 160
SQL Query Producing decimal places when it shouldn;t be 8 60
This article summaries thoughts and ideas from two years of sustained use. It provides good reasoning to make the jump to Windows 10.
Adults who share images on social media aren’t the only ones who need to worry about their privacy. Our culture’s tendency to share every move and celebration affects the privacy of our children, too.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

763 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