Solved

Sybase, How to check statement which currently executed by spid

Posted on 2009-07-11
7
3,755 Views
Last Modified: 2013-02-27
Hi,
In sql server dbcc inputbuffer / sql profiler will tell me what currently specific spid does, I will able to know in details what is current statement being executed.
How about in Sybase ?? sp_who is not enough information
0
Comment
Question by:motioneye
7 Comments
 
LVL 14

Expert Comment

by:shru_0409
ID: 24830407
http://www.sybase.com/detail?id=20450
this link may be useful for u
0
 
LVL 6

Accepted Solution

by:
IncisiveOne earned 500 total points
ID: 24831514
(Sybase ASE is a much bigger, more feature-rich beast that runs on a variety of plaforms ... quite different to MS SQL.)

It depends on the version, and what options you have installed in the server.

Try, this works on all versions:
> dbcc sqltext (spid)

I trust you know to first exec:
> dbcc traceon (3604)

The SQL buffer size that will be displayed is subject to config parms

Cheers
0
 

Author Comment

by:motioneye
ID: 24834188
dbcc sqltext new to me :), okay let me try to find out, hmm I'm running on 15.0.2
0
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 
LVL 6

Assisted Solution

by:IncisiveOne
IncisiveOne earned 500 total points
ID: 24836497
In that case, you can also use:

> sp_showplan <spid>, null, null, null

Cheers

0
 

Author Closing Comment

by:motioneye
ID: 31602700
Thanks IncisiveOne, I know sometimes my questions are too  simple for you guys, but this the matter of me to get quick answer as the company direction go with sybase...u will hear more soon.. anyway I have downloadedmost pdf doc from syabse for day learning... thank again for support me
0
 
LVL 6

Expert Comment

by:IncisiveOne
ID: 24837829
My pleasure
0
 

Expert Comment

by:aimsupport
ID: 38933380
nice.

that is working gud for sybase.
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
An article on effective troubleshooting
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

816 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

10 Experts available now in Live!

Get 1:1 Help Now