Database File Space and Free Space
/* Author: Ben Farnsworth Date: 1/7/14 Get info on Data files */ IF OBJECT_ID(‘tempdb..#space’) IS NOT...
/* Author: Ben Farnsworth Date: 1/7/14 Get info on Data files */ IF OBJECT_ID(‘tempdb..#space’) IS NOT...
An issue arose where a database was giving the error: Could not allocate space for object...
This script is intended for environments where space constraints require the space to be closely maintained....
Today I ran a script to delete a huge portion of data in a DEV environment...
This returns a result for each database and includes its size in MB. SELECT DATABASE_NAME DBNAME...
This script gets the size of each database file, not including backups. Essentially, you’ll see .MDF,...
This is a handy script to show the number of cores and MaxDOP in a single...
Finding Orphaned Users USE [db] GO EXEC sp_change_users_login ‘Report’ GO Fixing Orphaned Users USE [db] GO...
If you’re creating a new index in SQL Server, it is good practice to make sure...
SELECT COL_TO_CHECK, COUNT(COL_TO_CHECK) FROM TABLE_NAME GROUP BY COL_TO_CHECK HAVING COUNT(COL_TO_CHECK) > 1 If there is more...