Minion Maintenance: Just make it go!

Minion Maintenance has some seriously thorough documentation, but some weeks you don’t have time to read the darn manual. When it comes to backups, CheckDB operations, and index maintenance, you just want it to WORK.

So here’s the “just make it go!” guide to Minion Maintenance!

Don’t have Minion Maintenance? Download!

  1. Download the latest Minion Maintenance pack (free) from any of the product pages: Minion Backup, Minion Reindex, or Minion CheckDB. Then extract to a folder!

Q: What about requirements? A: Check out the Quick Start Guide.

Install Minion Maintenance

  1. Open Powershell as administrator and run Set-ExecutionPolicy RemoteSigned
  2. Navigate to the extracted files (e.g., cd .\MinionWare\)
  3. Run the command dir -recurse | unblock-file
  4. Run the following command to install Minion Maintenance to your local SQL Server instance’s master database:.\MinionSetupMaster.ps1 localhost master All

Maintenance Runs Automatically…

Each module comes installed with a schedule; Minion Maintenance really is plug and play.

Look at the Minion.%SettingsServer tables to see the schedules for each operation!

Note: Minion Backup will back up your databases to the C drive. To change this, update  BackupDrive and BackupPath in Minion.BackupSettingsPath.

…and Manually

Sometimes you want to see what the next maintenance run will do, or run a backup by hand. Below are some examples of how to do this…just run a T-SQL command in in SQL Server Management Studio!

Note: each “Master” procedure has a @StmtOnly command, which lets you generate the statements instead of running them!

Backups

To  run a full backup for all user databases, run:

EXEC Minion.BackupMaster @DBType = 'User'
   , @BackupType = 'Full';

To  run a differential backup for just two databases, run:

EXEC Minion.BackupMaster @DBType = 'User'
   , @BackupType = 'Diff'
   , @Include = 'ADB, BDB';

Index Maintenance

To  run REORGANIZE and REBUILD on indexes above those respective thresholds, run:

EXEC Minion.IndexMaintMaster @IndexOption = 'All'
 , @ReorgMode = 'All';

To  REBUILD on indexes that are above the REBUILD threshold, in all database names that are like “Project%” run:

EXEC Minion.IndexMaintMaster @IndexOption = 'All'
 , @ReorgMode = 'REBUILD'
 , @Include = 'Project%';

CheckDB

Run DBCC CHECKDB for all system databases:

EXEC [Minion].[CheckDBMaster] @DBType = 'System'
 , @OpName = 'CHECKDB';

Run DBCC CHECKDB for all user databases EXCEPT “TestRun” and those named like %Archive:

EXEC [Minion].[CheckDBMaster] @DBType = 'User'
   , @OpName = 'CHECKDB'
   , @Exclude = '%Archive, TestRun';

If you’re stuck, contact us!

You can certainly use the built-in documentation (use EXEC Minion.HELP), or see support online, but we’re always here to help! Submit a ticket on the support site, email support, or ping us on Twitter!