2010-10-26 11 views
7

मेरे देव मशीन है, जो मैं कुछ भी करने के बिनाउन सभी SQL सर्वर सत्र कहां से हैं?

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

साथ लॉन्च करते हैं,
गतिविधि मॉनिटर में मैं कुछ सत्रों निरीक्षण पर SSMS (2008 R2) शुरू करने के बाद

alt text (TestData मेरा डिफ़ॉल्ट डेटाबेस है)

सत्र 51 का विवरण:

select @@spid; 
select SERVERPROPERTY('ProductLevel'); 
सत्र 52 कीविवरण:

DBCC INPUTBUFFER(52) 

सत्र 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 

सत्र 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; 

तो SSMS शुरू करने के लिए (Windows प्रमाणीकरण द्वारा उदाहरण बेनाम से कनेक्ट कर रहा) बिना विकल्पों के मेरे पास उपरोक्त शो के अनुरूप सत्र नहीं है

मैंने उन सभी सत्रों को लॉन्च करने के लिए क्या किया था?
मैं सिर्फ सभी याद नहीं है मैं अपने देव एसक्यूएल सर्वर 2008 R2 से पहले में क्या कर रहा था ...

अद्यतन:
मैं SSMS.exe (-nosplash -S स्थानीय होस्ट करने के लिए एक ही विकल्प बहाल - घ testdata), फिर से लॉन्च किया SSMS और अब मैं अलग विवरण सत्र के लिए इसी है 51 विवरण:

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' 

मैं इसे पहले क्यों नहीं था?

उत्तर

12

उन सत्रों का उपयोग गतिविधि मॉनीटर में डेटा खींचने के लिए किया जा रहा है।

संबंधित मुद्दे