December 11, 2007 at 9:57 pm
Hi i just noticed something in our server. When i double click a table in Enterprise Manager ist says that there are 20185 rows in that table but when i query select count(*) from table_name it displays 20188 rows are in the table why are they different?? what can be the cause of it??
"-=Still Learning=-"
Lester Policarpio
December 12, 2007 at 3:40 am
WHen you double-click a table in EM you call a stored procedure which uses the rowcnt column in the sysindexes table, while your query in QA does an actual count of the records.
I don't know exactly under which circumstances the rowcnt value in sysindexes is different from the actual count but I've seen it before. My guess is that it has something to do with updating statistics or rather outdated statistics.
[font="Verdana"]Markus Bohse[/font]
December 12, 2007 at 6:04 pm
Thanks Markus what is more reliable the EM or QA?? The reason why i am asking is that We have a Server with 2 mdf and 2 ldf and we want to make it just 1 mdf and ldf in my test servers i used dts to transfer all the files from server A to server B. stored procedures and views are copied (with errors) the error is that 1 view and sp is not copied the solution i made is to detect the uncopied view and sp then copy it to server B (is this correc?). As for the tables, all tables, indexes are copied but when i run row count server B is not equal to server A did i do something wrong when transferring tables and table data??
NOTE: I already run exec sp_updatestats but just as same as the first result.. I just want to conrfim that the tables as well as indexes and other related data are all copied..
"-=Still Learning=-"
Lester Policarpio
December 12, 2007 at 9:08 pm
If you rebuild your indexes, then it should update the count in sysindexes.
For transferring data, use a consistent method, and I'd select using a query from QA.
December 12, 2007 at 11:57 pm
Thanks.. So you mean QA is more reliable in terms of transferring data than using DTS??? It is more reliable to creata all the tables then use a script to insert all data from the old to the new server??
"-=Still Learning=-"
Lester Policarpio
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply