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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

How to retrieve field values using mssql_result()?

609


What do we have to check in database testing?

562


How to remove duplicate rows from table?

569


What happens if time-only values are provided as date and time literals?

503


What is the cartesian product of the table?

523






What stored by the master?

526


What are pages and extents? : SQL Server Architecture

537


how to invoke a trigger on demand? : Sql server database administration

538


Why we need to use secondry database file? though, we can do same work using primary database file also.

5721


what are different types of raid configurations? : Sql server database administration

460


Explain features and concepts of analysis services?

477


How to maintain a fill factor in existing indexes?

507


What is delete query?

496


Tell me what is the significance of null value and why should we avoid permitting null values?

522


When you use @@error and try-catch?

549