Just another witchcraft and wizardry site and DBA tips …
Welcome to my GitHub repository, here you will find all source code of my previous and future contributions made through my blog as:
- MAXDOP calculator - SQL Script
- Azure Data Studio Notebooks
- MSDB tuning - SQL Script
- Wait stats widget for Azure Data Studio - JSON \ SQL Script
- PerfMon for DBAs - PowerShell (New version)
- Database Integrity Checker - SQL Script (Under testing)
- Orphan data files - PowerShell (In development)
This T-SQL script will help you to calculate to correct MAXDOP configuration for your SQL Server instance.
It runs starting from SQL Server 2012, for SQL Server 2016 or major it also returns the MAXDOP value configured at database level.
A collection of Azure Data Studio Notebooks created as POC (proof of concept), to explore the capabilities of this new cool feature. You will find examples for the following scenarios:
- Creating a simple SQL container with Python
- Upgrading a SQL container to the latest CU with Python
- Troubleshooting guide with sp_WhoIsActive
This is a simple T-SQL script that creates a set of missing indexes on MSDB database, which improves the performance of backup\restore purge process.
The execution time for sp_delete_backuphistory stored procedure dropped in 60% after adding the recommended indexes included in this script. So go ahead and try it and let us know how everything works for you!
This T-SQL script and JSON files will help you to create a custom widget for Azure Data Studio. Please make sure to check my blog post where I explain in detail how to create this custom widget.
This PowerShell script will help you to create a PerfMon data collector job in any Windows server, this first version only contains the PowerShell for the CPU counters.
This T-SQL script files will help you to run a DBCC CHECKDB for one or all databases from a SQL Server instance, it also identifies corruption issues for any iteration.
This PowerShell script uses DBATools the DBA-GetDatafiles function, it loops through a defined list of servers looking for datafiles sitting on disk not attached to a database.
If you have questions or comments about this demo, don't hesitate to contact me at firstname.lastname@example.org