|
|
|
|
|
|
|
|
|
Retrieve Table and Indexes Sizes in SMO
SQL SMO man Tim Mitchell demonstrates how to retrieve the size of your tables and indexes and then write the output in HTML. This assumes you have a basic understanding of SMO, if you're new to SMO visit Tim's profile for a complete list of his SMO videos.
|
|
|
|
Duration:
|
2
mins
29
secs
|
|
Skill Level:
|
200
|
|
Rating:
|
3.84
out of 5
|
|
Publish Date:
|
September 10, 2008
|
|
|
|
About the Author
|
|
Tim Mitchell is a Microsoft SQL Server database developer, business intelligence consultant, writer, and speaker. He has been working professionally with SQL Server for over six years, and holds the MCTS and MCDBA certifications from Microsoft as well as a Bachelor's degree in computer science from Texas A&M University - Commerce.
|
|
References
|
|
Comments
|
|
excellent
|
|
|
The basic ideas are fine but the original code should not work correctly as written. The output table should clearly not be created (over and over again) within the loop that processes the database tables.
Also, the final code that works has been changed. At the very least the line "foreach (DataRowView dr in dv)" (dv is not defined) has been changed to "foreach (DataRow dr in output.Rows)". Sloppy!
|
|
Tim Mitchell on
3/15/2009
Anthony, thanks for watching the video and for taking the time to comment. I'll review the video and the code, and will correct any discrepancy.
Thanks,
Tim Mitchell
|
|
|
Simple and to the point.
Thank you.
|
Must Be Logged In
|
|
|
|
|