Author: Peter Whyte
-
DBA Scripts: Collect Capacity and Temp DB Baselines
🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Maintenance & Automation › Collectors & Baselines Three Collectors for Capacity and TempDB DatabaseGrowth and VlfCount are system-versioned temporal tables, always current, no manual history-cleanup needed. The TempDB collector snapshots both file-level space and the top 10 session consumers in one pass. Each…
Written by
-
DBA Scripts: Collect Performance Baselines (Wait Stats, Perfmon, Storage I/O)
🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Maintenance & Automation › Collectors & Baselines Three Cumulative Counters, Three Matching Delta Scripts sys.dm_os_wait_stats, sys.dm_os_performance_counters, and sys.dm_io_virtual_file_stats are all cumulative since the instance last started, a raw snapshot of any of them tells you almost nothing on its own. Three collector generators…
Written by
-
DBA Scripts: Collect Blocking and Deadlock Events
🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Maintenance & Automation › Collectors & Baselines Standing Watch for Blocking and Deadlocks, Not Just Checking When Asked Get Blocking Sessions and Get Deadlock Summary answer “what’s happening right now.” These two generators answer a different question: “what happened while nobody was looking.”…
Written by
-
DBA Scripts: SQL Server Installation and Patching
🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Server & Configuration Ten scripts covering a SQL Server instance’s whole install-to-patch lifecycle: confirm a machine is ready, install unattended, apply sensible defaults, validate the result, keep it patched, and remove it cleanly when it’s done, for both the SQL Server engine and…
Written by
-
DBA Scripts: Patch SQL Server and Check Status
🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Server & Configuration › Installation & Patching Keep SQL Server Patched: Three Tools, One Job Patching is the job that never finishes: a new Cumulative Update lands, every instance needs it, and “are we current?” needs an answer on demand. This post is…
Written by
-
DBA Scripts: Uninstall SSMS via PowerShell
🛠️Part of the SSMS Complete Guide, installing, configuring and fixing SQL Server Management Studio.In: Server & Configuration › Installation & Patching When the Uninstaller Fails SSMS has to come off a machine, and Settings → Apps failed, left it half removed, or is no use across a fleet. This script finds every SSMS install in…
Written by
-
DBA Scripts: Install and Update SSMS via PowerShell
🛠️Part of the SSMS Complete Guide, installing, configuring and fixing SQL Server Management Studio.In: Server & Configuration › Installation & Patching The Scripted Version of Installing SSMS SSMS is behind or missing on a box and you want it current without clicking through the installer: this script installs or updates it silently, works out what…
Written by
-
DBA Scripts: Uninstall SQL Server
🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Server & Configuration › Installation & Patching Removing an Instance Cleanly, and Knowing What Happened Afterward uninstall-sql.ps1 detects installed instances, confirms the target explicitly, and runs setup.exe /ACTION=Uninstall, with an option to remove data directories afterward. generate-install-report.ps1 reads back through every install, configure,…
Written by
-
DBA Scripts: Install and Configure SQL Server
🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Server & Configuration › Installation & Patching Unattended Install, Then Sensible Defaults Applied on Top Two scripts covering the doing half of a SQL Server install: install-sql.ps1 drives setup.exe with validated, logged parameters instead of clicking through the GUI, and configure-sql.ps1 applies the…
Written by
-
DBA Scripts: SQL Server Migration Script Generators
🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks. Moving a SQL Server workload to a new instance means recreating five things by hand, unless you script them: logins (with the same SIDs, or every restored database ends up with orphaned users), SQL Agent jobs, database user and role mappings, linked servers,…
Written by
- DBA Scripts: Get Log Shipping Status
- SQL Server Row-Level Security: The Filter Does Not Stop Cross-Tenant Writes
- View the Definition of a Stored Procedure in SQL Server
- TempDB Is Full or Still Growing: Find What Is Using It, Right Now
- SQL Server Service Will Not Start: Error 17113, 17058, 1067 and Where the Real Reason Is
- How to Move TempDB Files in SQL Server
- Backups & Recovery (17)
- DBA Scripts (152)
- High Availability (HA) (13)
- Installation & Configuration (49)
- Maintenance (25)
- Migration & Upgrades (14)
- Monitoring (9)
- Performance Tuning (37)
- Security (Encryption & Permissions) (20)
- Storage & Capacity (16)
- T-SQL Fundamentals (15)
- Troubleshooting (94)
- Wait Types (235)