Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 sp_SpaceUsed returns incorrect rowcount
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Ask SQLTeam Question

0 Posts

Posted - 01/13/2005 :  07:54:58  Show Profile  Visit AskSQLTeam's Homepage  Reply with Quote
Steve writes "I have a table that has 360 rows in it. The query 'Select count(*) from tbl_XX returns 360.

When I execute sp_SpaceUsed 'tbl_XX' the rowcnt field is 358.

I exported the table to Excel and there are 360 rows in it.

What could cause this discrepancy? I would have expeced the sp_SpaceUsed stored procedure to also show 360 rows.

I'm using SQL Server 2000 on Windows 2003 Server.


Most Valuable Yak

15732 Posts

Posted - 01/13/2005 :  07:59:01  Show Profile  Visit robvolk's Homepage  Reply with Quote
The row count can be inaccurate unless you run sp_spaceused with the updateusage parameter, or run DBCC UPDATEUSAGE beforehand. Books Online has more information about this.
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2019 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000