Sunday, August 1, 2010

How to solve page header corruption cases in MS SQL Server 2008 database

You must have experienced cases of database corruption more often than not. When you face database corruption, you are unable to work further on the database. These instances can occur due to any arbitrary reason. Some of the most prominent ones could be unplanned system
shutdown especially when the database is open, page header corruption, virus infections in the database, etc. You can repair SQL database by using few workarounds. However, if nothing works fine then using a third-party SQL repair software is the best option.

For instance, the following error message appears while you are working on an MS SQL Server 2008 database:

“Table error: alloc unit ID A_ID, page P_ID. The test (TEST) failed. The values are VAL1 and VAL2.”

Cause:

Such problem has happened as a database page, P_ID, has not passed auditing test because of page header corruption. You can refer to the error message where it is clearly shown that the TEST string has failed the test.

Resolution:

In such erroneous situations, you should try to address the issue by performing MDF file repair. For the same purpose, there are the following methods that should be performed, ideally in the exact given order:

Verify the hardware components: You should check the state of the hardware components by the following measures:

Check the SQL Server error logs to verify if there is any hardware related error.

Swap the hardware components to narrow down on the exact hardware error, if any.

Check if the disk controller has enabled write-disk caching. If yes, then take the assistance of the hardware vendor to sort this issue.

Format hard drive and reinstall fresh copy of operating system to get a fresh and clean system.

Reinstate database using backup: If the hardware components are alright, then check the state of the database backup. If it is updated, then replace the database with the backup.

Now, check the database after performing these methods. The problem would not be appearing any more. However, at times the database is so severely damaged that it is not repaired using these methods. In such cases, the use of third-party MDF repair tools is required. These tools repair SQL database without overwriting the actual database thus ensuring safe and secure SQL recovery.

In these situations, the most recommended MDF repair software is Stellar Phoenix SQL Data Recovery that repairs MDF file from any random instance of database corruption. Developed for MDF files in MS SQL Server 7.0, 2000, 2005, and 2008, this MS SQL Server repair utility repairs several database objects such as stored procedures, collations, defaults, triggers, tables, NDF files, etc. In addition, this .MDF repair software is compatible with Windows 7, Server 2008, Vista, Server 2003, XP, and 2000.

Article Source :- http://www.programmersheaven.com/user/markwillium/blog/5740-How-to-solve-page-header-corruption-cases-in-MS-SQL-Server-2008-database/

Saturday, July 3, 2010

Resolving Error 7965 and recovering corrupt database in SQL Server 2000

In SQL Server databases, an Index Allocation Map (IAM) page is a page type that stores the details about the extents, which is a collection of eight pages. These IAM pages are used to navigate through the heap, thereby making the searching process much faster. Well, at times these IAM pages do not exhibit the desired working due to database corruption. Database corruption can occur due to various reasons such as power outages, human errors, damaged hardware components, virus infections, etc. You should find out the cause and the resolution to recover SQL database. If you are not able to recover the database, then you should use a third-party SQL database recovery software to do the needful.

Consider a scenario wherein you encounter the following error message while working on the SQL Server 2000 database:

"Table error: Could not check object ID O_ID, index ID I_ID due to invalid allocation (IAM) page(s)."

Cause:

The root cause of this error message is that one of the IAM pages, which was identified by various Ids, has corrupted.

Resolution:

To resolve this erroneous situation, you should recover SQL database using the following methods, in the given order:

Check the hardware-related reasons: You should check the error log reports to check whether the error has occurred due to malfunctioning hardware components. You can also consider swapping the hardware components to isolate the actual reason for error. You may also consider reformatting the hard disks and reinstalling the operating system to get a fresh system to work on.

For Details Information Check This: http://www.americanchronicle.com/articles/view/166204

Sunday, June 13, 2010

I/O Logical Check Failure Cause SQL Server Database Corruption

