Author | Aaron Nelson |
Availability | Windows, Linux, macOS |
Want to see the source code for this command? Check out Find-DbaDbGrowthEvent on GitHub.
Want to see the Bill Of Health for this command? Check out Find-DbaDbGrowthEvent.
Finds any database AutoGrow events in the Default Trace.
Finds any database AutoGrow events in the Default Trace.
The following events are included:
92 - Data File Auto Grow
93 - Log File Auto Grow
94 - Data File Auto Shrink
95 - Log File Auto Shrink
Find-DbaDbGrowthEvent
[-SqlInstance] <DbaInstanceParameter[]>
[[-SqlCredential] <PSCredential>]
[[-Database] <Object[]>]
[[-ExcludeDatabase] <Object[]>]
[[-EventType] <String>]
[[-FileType] <String>]
[-UseLocalTime]
[-EnableException]
[<CommonParameters>]
PS C:\> Find-DbaDbGrowthEvent -SqlInstance localhost
Returns any database AutoGrow events in the Default Trace with UTC time for the instance for every database on the localhost instance.
PS C:\> Find-DbaDbGrowthEvent -SqlInstance localhost -UseLocalTime
Returns any database AutoGrow events in the Default Trace with the local time of the instance for every database on the localhost instance.
PS C:\> Find-DbaDbGrowthEvent -SqlInstance ServerA\SQL2016, ServerA\SQL2014
Returns any database AutoGrow events in the Default Traces for every database on ServerA\sql2016 & ServerA\SQL2014.
PS C:\> Find-DbaDbGrowthEvent -SqlInstance ServerA\SQL2016 | Format-Table -AutoSize -Wrap
Returns any database AutoGrow events in the Default Trace for every database on the ServerA\SQL2016 instance in a table format.
PS C:\> Find-DbaDbGrowthEvent -SqlInstance ServerA\SQL2016 -EventType Shrink
Returns any database Auto Shrink events in the Default Trace for every database on the ServerA\SQL2016 instance.
PS C:\> Find-DbaDbGrowthEvent -SqlInstance ServerA\SQL2016 -EventType Growth -FileType Data
Returns any database Auto Growth events on data files in the Default Trace for every database on the ServerA\SQL2016 instance.
The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function to be executed against multiple SQL Server instances.
Alias | |
Required | True |
Pipeline | true (ByValue) |
Default Value |
Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential).
Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported.
For MFA support, please use Connect-DbaInstance.
Alias | |
Required | False |
Pipeline | false |
Default Value |
The database(s) to process - this list is auto-populated from the server. If unspecified, all databases will be processed.
Alias | |
Required | False |
Pipeline | false |
Default Value |
The database(s) to exclude - this list is auto-populated from the server
Alias | |
Required | False |
Pipeline | false |
Default Value |
Provide a filter on growth event type to filter the results.
Allowed values: Growth, Shrink
Alias | |
Required | False |
Pipeline | false |
Default Value | |
Accepted Values | Growth,Shrink |
Provide a filter on file type to filter the results.
Allowed values: Data, Log
Alias | |
Required | False |
Pipeline | false |
Default Value | |
Accepted Values | Data,Log |
Return the local time of the instance instead of converting to UTC.
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 |