How can u get the number of pupils connecting the database?

Answer Posted / sreenivas

try this below query:

use <databasename>
go
select db_name(dbid) as db, count(dbid) as connections from sys.sysprocesses where dbid > 0 group by dbid

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are trace files?

700


What part does database design plays a role in performance of an sql server-based application?

714


Write the syntax for stuff function in an sql server?

722


How can we use ConnectorJ JDBC Driver with MS SQL?

732


Explain magic tables in sql server?

719






Where sql server usernames and passwords are stored in a sql server?

659


What is truncate table?

704


What stored procedure would you use to view lock information?

728


Explain four layers of abstraction microsoft architectured?

138


Explain sub-query?

728


What is SQL Azure Firewall?

128


What is #temp and @table variable in SQL server?

758


When we should use and scope of @@identity?

715


How to connect a database with sql express.?

750


Differentiate between a primary key and a unique key.

791