Author | Patrick Flynn (@sqllensman) |
Availability | Windows, Linux, macOS |
Want to see the source code for this command? Check out Get-DbaDbccHelp on GitHub.
Want to see the Bill Of Health for this command? Check out Get-DbaDbccHelp.
Execution of Database Console Command DBCC HELP
Returns the results of DBCC HELP
Read more:
- https://docs.microsoft.com/en-us/sql/t-sql/database-console-commands/dbcc-help-transact-sql
Get-DbaDbccHelp
[-SqlInstance] <DbaInstanceParameter[]>
[[-SqlCredential] <PSCredential>]
[[-Statement] <String>]
[-IncludeUndocumented]
[-EnableException]
[<CommonParameters>]
PS C:\> Get-DbaDbccHelp -SqlInstance SQLInstance -Statement FREESYSTEMCACHE -Verbose | Format-List
Runs the command DBCC HELP(FREESYSTEMCACHE) WITH NO_INFOMSGS against the SQLInstance SQL Server instance.
PS C:\> Get-DbaDbccHelp -SqlInstance SQLInstance -Statement WritePage -IncludeUndocumented | Format-List
Sets Trace Flag 2588 on for the session and then runs the command DBCC HELP(WritePage) WITH NO_INFOMSGS against the SQLInstance SQL Server instance.
The target SQL Server instance or 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 |
Is the name of the DBCC command for which to receive syntax information.
Provide only the part of the DBCC command that follows DBCC,
for example, CHECKDB instead of DBCC CHECKDB.
Alias | |
Required | False |
Pipeline | false |
Default Value |
Allows getting help for undocumented DBCC commands. Requires Traceflag 2588
This only works for SQL Server 2005 or Higher
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 |