AdventureWorksDW Databases – 2012, 2008R2 and 2008 Writer #1, 2016-03-19 AdventureWorks sample databases seem to be so hard to find when you want them. Here’s… Continue Reading
Database File Space and Free Space Writer #1, 2016-03-19 /* Author: Ben Farnsworth Date: 1/7/14 Get info on Data files */ IF OBJECT_ID(‘tempdb..#space’) IS… Continue Reading
Autogrowth On But Database Not Growing Writer #1, 2016-03-19 An issue arose where a database was giving the error: Could not allocate space for… Continue Reading
Shrinking Database Files With Excess Free Space Writer #1, 2016-03-19 This script is intended for environments where space constraints require the space to be closely… Continue Reading
SQL Server – Lots of Empty Space But Database Won’t Shrink Writer #1, 2016-03-19 Today I ran a script to delete a huge portion of data in a DEV… Continue Reading
SQL Server – Get Latest Backup File Sizes For All Databases Writer #1, 2016-03-19 This returns a result for each database and includes its size in MB. SELECT DATABASE_NAME… Continue Reading
SQL Server – Get Size of Database Files Writer #1, 2016-03-19 This script gets the size of each database file, not including backups. Essentially, you’ll see… Continue Reading
TSQL – Get Number Of Cores & MaxDOP In Single Query Writer #1, 2016-03-19 This is a handy script to show the number of cores and MaxDOP in a… Continue Reading
TSQL – Orphaned User Script Writer #1, 2016-03-19 Finding Orphaned Users USE [db] GO EXEC sp_change_users_login ‘Report’ GO Fixing Orphaned Users USE [db]… Continue Reading
Estimating the Size of an Index Writer #1, 2016-03-19 If you’re creating a new index in SQL Server, it is good practice to make… Continue Reading