| Tables of SQL Server database can be checked | | | | occurs with state 9, it occurs when free space |
| for consistency by running DBCC CHECKTABLE. | | | | offset is incorrectly aligned, while in case of state |
| An administrator requires to take immediate MDF | | | | 102, this occurs when record is incorrectly aligned. |
| Recovery (SQL uses .mdf file extension to store | | | | User Action |
| its database) actions on encountering any issues | | | | Perform hardware diagnostics and isolate the |
| with database table. Failing to do so might | | | | related issues, if any. To do so, you can check |
| exaggerate the problems further. | | | | SQL Server error log, application logs, and |
| After a general overview, here is a specific | | | | Windows system logs. If corruption seems to |
| problem that will help you comprehend the | | | | occur repeatedly, try changing different hardware |
| problem. Let's say, you as an SQL Server | | | | components. |
| administrator experiences some database access | | | | If hardware problems is not the case, restore the |
| related issues that doubt database corruption. On | | | | database from your previous clean data backup. |
| running consistency check on the database | | | | In case no suitable backup is present, run DBCC |
| table(s) using DBCC CHECKTABLE command, this | | | | CHECKDB and determine the repair clause. Now |
| returns the below or similar error message: | | | | execute the same command with the suggested |
| Table error: Object ID O_ID, index ID I_ID, page | | | | repair clause. Doing so can even delete your data |
| P_ID. Test (TEST) failed. Address 0xADDRESS is | | | | or cause more damages, so it is recommended |
| not aligned. | | | | to backup your database prior running this |
| Depending on the exact cause, this specific error | | | | command. |
| occurs in two states: State 9 and State 102. | | | | If database cannot be repaired by DBCC repair |
| Explanation | | | | command, use a third-party.mdf Recovery |
| This type of corruption is likely to occur because | | | | software to scan and repair the database. An |
| of hardware reasons. As the error suggests, a | | | | MDF Recovery utility can be easily operated and |
| structure defined at ADDRESS doesn't exists in | | | | can repair the corrupted SQL Server database, |
| expected 4-byte aligned condition. If this error | | | | irrespective of the nature of corruption. |