Question:

NO OF ACTIVE USERS in db

by Guest6592  |  12 years, 8 month(s) ago

0 LIKES UnLike

NO OF ACTIVE USERS in db

 Tags: active, db, Users

   Report

1 ANSWERS

  1. Guest9053
    If you are using SQL Server then following will help you to find number of active users in a DataBase

    select db_name(dbid),count(*) from master..sysprocesses
    where spid > 49 AND db_name(dbid)='DATABASE NAME'
    group by db_name(dbid)

    Note: SPID below 50 is SQL Server itself

Sign In or Sign Up now to answser this question!

Question Stats

Latest activity: 15 years, 1 month(s) ago.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.