Microsoft.SqlServer.XEvent.XELite
2023.1.30.3
Prefix Reserved
.NET 6.0
This package targets .NET 6.0. The package is compatible with this framework or higher.
.NET Standard 2.0
This package targets .NET Standard 2.0. The package is compatible with this framework or higher.
.NET Framework 4.6.2
This package targets .NET Framework 4.6.2. The package is compatible with this framework or higher.
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Microsoft.SqlServer.XEvent.XELite --version 2023.1.30.3
NuGet\Install-Package Microsoft.SqlServer.XEvent.XELite -Version 2023.1.30.3
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Microsoft.SqlServer.XEvent.XELite" Version="2023.1.30.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Microsoft.SqlServer.XEvent.XELite --version 2023.1.30.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Microsoft.SqlServer.XEvent.XELite, 2023.1.30.3"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Microsoft.SqlServer.XEvent.XELite as a Cake Addin #addin nuget:?package=Microsoft.SqlServer.XEvent.XELite&version=2023.1.30.3 // Install Microsoft.SqlServer.XEvent.XELite as a Cake Tool #tool nuget:?package=Microsoft.SqlServer.XEvent.XELite&version=2023.1.30.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Introduction
XELite is cross platform library to read XEvents from XEL files or live SQL streams.
Getting Started
Using XELite to parse XEL files
static void OutputXELFile(string fileName)
{
var xeStream = new XEFileEventStreamer(fileName);
xeStream.ReadEventStream(
() => {
Console.WriteLine("Headers found");
return Task.CompletedTask;
},
xevent => {
Console.WriteLine(xevent);
Console.WriteLine("");
return Task.CompletedTask;
},
CancellationToken.None).Wait();
}
Using XELite to connect to live event session
Step 1: Create & start event session. For example:
CREATE EVENT SESSION [sample_session] ON SERVER
ADD EVENT sqlserver.sql_statement_completed(
ACTION(sqlserver.sql_text))
GO
ALTER EVENT SESSION [sample_session] ON SERVER
STATE = START
GO
Step 2: Implement the code to connect and read the events. Here is a sample:
static void OutputXELStream(string connectionString, string sessionName)
{
var cancellationTokenSource = new CancellationTokenSource();
var xeStream = new XELiveEventStreamer(connectionString, sessionName);
Console.WriteLine("Press any key to stop listening...");
Task waitTask = Task.Run(() =>
{
Console.ReadKey();
cancellationTokenSource.Cancel();
});
Task readTask = xeStream.ReadEventStream(() =>
{
Console.WriteLine("Connected to session");
return Task.CompletedTask;
},
xevent =>
{
Console.WriteLine(xevent);
Console.WriteLine("");
return Task.CompletedTask;
},
cancellationTokenSource.Token);
try
{
Task.WaitAny(waitTask, readTask);
}
catch (TaskCanceledException)
{
}
if (readTask.IsFaulted)
{
Console.Error.WriteLine("Failed with: {0}", readTask.Exception);
}
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETFramework 4.6.2
- Microsoft.Data.SqlClient (>= 5.1.0)
-
.NETStandard 2.0
- Microsoft.Data.SqlClient (>= 5.1.0)
-
net6.0
- Microsoft.Data.SqlClient (>= 5.1.0)
-
net7.0
- Microsoft.Data.SqlClient (>= 5.1.0)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Microsoft.SqlServer.XEvent.XELite:
Package | Downloads |
---|---|
YY.DBTools.SQLServer.XEvents
Library for reading Extended Events of SQL Server |
|
SabinIO.SqlTest
Library for the undertaking of testing against SQL Server |
|
SabinIO.xEvent.Lib
Library for the processing of xEvent files |
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on Microsoft.SqlServer.XEvent.XELite:
Repository | Stars |
---|---|
microsoft/sqltoolsservice
SQL Tools API service that provides SQL Server data management capabilities.
|
Version | Downloads | Last updated |
---|---|---|
2024.2.5.1 | 18,702 | 2/7/2024 |
2023.1.30.3 | 12,640 | 2/1/2023 |
2022.11.10.6 | 3,204 | 11/12/2022 |
2021.12.12.2 | 6,295 | 2/13/2022 |
2021.6.21.10 | 436,570 | 8/12/2021 |
2021.1.14.8 | 12,975 | 1/14/2021 |
2020.11.19.1 | 873 | 11/19/2020 |
2020.7.27.1 | 5,308 | 7/27/2020 |
2020.7.8.1 | 588 | 7/8/2020 |
2019.11.20.2 | 43,867 | 11/25/2019 |
2019.7.2.9 | 3,717 | 7/2/2019 |
2019.6.5.2 | 739 | 6/5/2019 |
2019.5.24.2 | 833 | 5/24/2019 |
Update dependency