Category: DBA Scripts

  • DBA Scripts: Get Trace Flags and Resource Governor Configuration

    Part of the DBA-Tools Project. Two Things a Previous DBA Might Have Set and Never Told You Trace flags and Resource Governor are both instance-wide behavior changes that don’t show up in sp_configure at a glance, don’t appear in the database, and can sit silently in place for years, inherited from whoever configured the server…

  • DBA Scripts: Get CPU Topology and OS Configuration Checks

    Part of the DBA-Tools Project. What CPU and OS Settings Are Actually Doing to SQL Server OS and Hardware Info tells you what hardware exists. These two scripts go one level deeper: how SQL Server is actually scheduling work across that hardware, and whether a handful of OS-level settings invisible from Task Manager, Lock Pages…

  • DBA Scripts: Get Backup Size Trend

    Part of the DBA-Tools Project. What Your Backup Sizes Are Quietly Telling You Nobody watches backup file sizes month to month, they just watch that the backup succeeded. But backup size is a free, already-collected proxy for data growth rate, and it catches two things a success/failure check never will: a database whose backups are…

  • DBA Scripts: Get Last DBCC CHECKDB

    Part of the DBA-Tools Project. DBCC CHECKDB is the only thing that actually confirms a database’s data is structurally sound; backups only prove a database can be restored, not that what gets restored is undamaged. Skipping it, or letting it silently stop running, means corruption can sit undetected for weeks or months before anyone notices, often only when…

  • DBA Scripts: Get Index Fragmentation

    Part of the DBA-Tools Project. Index fragmentation is one of those topics where the received wisdom, “rebuild your indexes every weekend”, causes almost as many problems as it solves. Rebuilding an index that doesn’t need it wastes a maintenance window, takes a schema lock on Standard Edition, and generates unnecessary transaction log. Not rebuilding an…

  • DBA Scripts: Get Autogrowth History

    Part of the DBA-Tools Project. SQL Server autogrowth is one of those settings that is often ignored until it becomes a production problem. A database file growing during normal business hours is usually a sign that SQL Server is reacting to a capacity issue. The engine pauses normal operations, extends the data or log file, then continues…

  • DBA Scripts: Server Inventory

    Part of the DBA-Tools Project. Everything You’d Need Before Touching an Unfamiliar Server Hand a DBA a server they’ve never seen before, and there’s a fixed set of questions that come first, before performance tuning, before security review, before anything: what version and edition is this, what’s the OS and hardware underneath it, is it…

  • DBA Scripts: Get Linked Servers

    Part of the DBA-Tools Project. Four Questions, One Topic: What’s Linked to This Server Linked servers are the kind of configuration that gets set up once, for one integration, and then forgotten until a migration or an incident forces someone to ask what’s actually connected to this instance and how. There are four separate questions…

  • DBA Scripts: Fix Orphaned Users

    Part of the DBA-Tools Project. From Finding Orphaned Users to Actually Fixing Them Get Orphaned Users answers “do I have this problem”. This script answers the next question: “what do I actually run to fix it”. After a database restore onto a server where the matching logins weren’t created with the same SID, database users…

  • DBA Scripts: Get Last Restore History

    Part of the DBA-Tools Project. A Backup You’ve Never Restored Is a Guess, Not a Plan Every DBA can point to a backup schedule. Far fewer can point to proof that any of those backups actually restore. A backup job finishing green tells you the file was written, not that it’s usable, not that the…