Dear Janet,

There are several ways to achieve this :

1. If you have sybase central, DBArtisan or any software like this
   you could monitor the processes runing while runing the query
   on remedy.  Very clean and does not need extra development. :-)

   ask your DBA if these tools are available (Sybase Central should
   be at least.  Is free and it comes with the software)  

2. Create your own script (you may need a database user with SELECT
   privileges over some system tables.  Ask your DBA - always a good
   practise).

   Attached a shell script I did to monitor the processes.

   You may want to put special attention to the physical_io and blocked
   columns, since they will tell you a lot of things.
   for instance, if your query takes forever and you have a spid number
   in the 'blocked' column, it means there is another processes is in
   conflict with your query.  Check what processes is this with the
   'hostprocess' colum at the OS level, etc.

   BTW: internally, all the processes in remedy are owned by user
        'ARAdmin'

Good luck
Jose


    #!/bin/sh
    sql()
    {
    isql -Usa -w500 -P<sa password in this case> << EOF
    set nocount on
    go
    SELECT
    a.spid,
    substring(suser_name(a.suid),1,18),
    a.cmd,
    a.cpu,
    a.physical_io,
    a.blocked,
    b.name,
    a.program_name,
    a.hostname,
    a.hostprocess
    from sysprocesses a, sysdatabases b
    where spid > 0 and a.dbid=b.dbid
    go
    EOF
    }
    while :
    do
      clear
      echo ".......user and processes"
      sql
      sleep $1
    done
   

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org ARSlist:"Where the 
Answers Are"

Reply via email to