How to clear master.dbo.sysprocesses ?

  • Hi everyone!

    I see all connection session by query statement:

    Select * From master.dbo.sysprocesses

    And i try to clear by statement:

    Delete From master.dbo.sysprocesses

    or

    Truncate table master.dbo.sysprocesses

    but not allow.

    Please help me know how to clear or update

    master.dbo.sysprocesses

    ?

    Thank you very much!

  • Sysprocesses is a view of the processes that are running on SQL Server. You can't update it. If you want to stop any of those processes running, use KILL. Only do that if you know what you're doing. What are you trying to achieve here?

    John

  • John Mitchell-245523 (5/31/2016)


    Sysprocesses is a view of the processes that are running on SQL Server. You can't update it. If you want to stop any of those processes running, use KILL. Only do that if you know what you're doing. What are you trying to achieve here?

    John

    Thank John!

    I connected to another database, and i don't want to him know about that.

    so i need to clear log in sysprocesses.

  • To remove the connection from sys.sysprocesses, you need to disconnect, after disconnecting your spid will be no longer in the list of sys.sysprocesses.

  • manticohd (5/31/2016)


    John Mitchell-245523 (5/31/2016)


    Sysprocesses is a view of the processes that are running on SQL Server. You can't update it. If you want to stop any of those processes running, use KILL. Only do that if you know what you're doing. What are you trying to achieve here?

    John

    Thank John!

    I connected to another database, and i don't want to him know about that.

    so i need to clear log in sysprocesses.

    Sounds shady, at best. Knowing that, I wouldn't help if there was a way. Why are you sneaking around?

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • johnwalker10 (5/31/2016)


    To remove the connection from sys.sysprocesses, you need to disconnect, after disconnecting your spid will be no longer in the list of sys.sysprocesses.

    Thank John!

    Yesterday, i already solved this one.

    I disconnected like your comment.

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply