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)
795 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)
795 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,974 reads
2009-03-04 (first published: 2009-02-16)
1,256 reads
A better way to use sp_spaceused, returning values on one row for the database instead of two.
2008-09-04
4,051 reads
By John
Failing to plan is planning to fail. When organizations first begin implementing Azure networking,...
By Steve Jones
As I use containers more and more to run various things, I decided I...
By Kevin3NF
Old Reliable Still Matters If you’ve been around SQL Server for a while, you’ve...
I maintain an application written years ago, where the database is on a Windows...
I’m working on a jewelry e-commerce project and need advice on designing an efficient...
Comments posted to this topic are about the item The Duplicate Cursor
Can I run this code:
DECLARE ANewTable CURSOR FOR SELECT * FROM ANewTableSee possible answers