This script will tell you how many indexes there are for a single table and also it specifically shows how many non clustered index, and also which tables have a heap index.
2021-04-14 (first published: 2012-10-17)
1,288 reads
An alternative for Microsoft's STRING_SPLIT function that will work on SQL Server 2012 and higher.
2021-03-11 (first published: 2021-03-05)
2,481 reads
See how to find those files that are not in use, but are taking up space on your instance.
2020-09-22 (first published: 2020-09-21)
2,408 reads
This function returns a 3 year calendar based on a 4-5-4/5-4-4/4-4-5 calendar, also known as a 52/53 week calendar. The basis of this calendar function was derived from the NRF retail calendar published at https://nrf.com/resources/4-5-4-calendar and the Wikipedia article published at https://en.wikipedia.org/wiki/4%E2%80%934%E2%80%935_calendar. The calendar function requires 2 helper functions. The helper functions were derived from […]
2020-09-21 (first published: 2020-09-15)
2,910 reads
A brand new, high-performing, "GetNumbers" or "fnTallyTable" function that can be used for defeating RBAR.
2020-07-02 (first published: 2016-03-23)
1,386 reads
I bet, each DBA would change some settings after the SQL Server installation as per their company standard . I wrote this PowerShell script for one of my client who has below standards: Port should be 1433, static Disable SQL telemetry* & SQLWriter services Change recovery model to FUll for all databases except tempdb and […]
2020-07-02 (first published: 2020-06-21)
2,680 reads
Lately, I'm dealing with lots of DB migrations and came across situation that I have no proper dynamic script to move DB files to different location. There are an option to proceed manually scripting one by one DB and execute it. Another option is detach attach DB - I'm not a big fan of this […]
2020-07-01 (first published: 2020-06-24)
1,821 reads