adspace


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

What are different types of constraints?

1007


Does view occupy space?

1033


What is subquery? Explain the properties of a subquery?

1070


explain different types of backups avaialabe in sql server? Given a particular scenario, how would you go about choosing a backup plan? : Sql server database administration

1139


What is a coalesce function?

1292


Can we do dml on views?

1042


Can one drop a column from a table?

1098


What are wait types?

1262


What are the different SQL Server Versions you have worked on?

1084


What is a scheduled job or what is a scheduled task?

1044


What is self contained sub query?

1148


How to convert numeric expression data types using the cast() function?

1157


Why use identity in sql server?

1210


How to convert character strings into numeric values?

1196


How efficient you are in oracle and SQL server?

1269