How to Repair Corrupt SQL Database & Recover Data from MDF Files

Have you ever met similar experience with your SQL Server: you are unable to access a MDF file that contains many useful records. And it just pops out some wired error messages. After running either the dbcc checkdb command or the dbcc checktable command, it is confirmed that SQL database corruption has occurred with your current using SQL Server 2000/2005/2008 etc. The situation can happen if your SQL has just suffered server errors, database damage, hardware problems, virus attack etc. See possible causes and repair solutions below.

Typical Symptoms
  • Extent E_ID in database ID DB_ID is allocated in both GAM GAM_P_ID and SGAM SGAM_P_ID.
  • Table error: Object ID O_ID, index ID I_ID, page P_ID, row ROW_ID. Record check (CHECK_TEXT) failed. Values are VALUE1 and VALUE2
  • Database corruption occurs after you run the "alter table" Transact-SQL command to change a column from not null to null in Microsoft SQL Server 2000 
  • A database is marked as suspect and the database becomes unavailable. 
  • Database error: PAGE_TYPE page P_ID for database 'NAME' (database ID DB_ID) is invalid. 
  • And more strange error hints.

Possible Causes
  • Corruption in the extents due to the irregularities in the IAM, GAM, and SGAM pages. 
  • A condition specified in the CHECK_TEXT statement could not be fulfilled. 
  • The database table is logically or physically damaged. 
  • SQL Server does not synchronize column status between the syscolumns system table and the sysindexes system table. A column is part of a clustered index key that may be null.
  • Either the file header page or the boot page is damaged in the mentioned database.
  • And more reasons out there.

Resolutions
  1. To solve the problems, first of all check if you have backup. If updated SQL database backup is available, then the issue can be resolved easily, try to restore the data from your previously taken valid backup.
  2. If you don't have a backup, make sure that the database is online. Then run the dbcc dbreindex command or the dbcc checktable command by using the repair_rebuild option. If the database is marked as suspect, telephone Microsoft Customer Support Services as Microsoft has confirmed that this is a problem in the its products.
  3. If that still won't help, then the last option is by relying on a SQL recovery tool to repair SQL database and recover the data back.

Speed up Your Slow Laptop with These Free Software & Tips




With the passage of time, is your laptop running much slower than it used to? Symptoms such as taking longer to start up , sluggish while running applications, browser (IE, Firefox, Google Chrome, Opera, etc) very slow to load web pages, or the laptop just freezes for no reasons?

Actually I did experience some of the situations with my HP Pavilion G4 laptop during the past year. Is there any feasible ways to speed up slow laptop computers? Today, I'd like to share with you some of my personal thoughts.

Also read: how to fix a slow HP Mini netbook.

Possible Causes


  • Outdated hardware configuration. If you are using some low-level or second-hand laptop, there are assortments of things that can happen to your hardware such as CPU, RAM etc that may deep disturb laptop performance.
  • Overload startup programs. Generally as you add additional programs on your laptop, they can slow down your start-up status quietly. The more programs you have that are loading at start-up, the slower the start-up. 
  • Corrupted registry issues. The Windows registry is the master control center for your operating system and the applications it runs. Corrupted registry could cause a lot of errors and issues, especially when you are running certain applications. 
  • Remnants of uninstalled applications. It's easy to install a new program on laptop, but usually not the case when you attempt to 'completely' get rid of them. 
  • Too many junk junks. Each time you create or save new files, surf the net or chat with friends etc, your laptop hard drive could be crammed with many useless files left behind quickly. These can take up a large amount of precious disk space.
  • Poor security software. A lot of security programs or suites are bloated with software and demand a great deal of system resource and memory.

Tips to speed it up

  1. Upgrade your hardware (RAM, hard drive) if possible, this is the by far the most effective way to get rid of laptop running slow problems.
  2. Choose a good system protection or antivirus program. The idea one should be with strong protection capability, as well as lightweighted i.e. taking less system resources.
  3. Regularly clean the junks, caches, recycle bin files & remove unwanted startup programs from 'Control Panel'. 
  4. See additional tips to speed up a Windows based laptop.
Free software you can use

CCleaner – the most popular registry clean app for Windows users to free up more valuable hard disk space for storing new data by cleaning traces of your online activities such as your Internet history. Moreover, it’s more than a laptop clean utility. There are some more fantastic features you may find quite useful too. Learn more from this article I wrote a while ago.

Galary Utilities – The No. 1 Free, Powerful and All-in-one utility for cleaning your PC, it is a comprehensive pc system care utility as well as a laptop speedup program. One-click to diagnose your slow laptop problems and help improve its performance by many ways such ejects dangerous Malware, fix system errors, clean up clutter, optimize your laptop's memory.

[update on March 28, 2016: this post intends to target laptops based on Windows opearting system. If you are using a Mac laptop, check out the 7 ways to speed up a MacBook, it's an excellent resource.]

Do you find these tips or software helpful? Do they work to help you speed up your slow laptop? Leave a comment and share your experience.