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 unique key constraint?

1 Answers  


State the difference between union and union all?

1 Answers  


What are the differences between having and where clause.

1 Answers  


What is recursion? Is it possible for a stored procedure to call itself or recursive stored procedure?

1 Answers  


how would you improve etl (extract, transform, load) throughput?

1 Answers   LinkedIn,


What is a primary key?

1 Answers  


What is difference between temp table and cte?

1 Answers  


What is the difference between coalesce() & isnull()?

1 Answers  


How do I view a trc file?

1 Answers  


Explain the truncate command?

1 Answers  


What are different types of statement?

1 Answers  


What is for xml in sql server?

1 Answers  


Categories