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 to insert multiple rows with one insert statement in ms sql server?

0 Answers  


What is an indexed view?

0 Answers  


Explain having clause and where clause?

0 Answers  


What are the database roles? : sql server security

0 Answers  


What is policy management?

0 Answers  






sql server has its default date format in da form "yy-mm-dd" its possible to convert da current date format of sql server to desired format. Now my question is dat how to get da previous and comin days date in my desired format??

2 Answers  


How secure is sql server database?

0 Answers  


Difference Between varchar and nvarchar datatype?

3 Answers   Satyam,


Which is the main third-party tool used in sql server?

0 Answers  


Does sql server use java?

0 Answers  


What are date and time data types in ms sql server?

0 Answers  


Explain filtered indexes benefits?

0 Answers  






Categories