SQL Server Corrupt Index

siebpeek

New Member
We had a corrupted index last night, I'm wondering if there is appropriate regular maintenance that we should do to prevent this again? I saw something about rebuilding indexes on a regular schedule? Is this true?


What could cause a corrupted index?

Thanks!!
 
Corruption does not occur due to lack of maintenance.

It occurs because of hardware failures, bugs or malfeasance. There are steps you can take to detect and repair, mitigate or work-around corruption depending on the specific details of whatever has happened.
 
There are a number of bugs in certain versions of SQL Server that can cause index corruption. Posting your specific version would help a little :-)

Like Tom says it isn't related to maintenance. Somewhere your DBA should be running DBCC on a semi regular basis to detect corruption of any kind and then determining if it was a hardware error or a SQL Server bug of some kind.
 
Use guide below or next method if you can't restore sql database https://www.repairtoolbox.com/sqlserverrepair.html SQL Server Repair Toolbox

· Click the Windows 2008 "Start" button and select "Control Panel." Click "Add or Remove Programs" to open a list of software installed on your computer. If you have Windows 7, click "Programs" then "Programs and Features."

· Click the software item labeled "SQL Server Management Studio." Click the "Change" button. If you have Windows 7, double-click the icon. This opens an installation wizard.

· Click "Workstation components" and click "Next." Click the "Change Installed

Components" button. This opens a new window. Click "Client Tools" and click "OK." Click the "Next" button.

· Click the "Install" button to reinstall Management Studio. If you are prompted to reboot the machine, click "Restart.
 
There is no need to do any of that for a corrupted index. Rebuilding the index online will fix the corrupted index.

The key is finding out the root cause for the corruption and fixing that.
 
Back
Top