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

What is use of except clause? How it differs from not in clause?

0 Answers  


What is normalization and what are the advantages of it?

0 Answers  


How to use subqueries with the exists operators in ms sql server?

0 Answers  


How can I know what locks are running on which resource?

0 Answers  


Which is better statement or preparedstatement?

0 Answers  






Explain the properties of sub-query in sql server?

0 Answers  


What is normalization of database? What are its benefits?

0 Answers  


Explain rdbms?

0 Answers  


What do you understand by intent locks?

0 Answers  


What is DAC? what is the use of it?

1 Answers   Wipro,


How m-m relationships are implemented?

2 Answers  


How do I find the port number for sql server?

0 Answers  


Categories