You can Use the Following SQL Script to Monitor SQL Server Processes and Connections, Whose Function IS Almost The Same AS SP_WHO & SP_WHO2.
SELECT
SPID, UID
=
RTRIM
(loginame), program_name
=
RTRIM
(Program_name), DBNAME
=
DB_NAME
(DBID), Status
=
RTRIM
(status)
From
Master.dbo.sysprocesses
WHERE
Loginame
=
'
sa or other login name
'
and
DB_NAME
(DBID)
=
'
Database Name
'
AND
Program_name
=
'
.NET SQLCLIENT DATA Provider
'
EG.
SELECT
SPID, UID
=
RTRIM
(loginame), program_name
=
RTRIM
(Program_name), DBNAME
=
DB_NAME
(DBID), Status
=
RTRIM
(Status)
From
Master.dbo.sysprocesses
WHERE
Loginame
=
'
SA
'
and
DB_NAME
(DBID)
=
'
Hris2004
'
AND
Program_name
=
'
.NET SQLCLIENT DATA Provider
'