Re: Check a user is connected to the database or not

From: Hari Prasad (hari_prasad_k_at_hotmail.com)
Date: 06/22/05

  • Next message: LvBohemian: "Re: SQLServerAgent Service"
    Date: Wed, 22 Jun 2005 10:28:42 +0530
    
    

    Hi,

    You can use SP_WHO and sp_dropuser and sp_droplogin system stored
    procedures.

    Thanks
    Hari
    SQL Server MVP

    "Venkat" <tammana@inooga.com> wrote in message
    news:O72%23AandFHA.612@TK2MSFTNGP12.phx.gbl...
    > 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
    >
    >
    >


  • Next message: LvBohemian: "Re: SQLServerAgent Service"

    Relevant Pages

    • Re: MS Access DAO -> ADO.NET Migration
      ... William Vaughn ... Microsoft MVP ... Hitchhiker's Guide to Visual Studio and SQL Server ... My migration app works building a SSCE database file with imported data ...
      (microsoft.public.dotnet.framework.adonet)
    • Re: Cluster will not fail over.
      ... > As far as the TCP/IP issue goes, you had to rebuild the cluster and were ... > able to restore the master database. ... > a cluster installation you'll have to revisit. ... >> This worked bringing up the sql server in minimal mode. ...
      (microsoft.public.sqlserver.clustering)
    • Re: Word 2003/Access2000/SQLSVR
      ... SQL server being where the data is held and this is accessed through a MS ... entire database and that may be say a record for Berkshire. ... "Peter Jamieson" wrote: ... replaced with the first record on the table in use. ...
      (microsoft.public.word.mailmerge.fields)
    • Re: MS Access DAO -> ADO.NET Migration
      ... full SQL Server and I see the logic you explained in a multi user ... allow two users to access the same database file Read/Write at any given ... The book was a pleasure to read after the gibberish that Microsoft 'puts ... Hitchhiker's Guide to Visual Studio and SQL Server ...
      (microsoft.public.dotnet.framework.adonet)
    • Re: MS Access DAO -> ADO.NET Migration
      ... For that it is much harder to handle the incremental identifier, ... database but although they have the data, they are not connected at the same ... The book was a pleasure to read after the gibberish that Microsoft 'puts ... SQL Server Management Studio is nowhere to be found on my ...
      (microsoft.public.dotnet.framework.adonet)