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
Can you give me some DBCC command options?(Database consistency check) - DBCC CHECKDB - Ensures that tables in the db and the indexes are correctly linked.and DBCC CHECKALLOC - To check that all pages in a db are correctly allocated. DBCC SQLPERF - It gives report on current usage of transaction log in percentage. DBCC CHECKFILEGROUP - Checks all tables file group for any damage.
List layers of abstraction microsoft architectured to provide relational db through cloud platform ?
How optimize sql query with multiple joins in sql server?
What does normalization do to data?
What is explicit mode in sql server?
Is it ok to shrink transaction log?
It is important form e to get the information from log files of applications executed by the task scheduler? Does sql studio save these log files? : sql server management studio
How to change the password of a login name in ms sql server?
What is mean by clustered index and non clustered index, give syntax of creation? : sql server database administration
Difference between connected and disconnected database in .net with sql server?
What are the types of database schema? : sql server analysis services, ssas
Write a Select Query to display title for each group of records, which are collected with Compute Clause? Like titlefield column-A column-B ..... ..... ..... Sum ... titlefield column-A column-B ..... ..... ..... Sum ...
Explain indexing and what are the advantages of it?
How to create new table with "create table" statements?
What are sql servers used for?