Like other databases and files, Microsoft SQL Server database may also come across various corruption issues. The corruption can take place due to various reasons, including the internal database or SQL Server application issues and system related problems. One major system related problem, which can cause MDF (Master Database File) corruption, is I/O logical check failure. In such situations, the database becomes totally inaccessible and you come across severe data loss situations. In order to get your mission critical data back, you need to repair and restore the corrupt database using SQL database recovery solutions.

The I/O logical check failure can be indicated by various error messages, which includes the following one:

“Error 823
I/O error detected during at offset in file ''”

The above error may also occur when SQL Server come across other system errors. After this behavior, SQL Server database become totally unusable. In order to sort out this problem, you need to fix it through SQL recovery methods.

Cause

If the read Windows API (Application Programing Interface) call or writer API call for SQL Server database is successful, but some particular logical checks are unsuccessful. In such cases, error 823 occurs, which resembles the following:

“2003-09-05 16:51:18.90 spid17 Error: 823, Severity: 24,
State: 2
2003-09-05 16:51:18.90 spid17 I/O error (torn page) detected during read at offset 0x00000094004000 in file 'F:\SQLData\mydb.MDF'..”

Resolution

In order to work around this behavior of Microsoft SQL Server database and perform SQL Server recovery, you should first run DBCC CHECKDB utility on the affected or damaged MDF file. Before you try to fix any system related issue with MS SQL Server, you should first check the database and sort out the problems. If DBCC CHECKDB statement fails to detect or fix any error, please check the Application Event Log of Microsoft SQL Server.

If the above method fails to find and fix any errors in Microsoft SQL Server, you need to restore the database from a valid and recent backup to get your valuable data back. In case backup is not available, you have to opt for third-party applications to repair and restore the corrupted MDF file.

The repair mssql applications are particularly designed to methodically scan entire database and extract all inaccessible data from it. The software have read-only approach and simple graphical user interface to ensure safe and easy recovery.

SQL Recovery is the most efficient and powerful utility to ensure absolute recovery in all MDF corruption situations. It works well with Microsoft SQL Server 2008, 2005, and 2000. The software restores all MDF file objects, such as tables, reports, forms, macros, stored procedures, and triggers.

Thursday, June 10, 2010

Rectifying Error 5242 and recovering corrupt database in SQL Server 2008

A page is the most primitive unit of storage in an MS SQL Server database. The memory space allotted to a database file is divided into pages having contiguous address location. An Index Allocation Map (IAM) is a page type that stores the details about the extents used by a table per allocation unit. However, sometimes these pages do not function properly because of database corruption. You should take appropriate corrective measures to recover SQL database. However, if you are not able to restore the database then you should use a third-party SQL recovery software to do the needful for you.

Consider a scenario wherein you encounter the following error message while working on an SQL Server 2008 database table:

“An inconsistency was detected during an internal operation in database '%.*ls'(ID:%d) on page %S_PGID. Please contact technical support. Reference number %ld.”

Cause:

The root cause of this error message is that some inconsistency has occurred in the structure of the database page. It could have happened because of various reasons such as virus infections, abrupt system shutdown, hardware issues, etc.

Resolution:

To resolve this erroneous situation, you should perform either of the following methods, preferably in the given order:

Check for hardware issues: You should check the hardware components and the report logs to check whether the issue has occurred because of any hardware malfunctions. You should also swap the hardware components to isolate the error. Last but not the least, you can also consider reformatting the hard disks and reinstalling the operating system.

Restore from backup: If the issue is not hardware related, then you should check the backup of the database. If it is clean and updated, then restore the database from its backup.

Run DBCC CHECKDB: If the backup is not clean or updated, then you should run the DBCC CHECKDB utility without the repair clause to know the corruption level. Then, you should the run it with the suggested repair clause.

The aforementioned methods should be able to bring about the solution to the problem. However, if you are not able to repair the corrupted database then you should use a third-party SQL database recovery software to do the needful. Such read-only tools are able to recover SQL database using fast yet sophisticated scanning algorithms.

