Woher stammen all diese SQL Server-Sitzungen?
Nach dem Start von SSMS (2008 R2) auf meinem Dev-Rechner, den ich mit @ star
"D:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\Ssms.exe" -nosplash -S localhost -d testdata
ohne etwas zu tun,
in Aktivitätsmonitor Ich beobachte einige Sitzungen (TestData ist meine Standarddatenbank)
Details zu Sitzung 51:
select @@spid;
select SERVERPROPERTY('ProductLevel');
Details von Sitzung 52:
DBCC INPUTBUFFER(52)
Details von Sitzung 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 von Sitzung 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;
Wenn Sie SSMS starten möchten (Verbindung mit einer namenlosen Instanz über die Windows-Authentifizierung), ohne dass Optionen verfügbar sind, muss die oben angegebene Sitzung nicht als 52 @ angezeigt werde
Was hatte ich getan, um all diese Sitzungen zu starten?
Ich kann mich einfach nicht mehr an alles erinnern, was ich zuvor in meinem Entwickler-SQL Server 2008 R2 getan habe ...
Aktualisieren
Ich habe die gleichen Optionen in SSMS.exe (-nosplash -S localhost -d Testdaten) wiederhergestellt, SSMS neu gestartet und jetzt habe ich verschiedene Details, die den Details von Sitzung 51 entsprechen:
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'
Warum hatte ich es vorher nicht?