Table Space Used in DB
A quick script that provides the sizes of the tables in your database, including schema and choice of sort method
2018-08-07 (first published: 2018-07-29)
803 reads
A quick script that provides the sizes of the tables in your database, including schema and choice of sort method
2018-08-07 (first published: 2018-07-29)
803 reads
This script uses a cursor to loop through all tables and get the count and table sizes using sp_spaceused. It is much faster and efficient than use 'SELECT COUNT(*) FROM TABLE_NAME'.
2012-06-22 (first published: 2012-06-09)
1,983 reads
2009-03-04 (first published: 2009-02-16)
1,261 reads
A better way to use sp_spaceused, returning values on one row for the database instead of two.
2008-09-04
4,064 reads
By HeyMo0sh
As someone who works in DevOps, I’m always focused on creating systems that are...
By Brian Kelley
I am guilty as charged. The quote was in reference to how people argue...
By Steve Jones
Learn how to tie a bowline knot. Practice in the dark. With one hand....
Hi everyone I asked this earlier but the desired outcome is a bit different...
Hi, I have a SQL Server instance where users connect to via Windows Authentication,...
Comments posted to this topic are about the item Multiple Deployment Processes
I have a query from a former DBA that we run on SQL Server 2025 to check on database metadata. This query references sys.sysaltfiles. I want to refactor this code to be more modern. Which DMV should I reference instead?
See possible answers