Stellar Phoenix SQL Database Recovery is an MS SQL recovery software that repairs the corrupted databases created in SQL Server 2008, 2005, and 2000. It is able to recover various database objects such as tables, queries, stored procedures, triggers, defaults, etc. In addition, this SQL server repair tool is able to recover the user-defined functions and data types. It is compatible with Windows 7, Vista, Server 2003, XP, and Server 2000.

Wednesday, June 9, 2010

Minimum Repair Option for the SQL Server Database Inconsistency Issues

In Microsoft SQL Server, if any transaction violates the integrity constraints during execution, database inconsistency occurs. The transaction leaves your MS SQL Server database in illegal state and it gets aborted with an error. Database inconsistency leaves your MDF (Master Database File) in an unusable and inaccessible state, which can lead to serious data loss. In such cases, a valid and updated backup come for your rescue. You can easily restore all your valuable data from current backup and prevent needs of SQL recovery using third-party applications.

However, in case you are unable to restore data from the backup or backup is incomplete, you can check the database errors and fix them using inbuilt utility of Microsoft SQL Server, called CHECKDB. It offers you an option to repair the database errors. Database inconsistency may also occur due to system level errors, like file system and hardware. You are highly recommended to fix these errors before repairing the database, else you may face the same problem again after some time.

When you apply DBCC CHECKDB on your MDF file, a suggestion is provided for indicating what minimum repair option is required to fix all errors. Such messages may resemble the following:

