Skip to content

Commit 795439e

Browse files
SQLNA Updates
Log ConnectionID and ActivityID Fix ETL date issue Minor fixes
1 parent e3aa4ca commit 795439e

File tree

6 files changed

+15
-13
lines changed

6 files changed

+15
-13
lines changed

SQL_Network_Analyzer/SQLNA/ConversationData.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,9 @@ public class ConversationData // - constructed in GetI
116116
public string serverInstance = null; // - set in GetClientPreloginInfo
117117
public uint processID = 0;
118118
public uint threadID = 0; // - set in GetClientPreloginInfo
119-
public Guid connectionPeerID = Guid.Empty; // - set in GetClientPreloginInfo
120-
public Guid peeractivityid = Guid.Empty;
121-
public long peeractivityseq = 0; // ActivitySequence
119+
public Guid connectionID = Guid.Empty; // - set in GetClientPreloginInfo
120+
public Guid activityID = Guid.Empty; // - set in GetClientPreloginInfo
121+
public long activitySequence = 0; // - set in GetClientPreloginInfo
122122
public uint preloginFrameNumber = 0;
123123

124124
// Login Error and Delay Stats

SQL_Network_Analyzer/SQLNA/ETLFileReader.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ private void TraceEvent_EventCallback(TraceEventInterop.EVENT_RECORD* rawData)
188188
}
189189
else
190190
{
191-
f.ticks = m_sessionStartTime.Ticks + ((long)(((rawData->EventHeader).TimeStamp - FirstTimeStamp) * (double)(100000000 / m_QPCFreq)));
191+
f.ticks = m_sessionStartTime.Ticks + ((long)(((rawData->EventHeader).TimeStamp - FirstTimeStamp) * ((double)10000000.0 / m_QPCFreq))); // 10-million (seven 0's)
192192
}
193193
userData = new byte[rawData->UserDataLength - arrayOffset];
194194
var x = ((byte*)rawData->UserData);

SQL_Network_Analyzer/SQLNA/OutputText.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3776,9 +3776,9 @@ private static void OutputStats(NetworkTrace Trace)
37763776
(c.TTLCountIn == 0 ? "" : (c.TTLSumIn / c.TTLCountIn).ToString()) + "," +
37773777
(c.TTLCountIn == 0 ? "" : c.minTTLHopsIn.ToString()) + "," +
37783778
(c.preloginFrameNumber) + "," +
3779-
(c.connectionPeerID == Guid.Empty ? "" : c.connectionPeerID.ToString().ToUpper()) + "," +
3780-
(c.peeractivityid == Guid.Empty ? "" : c.peeractivityid.ToString().ToUpper()) + "," +
3781-
c.peeractivityseq + "," +
3779+
(c.connectionID == Guid.Empty ? "" : c.connectionID.ToString().ToUpper()) + "," +
3780+
(c.activityID == Guid.Empty ? "" : c.activityID.ToString().ToUpper()) + "," +
3781+
c.activitySequence + "," +
37823782
ServerName + "," +
37833783
(c.serverInstance == null ? "" : c.serverInstance) + "," +
37843784
ServerVersion + "," +

SQL_Network_Analyzer/SQLNA/Parser.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,8 @@ public static void ParseNextProtocol(uint ProtocolNumber, byte[] b, int offset,
389389
{
390390
switch (ProtocolNumber)
391391
{
392+
case 0x0001: // ICMP - ignore and do not log
393+
break;
392394
case 0x0006: // TCP
393395
ParseTCPFrame(b, offset, t, f);
394396
break;
@@ -402,6 +404,7 @@ public static void ParseNextProtocol(uint ProtocolNumber, byte[] b, int offset,
402404
ParseIPV4Frame(b, offset, t, f);
403405
break;
404406
case 0x0806: // ARP - ignore and do not log
407+
case 0x8035: // RARP - ignore and do not log - Reverse ARP
405408
break;
406409
case 0x8100: // 802.1Q
407410
Parse8021QFrame(b, offset, t, f);

SQL_Network_Analyzer/SQLNA/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("1.5.2129.0")]
36-
[assembly: AssemblyFileVersion("1.5.2129.0")]
35+
[assembly: AssemblyVersion("1.5.2143.0")]
36+
[assembly: AssemblyFileVersion("1.5.2143.0")]

SQL_Network_Analyzer/SQLNA/TDSParser.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,14 +108,13 @@ private static void GetClientPreloginInfo(byte[] tdsPayLoad, ConversationData co
108108
{
109109
byte[] guidBytes = new byte[16];
110110
Array.Copy(tdsPayLoad, 8 + offset, guidBytes, 0, 16);
111-
conv.connectionPeerID = new Guid(guidBytes);
111+
conv.connectionID = new Guid(guidBytes);
112112

113113
Array.Copy(tdsPayLoad, (8 + offset + 16), guidBytes, 0, 16);
114-
conv.peeractivityid = new Guid(guidBytes);
114+
conv.activityID = new Guid(guidBytes);
115115

116116
//peer_activity_seq
117-
conv.peeractivityseq = utility.ReadUInt32(tdsPayLoad, (8 + offset + 32));
118-
117+
conv.activitySequence = utility.ReadUInt32(tdsPayLoad, (8 + offset + 32));
119118
}
120119
break;
121120
default:

0 commit comments

Comments
 (0)