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



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

Answer / 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

More SQL Server Interview Questions

How do we get month name in SQL Server 2000, Oracle, MS Access?

11 Answers  


How to Debug a Stored Procedure?

5 Answers   Allianz,


How to get a list all databases on the sql server?

0 Answers  


create index myindex on mytable(mycolumn) what type of index will get created after executing the above statement? : Sql server database administration

0 Answers  


What is a fill factor?

0 Answers  






What is primary key index?

0 Answers  


What is cursors?

0 Answers   NA,


Write down the syntax and an example for create, rename and delete index?

0 Answers  


How to disconnect from a sql server using mssql_close()?

0 Answers  


What is set nocount on and what is set nocount off?

0 Answers  


What kind of problems occurs if we do not implement proper locking strategy?

0 Answers  


How sql server executes a statement with nested subqueries?

0 Answers  


Categories