Check a user is connected to the database or not

From: Venkat (tammana_at_inooga.com)
Date: 06/21/05


Date: Tue, 21 Jun 2005 20:57:55 +0530


            Can any one tell me the way to know whether a given user id is
logged into the sql server or connected to any database or not? I want to
remove a user if he is not logged into the server or not connected to any
database.

            Can any one give me the T-Sql statement which solves my problem?

Thanks in advance.

--
Venkat