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 difference between stored procedure & function?

3 Answers   CarrizalSoft Technologies, Concept Infoway, TATA,


What is difference between index seek vs. Index scan?

0 Answers  


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

0 Answers  


What do you understand by a stored procedure?

0 Answers  


We need to perform what steps in the following order to work with a cursor?

0 Answers  






What do you mean by cardinality?

0 Answers  


How many types of attribute relationships are there? : sql server analysis services, ssas

0 Answers  


How the data stores in a page?

1 Answers  


What is the purpose of self join?

0 Answers  


If you are given access to a SQL Server, how do you find if the SQL Instance is a named instance or a default instance?

0 Answers  


What is a result set object returned by odbc_exec()?

0 Answers  


What are scheduled tasks in sql server?

0 Answers  


Categories