Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Commands around Suspect pages in a database #2191
Comments
I have the function working in test. Question on your notes. Should we make a Clear function? The wording on MSDN says that as the suspect pages are fixed the table is updated. Could it cause issues removing records? I will see if I can get the logic worked out for the grouping for Test function. |
(btw @ConstantineK is almost done with his database breaker) |
@gbargsley yes you do need to clear that table. The record in the table is updated when the page is repaired, but it does not purge that record from the table. The table itself has a record limit and if you never clear that table you will lose any new record of a new suspect pages. SQL Server will never clear a "repaired" page from that table, it has to be done manually. |
Create new command to accompany Restore-DbaDatabase page restore parameter. |
I'm not sure I follow the comment @gbargsley , what command name are you proposing or is this referring to a |
I was creating another issue this morning and when I looked at this issue for reference I saw it was still open. So I put a note from comments from Stuart on Slack. This is for the Clear command I was going to work on. Sorry for confusion, but was just putting a note for my reference. |
https://docs.dbatools.io/#Get-DbaSuspectPage has been done. |
Feature Request
A simple command that just pulls readable information from msdb..suspect_pages.
Problem to solve
At times you need to monitor the suspect pages a server may have or verify after you get logical errors returned from DBCC results, or even finding the dreaded 823/824 errors in the error log.
You can run
SELECT * FROM msdb..suspect_pages
but that gives you a bunch of values that are allint
andbigint
, and onedatetime
value. So purpose would be to make it readable and provide full descriptive value for each ID.Other noteworthy things to mention that could lead to commands:
Clear-DbaSuspectpages
)Each command below should allow multiple server and database names to be passed in.
Get-DbaSuspectPages
It does not require reference to
Db
orDatabase
in the command since I believe the table sits inmsdb
so it is a server-level "object" technically. We could have a-Database
filter on it if desired.I would also have to believe the name of the command is kept as plural because the object it is reading is called "pages" and not "page"...but I'll defer to the boss on that decision.
The information returned from the table itself should be translated into readable information. There should be commands already in the module that can translate these IDs, with the exception of the page ID value.
Clear-DbaSuspectPages
Offer the ability to clear only those pertaining to a certain ID values, or the whole table.
Test-DbaSuspectPages
Basic command that just groups the data found in the table by each database and event type then returns the count of each.