[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

SQL 2008

Posted on 2011-09-21
2
Medium Priority
?
219 Views
Last Modified: 2013-11-05
I have a database on the same server as 2 applications that use the DB. Is there any way i can find out how many connections there are from the application to the db?

Running into performance issues with one of the applications but not the other.

0
Comment
Question by:Epic7
2 Comments
 
LVL 9

Accepted Solution

by:
DrewKjell earned 2000 total points
ID: 36576545
SELECT db_name(dbid) as DatabaseName, count(dbid) as NoOfConnections,
loginame as LoginName
FROM sys.sysprocesses
WHERE dbid > 0
GROUP BY dbid, loginame

You won't necessarily be able to tell which connections are from which application if you use the same DB Credentials however.

Drew
0
 
LVL 6

Expert Comment

by:jorgedeoliveiraborges
ID: 36576963
sp_who 'account1'
sp_who 'account2'
0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
Microsoft Access has a limit of 255 columns in a single table; SQL Server allows tables with over 255 columns, but reading that data is not necessarily simple.  The final solution for this task involved creating a custom text parser and then reading…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question