pramod - see if this is what you want...
select program_name, login_time, last_batch, lastwaittype from sysprocesses
inner join
sysdatabases on
sysprocesses.dbid = sysdatabases.dbid
and sysdatabases.name = 'dbName'
order by login_time desc
**ASCII stupid question, get a stupid ANSI !!!**