Get Ready for GDPR!

The General Data Protection Regulation (GDPR) takes effect on 25th of May 2018. This introduces considerable new responsibilities on all businesses, large or small. There is a legal responsibility to make sure information is kept securely and with due care, and is restricted to only those who need it. There are heavy penalties for data breaches, and an obligation to …

SQL To Check Space Taken Up By Each Table

This SQL for use with Microsoft SQL Server is a little better than the standard EXEC sp_MSforeachtable @command1=”EXEC sp_spaceused ‘?’” SELECT t.NAME AS TableName, (sum(a.total_pages) * 8) / 1024 as TotalSpaceMB FROM sys.tables t INNER JOIN sys.indexes i ON t.OBJECT_ID = i.object_id INNER JOIN sys.partitions p ON i.object_id = p.OBJECT_ID AND i.index_id = p.index_id INNER JOIN sys.allocation_units a ON p.partition_id …