Relog.exe for perfmon slicing and dicing and PAL for reporting

So I'm going through a "how do we make the application better" exercise here at work. We ran a load test last night to see how the system would hold up. I always have perfmon counters running, so I wanted to see how they did during the load test window. Enter relog.


Validating one article at one subscriber

Here's a quick script before I nod off:
use [publisher_db]
begin tran
exec sp_marksubscriptionvalidation 
    @publication = N'publication_name,
    @subscriber = 'subscriber_server',
    @destination_db = 'subscriber_db'
exec sp_article_validation
    @publication = N'publication_name',
    @article = N'article_name',
    @rowcount_only = 2,
    @full_or_fast = 2,
    @shutdown_agent = 0

I don't think this is exposed through the GUI at all.


Finding last backups with Powershell

Last weekend, I did a change control that was in the middle of when we normally do our full backups. As a result, some of the databases didn't get backed up via the normal process. Our data center guys gave me the option of just running the whole thing again, but that would have backed up already backed up databases and given that our retention policy is based on time (and not by number), the backup drive isn't sized to accommodate that. I was also without my script repository (since moved to Dropbox so that won't happen again), so I needed a quick way to determine which databases needed to be backed up. Enter powershell: