-
-
Notifications
You must be signed in to change notification settings - Fork 808
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DBCC Console Commands and Tests #4698
Conversation
Ohh this is beautiful 😍!! Thank you! Will do a quick review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incredibly beautiful and better than I could have imagined doing myself, thank you so much!
functions/Get-DbaDbccHelp.ps1
Outdated
.PARAMETER SqlCredential | ||
Login to the target instance using alternative credentials. Windows and SQL Authentication supported. Accepts credential objects (Get-Credential) | ||
|
||
.PARAMETER DbccStatement |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think Dbcc will be implied - can you change this to just Statement
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. Will update command and tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ty!
functions/Get-DbaDbccUserOptions.ps1
Outdated
begin { | ||
$stringBuilder = New-Object System.Text.StringBuilder | ||
$null = $stringBuilder.Append("DBCC USEROPTIONS WITH NO_INFOMSGS") | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so sorry i just realized this is plural, can you make it Get-DbaDbccUserOption
and add an Option param for filtering. Then it should probably be Option, Value and we'll be set. If you don't see this by my time tomorrow, ill merge and update
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should an Exclude option also be included?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nah, if i could go back in time, i'd only include Excludes in exports and copies
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. I will make changes latter today and update the pull request
truly awesome! thanks so much 🙇 |
The new files are in the 0.9.535 release but the psd1 file is In the FunctionsToExport section |
my apologies. iwill fix this within the hour. |
fixed 👍 |
Type of Change
Purpose
Implement the following DBCC Commands
DBCC HELP
DBCC FREEPROCCACHE
DBCC FREESESSIONCACHE
DBCC FREESYSTEMCACHE
DBCC MEMORYSTATUS
DBCC PROCCACHE
DBCC USEROPTIONS
Commands to test
Get-DbaDbccHelp
Get-DbaDbccMemoryStatus
Get-DbaDbccProcCache
Get-DbaDbccUserOptions
Invoke-DbaDbccFreeCache
Learning
Based on details in
https://docs.microsoft.com/en-us/sql/t-sql/database-console-commands/dbcc-transact-sql?view=sql-server-2017