September 28, 2005 at 1:06 pm
I have taskpad view enabled for EM view of databases. per this view, one table is three times the size of the .mdf for the entire database, which makes no sense.
after searching BOL for a stored proc or DBCC, I have come up empty:
what's the tSQL or EM process for determining the acutal size of a given table?
I don't need to estimate, just need a quick command to run against any table in Query Analyzer (or other hint in EM) to find the size of a particulary table.
Thanx!
September 28, 2005 at 1:38 pm
finally found sp_spaceused <object name>
after only 35 minutes of hunting. BOL can really be frustrating sometimes.
September 29, 2005 at 2:04 am
sp_spaceused tablename is useful but be aware that it isn't always accurate, if you want to know the true size of something run DBCC updateusage ('DATABASENAME') beforehand, this will run through the tables and update the table sizes to the correct value, sometimes they can be quite misleading. Then when you run sp_spaceused you will get the correct value.
September 29, 2005 at 5:00 am
You can also perform the DBCC UPDATEUSAGE while executing sp_spaceused as well:
exec sp_spaceused your_tablename, @updateusage='true'
RegardsRudy KomacsarSenior Database Administrator"Ave Caesar! - Morituri te salutamus."
September 29, 2005 at 6:13 am
Thanx much to all, this really helps out.
anyone have a suggestion for a good "how to" admin book?
BOL doesn't really provide the how to stuff, and being a newbie DBA to SQL Server (with no onsite mentor available), a solid reference for this sorta thing would be really helpful. I'm considering SQL Server 2000 Unleashed, but if someone who has been in my shoes used something that helped out while foundering for a stable footing, I would greatly appreciate suggestions.
September 29, 2005 at 6:39 am
Sorry, I can't help you with a book recommendation. One of the best ways to figure out what Enterprise Manager is doing is to run Profiler while you are performing a task. Reading the Profiler trace when you are done will give you a lot of insight into how SQL behaves. You'll catch all kinds of useful commands that you didn't know about.
September 29, 2005 at 8:59 am
If you are still looking for a good admin book, the best I found is SQL Server 2000 DBA Survival Guide by Spenik and Sledge, I also have the book admin 911 SQL Server 2000 by Brian Knight and Microsofts SQL Server 2000 Administrator's Pocket Consultant. Of the three, the Spenik and Sledge book is by far the most usefull.
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply