Showing posts with label error in sql server. Show all posts
Showing posts with label error in sql server. Show all posts

Thursday, December 30, 2010

Rectifying Error 2537 and Repairing Corrupted MDF File in SQL Server 2008

MS SQL Server is a relational database management system (RDBMS) server that is used by many organizations as backend support. It performs many useful tasks such as defining, modifying, or performing miscellaneous tasks on the database. It uses the.MDF file as its primary database file. However, sometimes the MDF file gets corrupt thereby making the database inaccessible. Such occurrences could happen because of various reasons such as malfunctioning hardware, power outages, virus infections, human errors, etc. In such cases, you should find the cause and apply appropriate method to repair MDF file. If you are not able to do so, then you should use a third-party MDF file repair software to perform.mdf repair.

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

"Table error: Object ID O_ID, index ID I_ID, partition ID PN_ID, alloc unit ID A_ID (type TYPE), page P_ID, row ROW_ID. Record check (CHECK_TEXT) failed. Values are VALUE1 and VALUE2."

Cause:

The root cause for this problematic situation is that the a column in the row has not cleared the condition in the CHECK_TEXT statement.

Resolution:

To resolve the issue, you should to perform the following methods, in the given order:

Look for hardware issues: You should check the hardware settings and run hardware diagnostics to ascertain if there is any hardware problem. You can also check the error logs to get the cause of the error. In addition, you can consider reformatting the hard disks and reinstalling the operating system.

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

Run DBCC CHECKDB: You should run the DBCC CHECKDB command without any repair clause to determine the corruption level. Then, run this command again with the suggested clause. However, if you are not sure about using this command then you should not use it.

The aforementioned methods would be able to solve the problem. However, at times it may happen that the error reappears or does not get solved in the first place. In such cases, you should use a third-party MDF repair software to solve the issue. Such MDF file repair tools are able to repair MDF file without overwriting the existing file.

Stellar SQL Recovery is an MDF file repair software that is able to repair MDF files from all instances of corruption. It repairs corrupted MDF files created in SQL Server 2000, 2005, and 2008. This MDF repair tool is capable of recovering various database components such as tables, stored procedures, queries, triggers, etc. It is compatible with Windows 7, Vista, Server 2003, XP, and 2000.
Article Source: http://www.articlesbase.com/data-recovery-articles/rectifying-error-2537-and-repairing-corrupted-mdf-file-in-sql-server-2008-3904002.html

About the Author

Mark Willium is a database expert doing research on sql recovery software. For more details visit: http://www.stellarsqldatabaserecovery.com/
»»  Read More...

Tuesday, December 21, 2010

How to Restore SQL Server Database When DBCC CHECKDB Fail?

We have a client who uses Microsoft Dynamics NAV with a SQL 2005 database. Six days ago they started getting consistency errors in their database. We had restore from the last updated backup, and that seemed to fix the issue.

Yesterday they again started getting consistency errors in different area of the database. After everyone was off, I ran a DBCC CHECKDB command on the database with REPAIR_ALLOW_DATALOSS (the minimum level stated in the first CHECKDB I ran), and it failed to restore.

Here is a partial list of the results;

DBCC results for 'NAVSQL'.
Service Broker Msg 9675, State 1: Message Types analyzed: 14.
Service Broker Msg 9676, State 1: Service Contracts analyzed: 6.
Service Broker Msg 9667, State 1: Services analyzed: 3.
Service Broker Msg 9668, State 1: Service Queues analyzed: 3.
Service Broker Msg 9669, State 1: Conversation Endpoints analyzed: 0.
Service Broker Msg 9674, State 1: Conversation Groups analyzed: 0.
Service Broker Msg 9670, State 1: Remote Service Bindings analyzed: 0.
Msg 8909, Level 16, State 1, Line 1
Table error: Object ID 0, index ID -1, partition ID 0, alloc unit ID 281498259750912 (type Unknown), page ID (3:2179484) contains an incorrect page ID in its page header. The PageId in the page header = (8192:65536).
Repairing this error requires other errors to be corrected first.
Msg 8939, Level 16, State 98, Line 1
Table error: Object ID 0, index ID -1, partition ID 0, alloc unit ID 3906872676743905280 (type Unknown), page (34749:0). Test (IS_OFF (BUF_IOERR, pBUF->bstat)) failed. Values are 46139657 and -4.
The repair level on the DBCC statement caused this repair to be bypassed.
Msg 8909, Level 16, State 1, Line 1
Table error: Object ID 0, index ID -1, partition ID 0, alloc unit ID 5641040008258584576 (type Unknown), page ID (4:675855) contains an incorrect page ID in its page header. The PageId in the page header = (256:10150144).
Repairing this error requires other errors to be corrected first.
CHECKDB found 0 allocation errors and 3 consistency errors not associated with any single object.
DBCC results for 'sys.sysrowsetcolumns'.
There are 32308 rows in 186 pages for object "sys.sysrowsetcolumns".

