Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...This is easily the most helpful website I've ever used, and this is the best forum with the quickest response time bar none...."

Geography

Where in the world do Tek-Tips members come from?

Is there a command in Sybase similar to MySql 'show processlist'

ipalanisamy (Programmer)
28 Aug 08 13:26
Hi,

I'm new to Sybase and I have worked in MySQL earlier.
I would like to findout a command which is similar to MySQL's 'show processlist' and 'show full processlist' commands.
This command I use to debug a slow query problems.
The MySQL 'show processlist' output looks like below.

In this output you will see, the connection information's like connection id, the time, the state, the query, etc.

It would be great if someone points to a similar command in SyBase Adaptive SQL Server.


mysql> show processlist;
+-----+------+----------------+----------+---------+------+----------------+------------------------------------------------------------------------------------------------------+
| Id  | User | Host           | db       | Command | Time | State          | Info                                                                                                 |
+-----+------+----------------+----------+---------+------+----------------+------------------------------------------------------------------------------------------------------+
| 468 | root | localhost:1176 | webnmsdb | Sleep   |  299 |                | NULL                                                                                                 |
| 469 | root | localhost:1177 | webnmsdb | Query   |    3 | Opening tables | SELECT SQL_CALC_FOUND_ROWS  merged_usr_960.id as usr_id,merged_flowSummary_961.deviceId as flowSumma |
| 470 | root | localhost:1178 | webnmsdb | Sleep   |  299 |                | NULL                                                                                                 |
|
+-----+------+----------------+----------+---------+------+----------------+------------------------------------------------------------------------------------------------------+

mysql> show processlist;
+-----+------+----------------+----------+---------+------+----------------------+------------------------------------------------------------------------------------------------------+
| Id  | User | Host           | db       | Command | Time | State                | Info                                                                                                 |
+-----+------+----------------+----------+---------+------+----------------------+------------------------------------------------------------------------------------------------------+
|
| 469 | root | localhost:1177 | webnmsdb | Query   |   24 | Copying to tmp table | SELECT SQL_CALC_FOUND_ROWS  merged_usr_960.id as usr_id,merged_flowSummary_961.deviceId as flowSumma |
|
| 478 | root | localhost:1186 | webnmsdb | Query   |   15 | Locked               | LOAD DATA INFILE 'C:/ConSentry/InSight/data/unprocessedData/Device4700075_flowSummary_2008_08_28_00_ |
| 479 | root | localhost:1187 | webnmsdb | Sleep   |  320 |                      | NULL                                                                                                 |
                                                                                |
+-----+------+----------------+----------+---------+------+----------------------+------------------------------------------------------------------------------------------------------+
PDreyer (TechnicalUser)
29 Aug 08 2:30
exec sp_who

or

select * from sysprocesses
ipalanisamy (Programmer)
29 Aug 08 13:49
Both the commands that you have mentioned is deprecated with the version SQL Anywhere 10.0.1.388.

Is there any other commands which has replaced these ones?

Also I would like to know the format of the log file content.

After I have enabled the log, I see the below output
=,<,4,EXEC_ANY_IMM,DELETE TOP 1000 FROM EVENTS WHERE (TIMESTAMP < 20070811031622, 0.000000001)
+937,<,2,CACHED_DROP_STMT,131121
=,>,2
=,<,2,VALIDATE_STMT,131121
=,>,2
=,<,2,OPEN,131121
+1,>,2,OPEN,131213
+3,<,2,CLOSE,131213
=,I,2,0,1,0,NOSCROLL*+READONLY+HOLD
=,>,2,CLOSE
=,<,2,COMMIT
=,>.,2
+2096,I,4,0,565,0,
=,W,4,122,The result returned is non-deterministic
=,>.,4
=,<,4,EXEC_ANY_IMM,commit
+193,>.,4

Want to understand how to read it?

Thanks,
Ila.
 
PDreyer (TechnicalUser)
3 Sep 08 4:17
Your 1st post said Adaptive server and this is an ASE forum
But now you say SQL Anywhere
I can't find a SQL Anywhere forum on this site
Maybe try posting to the sybase.public.sqlanywhere.general newsgroup at forums.sybase.com

http://forums.sybase.com/cgi-bin/webnews.cgi?cmd=listitems&sort_on=none&second_sort=date&sort_method=date&sort_reverse=true&;group=sybase.public.sqlanywhere.general

 

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close