“CHECKDB found 0 allocation errors and 15 consistency errors in database 'mydb'.
repair_allow_data_loss is the minimum repair level for the errors found by DBCC CHECKDB (mydb”

The database repair recommendation is minimum degree of repair to try resolving all the errors from DBCC CHECKDB. It doesn't mean that the operation is capable of actually fixing all the errors and recover SQL database. You should also keep in mind that not all the errors reported by DBCC CHECKDB, where repair_allow_data_loss is suggested, cause data loss.

However, some of the database inconsistency errors can cause severe data loss problems. You must run the repair process for determining if solution of a particular error is going to cause data loss. In order to find errors with a specific SQL Server database table, you can try running DBCC CHECKTABLE tool.

In case you run across database corruption and data loss due to any inconsistency error, MS SQL repair becomes need of hour.
You can easily repair and restore damaged MDF file of SQL Server using SQL Server recovery software. The applications use advanced scanning algorithm to provide assured recovery of all your valuable data.

Stellar Phoenix SQL Recovery is the best utility to ensure absolute recovery of inaccessible SQL Server database. The software works well with Microsoft SQL Server 2008, 2005, and 2000. It is capable of restoring all MDF file objects, such as tables, reports, forms, macros, triggers, stored procedures, data types, and constraints.


Article Sources: http://www.articlecat.com/Article/Minimum-Repair-Option-for-the-SQL-Server-Database-Inconsistency-Issues/403169

Thursday, June 3, 2010

How to Resolve 'Error 823' While Accessing SQL Server Database?

Are you getting 'Error 823' while accessing an SQL Server database or modifying the database? Are you getting various database inconsistency errors while querying SQL Server database? Well, the problem may take place if your SQL Server database is either inconsistent or damaged. In such critical situations, you must have a complete backup to restore data from it. However, the situations may become worse if there is no current backup in place. At this point of time, you have to opt for SQL recovery tools to get your valuable data recovered.

You may come across the below errors in Windows Application Event Log or MS SQL Server ERRORLOG while performing any operation on MDF (Master Database File) of SQL Server:

"2010-03-06 22:41:19.55 spid58 Error: 823, Severity: 24, State: 2. 2010-03-06 22:41:19.55 spid58 The operating system returned error 38(Reached the end of the file.) to SQL Server during a read at offset 0x000000a72c0000 in file 'C:\Program Files\Microsoft SQL Server\MSSQL10.SQL2008\MSSQL\DATA\my_db.mdf'. Additional messages in the SQL Server error log and system event log may provide more detail. This is a severe system-level error condition that threatens database integrity and must be corrected immediately. Complete a full database consistency check (DBCC CHECKDB). This error can be caused by many factors; for more information, see SQL Server Books Online."

2009-12-09 04:53:49.170 spid25s Error: 823, Severity: 24, State: 2. 2009-12-09 04:53:49.170 spid25s The operating system returned error 21(The device is not ready.) to SQL Server during a read at offset 0x00000000132000 in file 'D:\tempdb\tempdb_data.mdf'. Additional messages in the SQL Server error log and system event log may provide more detail. This is a severe system-level error condition that threatens database integrity and must be corrected immediately. Complete a full database consistency check (DBCC CHECKDB). This error can be caused by many factors; for more information, see SQL Server Books Online.

Cause:

The Error 823 may occur due to either SQL Server database corruption or I/O errors in the database. The error usually indicates that that there are some inconsistency in file system or the database file is corrupt.

Resolution
:

To recover SQL server database, use any of the below methods:

Run Chkdsk to find file system inconsistency issues and resolve it.

Use DBCC CHECKDB utility to try repairing the damaged database.

If the above methods can not perform MS SQL recovery, You need to use third party applications to repair and restore the damaged database. The MDF Repair software performs safe, quick, easy, and absolute recovery in all MDF corruption situations.

Stellar Phoenix SQL Recovery is the most advanced and efficient utility to ensure absolute recovery of damaged database. The software is designed for Microsoft SQL Server 2008, 2005, and 2000. It restores all the objects of MDF file, such as tables, reports, forms, macros, triggers, constraints, and stored procedures.

Resource taken from: http://www.programmersheaven.com/user/markwillium/blog/5372-How-to-Resolve-Error-823-While-Accessing-SQL-Server-Database/

Wednesday, May 26, 2010

How To - Fix Stored Procedures Corruption in MS SQL Server?

Are you encountering errors while executing stored procedures in Microsoft SQL Server database? Is stored procedure not producing correct outputs? The problem may occur due to corruption of the stored procedures. After corruption, the database may not function correctly and you will need to repair it. In some cases, corrupt stored procedures may even damage the database if they perform improper database functions. In both these cases, you need SQL Database Recovery applications to get your database repaired.
  • Stored Procedure is in fact a set of Transaction- SQL (T-SQL) statements, which are compiled in a single query execution plan. It works like a construct in programming languages. The stored procedure has a number of advantages, such as pre-compiled execution, enhanced security controls, reduced client/server traffic, effective reuse of programming abstraction and code, and many more.
You can use the stored procedure to run a sequence of the SQL statements on conditional logic. If the conditional logic and the SQL statements are written in stored procedures, they become a part of a single execution plan. However, in this case if any of the stored procedure gets damaged, you may come across a number of critical database corruption situations.

Corruption of the stored procedures may degrade the efficiency of MS SQL Server database and produce bad output. The function that needs to be executed using stored procedures might come down. This behavior usually makes the SQL Server database fragile. Stored procedure corruption may be indicated through a number of error message, similar to the following ones:

“Error 0:[SQL-DMO]Object 'dbo.SP_ProcName' was not scripted. It is possible that the information in system table 'syscomments' about the object was corrupt or missing?”

Or

“Incorrect key file ... try to repair it”

SQL Server database stored procedures may occur due to virus infection, improper system shutdown, application malfunction, improper command execution, and many alike. Irrespective of the cause of this problem, data loss occurs and SQL Recovery is required.

You can easily Recover SQL database with the help of third-party SQL Server Recovery applications. They come equipped with highly-advanced and efficient scanning techniques to ensure absolute recovery of damaged SQL database. The software are built-with simple and self-descriptive graphical user interface to provide ease of use.