Wednesday, June 3, 2009

Data Corruption in SQL Server and MDF Recovery

In MS SQL Server, you use SQL Server Management Studio (SSMS) to query character data from the database which uses non-Unicode data type. For example, the SQL Server uses the char, varchar or the text data type.

The code page of client computer differs from code page of database. In such situation, the character data may be represented incorrectly. For instance, you may face any of the following issues:

The characters are represented as the question mark. You may come across this matter if you have updated character data as non-Unicode data type earlier to querying character data.

The characters are represented as corrupted. The characters of code page X are stored in code page Y in non-Unicode column. Furthermore, the characters are not translated.

In such circumstances, the MDF file gets corrupted and they are not accessible and might lead to data loss.

Reasons of the trouble:

This breakdown occurs as characters of code page are stored in non-Unicode column of page B. In addition, the characters are not translated properly.

When using the string literal of non-Unicode data type in SQL Server, the string literal is changed by using the default code page of the database. Storing the character data of code page in a column of Y code page might result into database corruption and data loss.

Resolution:

To prevent database corruption and work around this issue, you may try the following:
  • Use binary or varbinary data type
  • Use appropriate collation for SQL database
  • Use a Unicode data type in place of non-Unicode data type
  • Use a diverse tool for storing and accessing data and disable data Translate parameter
These fixes will stop the database corruption but won’t be able to repair the corrupted database. To repair the corrupted database you need to use SQL recovery software.

Stellar Phoenix SQL database recovery software is the wonderful MDF repair software that uses the most powerful scanning mechanism for SQL repair. The user interface of this SQL recovery software is enormously interactive and effortless and doesn’t need any sound technical knowledge to carry out MDF recovery.

0 comments:

Post a Comment