It is very simple to find out the space used by any table in database.
USE AdventureWorks;
GO
EXEC sp_spaceused 'Sales.Customer';
GO

Reference : Pinal Dave (http://blog.SQLAuthority.com)
July 8, 2008 by pinaldave
It is very simple to find out the space used by any table in database.
USE AdventureWorks;
GO
EXEC sp_spaceused 'Sales.Customer';
GO

Reference : Pinal Dave (http://blog.SQLAuthority.com)
Posted in Pinal Dave, SQL, SQL Authority, SQL Data Storage, SQL Query, SQL Scripts, SQL Server, SQL Stored Procedure, SQL Tips and Tricks, T SQL, Technology | 7 Comments
Pinal Dave is a Pluralsight Developer Evangelist. He has authored 9 SQL Server database books and have written over 2500 articles on the database technology on his blog at a http://blog.sqlauthority.com. Along with 9+ years of hands on experience he holds a Masters of Science degree and a number of certifications, including MCTS, MCDBA and MCAD (.NET). His past work experiences include Technology Evangelist at Microsoft and Sr. Consultant at SolidQ. Prior to joining Microsoft he was awarded the Microsoft MVP award for three continuous years for his contribution in the community. Here is the list of the Pinal Dave's books.
Follow @pinaldave
Send +Pinal Dave
an email at pinal@sqlauthority.com
Nupur Dave loves technology simply because it makes life more convenient. She is devoted to technology because it touches our heart makes our daily lives easier. Among the many technological programs she uses and embraces Windows Live most because she can do lots of things with ease – from photo management to movies; business emails to personal social media connections.
This is the best SQL Blog ever. TY.
Cool tip. I really enjoy your blog! I come here whenever I have a SQL problem. Thanks!
Hi Pinal,
Does it shows the excat data. Suppose there is bulk operation happed in that case it will show the excat data..?
Hi Pinal,
Is there any way to use replace function for ntext data type. If i want to change a particular text in all columns and all tables in a database. How can i resolved it ?
Please suggest. Thanks in advanced
I think you need to run DBCC UpdateUsage before you run sp_spaceused in order to get a correct result.
You will need to have sa role to find the space usage of all databases. Is there any work around for this?
Sir m storing image of visitorsand visitor data in a visitor table. The database has become to heavy i doubt its becuz of the size of image is there any way to know the size occupied by a specific column plz. let me know on my email id