Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3336008
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T00:05:05+00:00 2026-05-18T00:05:05+00:00

After launching SSMS (2008 R2) on my dev machine, which I launch with D:\Program

  • 0

After launching SSMS (2008 R2) on my dev machine, which I launch with

"D:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\Ssms.exe" -nosplash -S localhost -d testdata

without doing anything,
in Activity Monitor I observe some sessions (TestData is my default database)

alt text

Details of session 51:

select @@spid;
select SERVERPROPERTY('ProductLevel');

Details of session 52:

DBCC INPUTBUFFER(52)  

Details of session 53:

SELECT
CAST(serverproperty(N'Servername') AS sysname) AS [Name],
'Server[@Name=' + quotename(CAST(
        serverproperty(N'Servername')
       AS sysname),'''') + ']' + '/JobServer' AS [Urn]
ORDER BY
[Name] ASC

Details of session 54:

SET NOCOUNT ON;

DECLARE @previous_collection_time datetime;
DECLARE @previous_request_count bigint;
DECLARE @current_collection_time datetime;
DECLARE @current_request_count bigint;
DECLARE @batch_requests_per_sec bigint;
DECLARE @interval_sec bigint;

-- Get the previous snapshot's time and batch request count
SELECT TOP 1 @previous_collection_time = collection_time, @previous_request_count = request_count 
FROM #am_request_count
ORDER BY collection_time DESC;

-- Get the current total time and batch request count
SET @current_collection_time = GETDATE();
SELECT @current_request_count = cntr_value 
FROM sys.sysperfinfo
WHERE counter_name = 'Batch Requests/sec' COLLATE Latin1_General_BIN;

SET @interval_sec = 
    -- Avoid divide-by-zero
    CASE
        WHEN DATEDIFF (second, @previous_collection_time, @current_collection_time) = 0 THEN 1
        ELSE DATEDIFF (second, @previous_collection_time, @current_collection_time)
    END;

-- Calc the Batch Requests/sec rate for the just-completed time interval. 
SET @batch_requests_per_sec = (@current_request_count - @previous_request_count) / @interval_sec;

-- Save off current batch count
INSERT INTO #am_request_count (collection_time, request_count) 
VALUES (@current_collection_time, @current_request_count);

-- Return the batch requests/sec rate for the just-completed time interval. 
SELECT ISNULL (@batch_requests_per_sec, 0) AS batch_requests_per_sec;

-- Get rid of all but the most recent snapshot's data
DELETE FROM #am_request_count WHERE collection_time < @current_collection_time; 

If to launch SSMS (connecting to nameless instance by Windows authentication) without options then I do not have session corresponding to above show as 52

What had I done to have all those sessions to be launched ?
I just do not remember all what I had been doing in my dev SQL Server 2008 R2 before…

Update:
I restored the same options to SSMS.exe (-nosplash -S localhost -d testdata), relaunched SSMS and now I have different details corresponding to session 51 details:

DECLARE @edition sysname; 
SET @edition = cast(SERVERPROPERTY(N'EDITION') as sysname); 
select case when @edition = N'SQL Azure' then 1 else 0 end as 'IsCloud' 

Why did not I have it before?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T00:05:06+00:00Added an answer on May 18, 2026 at 12:05 am

    Those sessions are being used to pull data into the Activity Monitor.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an iPhone app which hides the status bar when run. After launching
I am using Installshield, and have had success in launching my exe install files
After fighting with different things here and there, I was finally able to get
I have a game project which runs very fine in device in both debug
Our application has a background thread which spawns a process through System.Diagnostics.Process : Process.Start(
In one of my personal project I am developing a basic SMTP server in
Due to a workspace path length limitation, I had to shorten the workspace path
stack trace is not showing like it should (in the browser). Instead I get
I've been using vi quite a while, and with a Mac, I sometimes use
I'm trying to write a test suite for a compiler (LLVM) and it works

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.