...

CHECKDB found 0 allocation errors and 44 consistency errors in database 'NAVSQL'.
DBCC execution completed. If DBCC printed error messages, contact your system administrator.

At last we used stellar sql recovery software to fix the problem. Stellar SQL recovery software is an advanced tool that repair and recover corrupted sql server database. This software is compatible with window 7.
»»  Read More...

Wednesday, October 27, 2010

How to recover MDF file when you encounter Error 8910 in MS SQL Server 2000

Are you getting error messages repeatedly while working on a particular database in MS SQL Server 2000? If yes, then you should check the exact cause of these messages as there may be chances of database corruption. The database corruption can happen due to various reasons including virus infections, malfunctioning of the hardware components, abrupt or unplanned system shutdown while the database is open, etc, which could even make the database inaccessibile. In such cases, you should look for MDF file recovery using appropriate corrective methods, failing which you must use a third-party MS SQL Server recovery software to do the needful.

Let us consider a situation in which you are getting the following error message while working on an MS SQL Server 2000 database:

"Page P_ID in database ID DB_ID is allocated to both object ID O_ID1, index ID I_ID1, and object ID O_ID2, index ID I_ID2."


Cause
:

The most prominent reason behind this error is that the index definitions in the IAM pages have damaged.

Resolution:

To perform MDF recovery of the damaged SQL database, you should perform either of the following methods, ideally in the given sequence:

Address hardware related issues: It may be possible that the error is occurring due to hardware corruption, which can be resolved using the following measures:

Fixing the issues that appear after running hardware diagnostics.
Swapping the hardware components to isolate the exact reason and fixing it.
Checking the Windows application log and the SQL Server error log to find out whether the error has occurred due to hardware malfunctioning.
Checking if the hard disk has write-caching enabled. If yes, then contact the hardware vendor to replace the hard disk.

Restore from database: You should check the state of the database backup. If it is updated and clean, then you should restore the database with its backup.

Run DBCC CHECKDB: If the backup is not clean, then you should run the DBCC CHECKDB tool with the suggested repair clause to recover MDF file.

If these aforementioned methods are unable to address the situation, then you would need to take the services of a third-party master database file recovery software. With the use of read-only recovery mechanisms, these SQL recovery tools ensure that no type of data is lost or damaged during the recovery.

In such cases, I would recommend you to use Stellar Phoenix SQL Data Recovery, which recovers SQL databases created in MS SQL Server 7.0, 2000, 2005, and 2008. Performing .MDF recovery by recovering databases components including NDF files, stored procedures, tables, defaults, triggers, etc, this SQL database recovery software is compatible with Windows 7, Server 2008, Vista, Server 2003, XP, and 2000.
»»  Read More...

Wednesday, October 13, 2010

Recover SQL server database from error or corruption


All the rows of table in the SQL server database are divided into partitions that are represented by number from 1 to n. By default SQL server consider all rows are in a single partition. All the rows of table partition are stored in heap structure or Binary tree. Leaves are used to store the data. The data stored in leaf nodes of leaves are called text data node and other nodes are called text index nodes. Text index nodes are used to store index values for leaf node. Sometimes, you observe that mismatch between the child nodes and their corresponding parents nodes that result table inconsistency. At that time you will be unable to access your database and got an error message. For recovering this situation you need an advanced SQL recovery software to fix the problem.

Given below an error message you might encounter with your SQL database table:

Server: Msg 8961 , Level 23, State

Table error: Object ID O_ID. The text, ntext, or image node at page P_ID1, slot S_ID1, text ID TEXT_ID does not match its reference from page P_ID2, slot S_ID2.

Where, ‘state_number’ might be 1, 2 or 4.

Causes:

The main cuase of this error is mismatch between the childs node and their corresponding parents nodes. Corruption in the text object may be also the couse of error. If you want to know the exact cause for this error message then used state_number which is displaying.

State 1: This situation occurs when timestamps in child node and parent node don’t match.

State 2: This Situation occurs when the size of child node is greater than its parent node.

State 4: This situation occurs when the level of child node is different from what is supposed by its parent node.

Resolutions:

For solving such type of error message, you should follow the given below steps:

• Fix the hardware problem, if any.

• Restore database from last updated backup, if backup is updated available.

• Run DBCC CHECKDB command without repair clause if backup is not available. Again run DBCC CHECKDB but this time with the repair clause.

After performing all the above steps and still you will unable to access your sql database, i will suggest you to use any third party sql recovery software to fix the problem.

Stellar SQL Database Recovery software is a premier tool to repair corrupted SQL server databases. This software is comfortable with the SQL Server 2008, 2005 and 2000. This recovery software repairs primary (MDF) as well as secondary (NDF) files in sql server database.
»»  Read More...