Posts related to SQL Server topics, divided to more subcategories by topic focus
I've made some updates to standardized database restore solution. Latest version is already available on my GitHub profile. New feature is preserving permissions settings after database restore. Your current database...
List all constraints created in database tables including their definition. Very quick overview of data integrity helpers called constraints.
HINT: Add where clause to focus on particular tables only....
Check what partitions are you using in the database. Super-useful script to quickly list all partitioned tables with information about file groups, partition schemas and partition functions.
HINT: Add where clause...
Generate heavy load over AdventureWorks database. Script from "AdventureWorks" sample database querying series. You can use this on for some testing purposes. It is pretty long running and heavy query...
This is risky! Be aware of doing this on some production database. This script is published for training purposes only. Use it with caution, this will definitely break your database,...
Standardized database restore solution. Doing some pre-restore checks and post-restore configurations with restored database. Is is also possible to restore databases that are part of Availability Group and joining them...
Generate script to grant permission quickly in more tables within database. Change Tracking is a lightweight solution that provides an efficient change tracking mechanism for applications. It is configured on...
Identify top waits occurring in SQL Server. Handy script with links to detailed information about given wait. Links pointing to great SQL Server Wait Type Library from SQLSkills.com. You will...
Check which index's maintenance is taking most time. Short script to answer this question. It is part of script series related to popular Ola Hallengren's maintenance solution. If you are...
Quick way to change tempdb files location. This is very useful script copied from Brent Ozar. From time to time there is need to move tempdb files to new location....