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

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Index Problem

Author  Topic 

sandesh_moghe
Constraint Violating Yak Guru

310 Posts

Posted - 2003-09-06 : 01:31:03
Hi,
One of our server is become very slow. When i checked DBCC SHOWCONTIG, i found that for lot of tables
- Logical Scan Fragmentation ..................: 21.05%
- Extent Scan Fragmentation ...................: 75.00%
or even more for extent scan.

So i tried to repair the indexes with following command for some high trafic tables.

dbcc dbrepair(BEACURRENTMEMBERS, repairindex, cume_curr_fina, 1)

This is giving me error like

Server: Msg 602, Level 21, State 13, Line 1
Could not find row in sysindexes for database ID 11, object ID 645577338, index ID 1. Run DBCC CHECKTABLE on sysindexes.

Connection Broken


How to recover it?

Thanx in advance.

---------------------------
Sandesh - The Messanger

Stoad
Freaky Yak Linguist

1983 Posts

Posted - 2003-09-06 : 16:18:08
Why should you namely repair indexes? Are they damaged?
And what is that dbcc dbrepair(...)? In my BOL for 7.0 ver. I see only:

DBCC DBREPAIR (T-SQL)
Drops a damaged database.

And how about DBCC DBREINDEX and UPDATE STATISTICS?
And have you Run DBCC CHECKTABLE on sysindexes?
Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2003-09-06 : 19:23:39
Which version are you using?

Where did you find the command? It is undocumented - used by the undocumented sp_fixindex.


==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

sandesh_moghe
Constraint Violating Yak Guru

310 Posts

Posted - 2003-09-07 : 22:22:25
I got this command from following thread.
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=28393

Also, if i run this following command


DBCC SHOWCONTIG WITH TABLERESULTS, ALL_INDEXES


It gives me lot of records with indexid as 0. What does it mean?

If i check DBCC CHECKTABLE (sysindexes), it gives me

DBCC results for 'sysindexes'.
There are 1329 rows in 66 pages for object 'sysindexes'.
DBCC execution completed. If DBCC printed error messages, contact your system administrator.


Please guide me... where it is going wrong, which made my database very slow?

---------------------------
Sandesh - The Messanger
Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2003-09-08 : 02:49:55
indid 0 is for a heap, this is set to 1 for a clustered index (or the other way round) each table has a sysindexes entry with indid 0 or 1 but not both.

To defragment indexes just use dbcc reindex.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -