Author | Chrissy LeMaire (@cl), netnerds.net |
Availability | Windows, Linux, macOS |
Want to see the source code for this command? Check out Read-DbaXEFile on GitHub.
Want to see the Bill Of Health for this command? Check out Read-DbaXEFile.
Read XEvents from a *.xel or *.xem file.
Read XEvents from a *.xel or *.xem file.
The file that the XESession is currently writing to can not be accessed and will be skipped using pipeline input from Get-DbaXESession.
Read-DbaXEFile
[-Path] <Object[]>
[-Raw]
[-EnableException]
[<CommonParameters>]
PS C:\> Read-DbaXEFile -Path C:\temp\deadocks.xel
Returns events from C:\temp\deadocks.xel.
PS C:\> Get-ChildItem C:\temp\xe\*.xel | Read-DbaXEFile
Returns events from all .xel files in C:\temp\xe.
PS C:\> Get-DbaXESession -SqlInstance sql2019 -Session deadlocks | Read-DbaXEFile
Reads remote XEvents by accessing the file over the admin UNC share.
The path to the *.xem or *.xem file. This is relative to the computer executing the command. UNC paths are supported.
Piping from Get-DbaXESession is also supported.
Alias | FullName |
Required | True |
Pipeline | true (ByValue) |
Default Value |
If this switch is enabled, an array of Microsoft.SqlServer.XEvent.XELite.XEvent objects will be returned.
Alias | |
Required | False |
Pipeline | false |
Default Value | False |
By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.
Alias | |
Required | False |
Pipeline | false |
Default Value | False |