dbTalk Databases Forums  

SQL2K SP3 Enterprise Manager bug - row count not correct

microsoft.public.sqlserver.tools microsoft.public.sqlserver.tools


Discuss SQL2K SP3 Enterprise Manager bug - row count not correct in the microsoft.public.sqlserver.tools forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Doug Werner
 
Posts: n/a

Default SQL2K SP3 Enterprise Manager bug - row count not correct - 07-01-2003 , 04:17 PM






I've ran into a situation since moving to SQL 2000 SP3
that appears to be a bug when using Enteprise Manager
(EM). If you are looking at Properties of tables (ie;
right clicking on a table and selecting Properties) and
using the row count, the row count may differ than what
you see in Query Analyzer (QA) when using the
statement 'Select count(*) from xxtablename'.

I've had several situations recently when adding rows that
the count doesn't increment on the table using EM, but if
you look thru QA, the count has changed. So far, the QA
values have been the correct ones. In one instance, the
next time I added rows to the table, the EM row count came
up correct. I've done all sorts of refresh things in EM
and even exited EM and came back in and the count was
still not incrementing, so I don't think it's a refresh
issue.

Any solutions or fixes in the works for this would be
appreciated.

Thanks,
Doug Werner
State of Idaho Dept. of Water Resources
208-327-7938


Reply With Quote
  #2  
Old   
Jasper Smith
 
Posts: n/a

Default Re: SQL2K SP3 Enterprise Manager bug - row count not correct - 07-01-2003 , 04:58 PM






The rowcount is based on sysindexes and is not guaranteed
to be up to date. To correct erroneous figures you can use
DBCC UPDATEUSAGE. The only way to guarantee the
number is to run a select count(*) but would you really want
that run every time you looked at a tables properties in EM ?
Have a look at DBCC UPDATEUSAGE in BOL. The actual
procedure used by EM is sp_MStablespace and it gets the rows
from

SELECT @rows = convert(int, rowcnt)
FROM dbo.sysindexes
WHERE indid < 2 and id = @id

--
HTH

Jasper Smith (SQL Server MVP)

I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org

"Doug Werner" <dwerner (AT) idwr (DOT) state.id.us> wrote

I've ran into a situation since moving to SQL 2000 SP3
that appears to be a bug when using Enteprise Manager
(EM). If you are looking at Properties of tables (ie;
right clicking on a table and selecting Properties) and
using the row count, the row count may differ than what
you see in Query Analyzer (QA) when using the
statement 'Select count(*) from xxtablename'.

I've had several situations recently when adding rows that
the count doesn't increment on the table using EM, but if
you look thru QA, the count has changed. So far, the QA
values have been the correct ones. In one instance, the
next time I added rows to the table, the EM row count came
up correct. I've done all sorts of refresh things in EM
and even exited EM and came back in and the count was
still not incrementing, so I don't think it's a refresh
issue.

Any solutions or fixes in the works for this would be
appreciated.

Thanks,
Doug Werner
State of Idaho Dept. of Water Resources
208-327-7938



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.