Friday, April 30, 2010

SQL Server Instance Does Not Start After Restoring Model System Database

Microsoft SQL Server holds a set of the system database that are required for options of Microsoft SQL Server instance. You should backup the system database after each critical update, to prevent database corruption. The system database backup must include model, master, and msdb. You can restore Microsoft SQL Server easily from backup, in the event of the system failure. However, in some situations, the SQL Server's MDF (Master Database File) file may become completely inaccessible after you restore a model system database from backup. It leads to critical data loss situations and requires SQL Database Recovery to work around the problem if backup is not updated.

In a practical scenario, you may not start an instance of SQL Server successfully, when you attempt to initialize any instance of MS SQL Server after restoring model system database using 'WITH NORECOVERY' option. Furthermore, you may come across the below error message in the application error log of Microsoft SQL Server at the same time:

“2003-04-18 09:37:38.85 spid5 Starting up database 'model'.
2003-04-18 09:37:39.24 spid5 Bypassing recovery for database 'model' because it is marked IN LOAD. 2003-04-18 09:37:39.65 spid5 Database 'model' cannot be opened. It is in the middle of a restore.”

This behavior of Microsoft SQL Server renders entire MDF database file inaccessible and serious data loss occurs. To retrieve data from affected database, you need to Repair SQL Server database file by fixing this problem.

Root of the problem

When the model system database is restored using 'WITH NORECOVERY' option, restore options leaves your SQL Server model database in unrecovered state. Thus, you can no longer use the model system database as expected. Due to the same, SQL Server may not function effectively.

Resolution

To sort out this behavior, clear 'Loading' status of model system database in instance of Microsoft SQL Server. In case the SQL Server database is severely damaged and model database is also affected, reinstall SQL Server application and restore database from updated backup.

If you do not have backup, use third-party MS SQL Recovery software to repair and restore the database into accessible and working state. The SQL Recovery applications use advanced scanning algorithms to systematically scan whole database and extract all inaccessible objects from it.

SQL Recovery is a powerful, yet easy to use and safe utility to ensure absolute recovery in all SQL Server database corruption scenarios. The software works well with Microsoft SQL Server 2008, 2005, and 2000. It restores all MDF file objects, such as tables, reports, forms, macros, constraints, stored procedures, and triggers.

Wednesday, April 28, 2010

Recovering Error 2575 in SQL Server 2008

A page is the most basic unit of storage in SQL Server. The memory space allotted to a database file is divided into pages having contiguous address location. And these pages are, in turn, stored in extents, which are a collection of eight contiguous pages. The role of the extents is to effectively manage the pages. An Index Allocation Map (IAM) is a page type that stores the details about the extents used by a table per allocation unit. These are also used by SQL Server to traverse through a heap to locate the available space for new rows. However, sometimes these IAM pages do not function properly because of corrupted databases. A database can become corrupt because of virus infections, human errors, faulty hardware, power outages, etc. In such cases, you should consider taking appropriate measures to recover the database. However, if you are not able to repair the database then you should use a third-party application for MS SQL Recovery.

Consider a scenario wherein you receive the following error message when you try to mount your SQL Server 2008 database.

“IAM page P_ID1 is pointed to by the next pointer of IAM page P_ID2 in object ID O_ID, index ID I_ID, partition ID PN_ID, alloc unit ID A_ID (type TYPE) but was not detected in the scan.”

The error message states that the IAM page was found for the current index but it was not found for the next-page pointer.

Cause:
There could be two possible reasons for the aforementioned error message, either the reference of the metadata file missing or the header of the IAM page is corrupt. Because of this, the database has gone corrupt.

Resolution:
To resolve the issue, you can perform the following measures:
Look for hardware failures: Do check if this error is because of faulty hardware. Run hardware diagnostics and check the error logs and rectify the hardware-related errors, if any. You should also look to swap different hardware components if the database is getting corrupt frequently. Also, you can also contemplate using a new hardware system. However, this would mean formatting the hard disk and reinstalling the operating system, which is not required as it would erase the database as well.
Replace the corrupted database with a clean backup.
Run DBCC CHECKDB command without a repair clause to check the extent of the corruption. Then, run it again with the appropriate repair clause after determining it.

However, if you are still not able to repair the corrupted database then you should use a third-party SQL Server recovery application to recover SQL database. Such read-only tools perform SQL Recovery using fast yet sophisticated scanning algorithms without overwriting the damaged area.

SQL Recovery software is a robust tool that enables you to execute SQL recovery on corrupted SQL database components such as tables, defaults, stored procedures, triggers, views, and rules. It is also able to repair the database constraints such as primary key, foreign key, unique key, and check. The MS SQL recovery utility recovers corrupted databases that were originally created in MS SQL Server 2000, 2005, and 2008. The software is compatible with Windows 7, Vista, Server 2003, XP, and 2000.

Tuesday, April 27, 2010

Recovering corrupt index in SQL Server 2008 – Error 2530

MS SQL Server uses indexes to quickly find the records when a query is executed. Actually the SQL Server uses the index in a similar way as you would read a book. If you want to search a particular topic, you do not have to traverse each and every page. You would just look for it in the index and open the page/section directly. Following the same pattern, an index has got keys that are built from one or more columns in the table and pointers that refer to the storage location of the queried data. Well-defined indexes can improve the system performance remarkably as the amount of data that is read to fetch the query result. However, at times the index can get disabled because of various reasons such as power surges, virus infections, human errors, etc. In such cases, you should consider taking appropriate actions to resolve the issue. However, if you are not able to address the issue then you should use a third-party SQL Database Recovery tool to repair SQL database.

Consider a scenario wherein you are working on SQL Server 2008 system when you encounter the following error message:
“The index "%.*ls" on table "%.*ls" is disabled.”

Cause:
This error message is displayed when the index is disabled. The DBCC command cannot proceed when the index is disabled. There could be following reasons for this:
You have disabled the index manually by using ALTER INDEX.
The index is disabled as the database is corrupt.

Resolution:
To resolve this error message, you need to either rebuild it or drop it and recreate it. To do this, you can perform the following methods:
1.First of all, enable the index by using either of the following methods:
ALTER INDEX statement with the REBUILD clause
CREATE INDEX with the DROP_EXISTING clause
DBCC DBREINDEX
2.Rerun the DBCC command.

However, if you still are not able to address the issue, it means that the database is corrupt. In such a case, you should consider using a third-party SQL repair application to SQL Recovery. Such read-only tools repair SQL databases without overwriting the original data.

SQL Recovery software is a robust tool that enables you to repair and restore database components such as tables, defaults, stored procedures, triggers, views, and rules. It is able to perform mdf repair for the databases created in SQL Server 2000, 2005, and 2008. It can also recover index, database constraints, user-defined functions, and user-defined data types. It is compatible with Windows 7, Vista, Server 2003, XP, and 2000.

Resolving 8905 and 8924 DBCC CHECKDB Failure Errors

To resolve logical damages in MS SQL Server database, an easy way followed by most database users is to execute DBCC CHECKB (with appropriate repair clause). This command after checking the logical and physical integrity of the database, repairs the database to the maximum possible level. However, if the command fails to repair, then it displays a severity level (either 10 or 16) error message(s). This error message helps the user identify the exact cause of database corruption. After any of the above error message(s) appears, the data saved in the database becomes inaccessible. To access the records in such cases, the user needs to restore the database records from an updated backup. But, in case no backup is available or backup falls short of restoring the database records, the database users need to repair the database using an efficient SQL Database Recovery application.

The above scenario can be explained with the help of the below error message:

“Server: Msg 8905, Level 16, State 1, Line 1
Extent (1:886000) in database ID 37 is marked allocated in the GAM, but no SGAM or IAM has allocated it.
Server: Msg 8905, Level 16, State 1, Line 1
Extent (1:886112) in database ID 37 is marked allocated in the GAM, but no SGAM or IAM has allocated it.

Repairing this error requires other errors to be corrected first.
Repairing this error requires other errors to be corrected first.
Repairing this error requires other errors to be corrected first.
...”

This error message appears when the user executes a DBCC CHECKDB command to repair his/her logically corrupted SQL Server 2000 database. Additionally, the same error message appears every time you try to repair your database.

Cause:

The above error message appears when the SQL Server 2000 database corruption is beyond the repair capabilities of DBCC CHECKDB command.

Resolution:

To resolve the above error message and to access the database records, the user needs to follow the below steps:

Restore database from an updated, valid, and complete backup.
Use a third-party SQL Database Repair application in case no backup is available. A commercial MS SQL Recovery utility can repair any logically damaged database, even if it cannot be repaired by DBCC CHECKDB command.

Stellar Phoenix SQL Recovery repairs MS SQL Server 2008, 20005, and 2000 database damaged due to logical crash. The SQL Repair tool is absolutely safe. It can be installed on Windows 7, Vista, 2008, XP, 2003, and 2000.

Sunday, April 25, 2010

DBCC CHECKTABLE Doesn't Work on a Table That Has Corrupted Indexes

Microsoft SQL Server stores all your valuable data in the MDF (Master Database File) in the form of tables. You can access data from the SQL Server database tables, using SQL queries. Under some circumstances, the database tables become inconsistent and you cannot access data from it. This behavior of MS SQL Server leads to significant data loss situations. At this point of time, you must have absolute backup of the database to restore the data from. However, if the backup is not available or not updated, you are required to use MS SQL Recovery applications to extract inaccessible data.

When you run the DBCC CHECKTABLE command on MS SQL Server database table to check the consistency and integrity of the table, you may come across the below error message:

“[Microsoft][ODBC SQL Server Driver][Named Pipes]ConnectionCheckForData (PeekNamedPipe()).
[Microsoft][ODBC SQL Server Driver][Named Pipes]Connection broken.”

The table checking gets terminated with this error. The error message occurs in the SQL Server database table, which has damaged indexes. The table remains inaccessible after this error message and you need to Recover SQL database to extract data.

DBCC CHECKTABLE is an in-built command-line utility in Microsoft SQL Server, which is used for checking the consistency and integrity of all structures and pages, which make up the indexed view or table.

Cause

You may come across this behavior of Microsoft SQL Server due to severe corruption in the SQL Server database table. The table corruption may occur due to numerous reasons, such as virus infection, application malfunction, unexpected system shutdown, hardware problems, operating system malfunction, and more.

Resolution

Try out the below steps to sort out this problem:

Obtain the latest service pack of Microsoft SQL Server. It helps you to prevent this problem from being occurred in future.
Drop all the automatically created statistics.
Restore SQL Server database from the most recent backup.
Repair and restore the damaged SQL Server database using powerful and advanced third-party applications, known as SQL Server Recovery software.

The SQL Server Recovery applications are particularly designed to carry out in-depth scan of entire SQL Server database using high-end scanning techniques and extract all inaccessible data from it. The software has read-only conduct and rich graphical user interface to ensure quick, safe, and easy recovery in all cases of SQL Server database corruption.

SQL Recovery software repairs and restores Microsoft SQL Server database in an absolute way. The software works well with Microsoft SQL Server 2008, 2005, and 2000. It restores all damaged objects of Microsoft SQL Server database, such as tables, reports, forms, macros, view, constraints, triggers, and stored procedures.

Thursday, April 22, 2010

Recovering SQL database from the Error: 0x80004005 E_FAIL Minor error

Those of you who are working with SQL Server database in your organization must be knowing how the database grows with time. The database files can grow quickly, which sometimes hampers the performance of the system. Moreover, the internal structure of the database may get fragmented with time that eventually result in wastage of the disk space. To remove the fragments and make the system faster, you should use Compact and Repair utility in SQL Server. However, sometimes when you try to access the database, it does not open as intended and throws some error message. In such cases, you should take appropriate measures to address the issue. It may be possible that the database is corrupt. Then, you should replace it with updated backup. And if the backup is not available, then you should consider using a third-party SQL Recovery tool.

Consider a scenario wherein you are working on a database and you have tried to open a connection in the Query Analyzer. The connection fails and an error message is displayed, that is:

“Error: 0x80004005 E_FAIL
Minor Error: (25017)
Description: Unspecified Error”

A Microsoft embedded Visual Basic (eVB) application that uses CompactDatabase method is not able to compact a corrupted SQL Server CE database.

Cause:

The root cause for this error message is that the database that you are trying to compact is corrupt. This can be inferred from the fact that when CompactDatabase utility is used, the ActiveX code tries to initialize the source database before compacting it. If the initialize fails, CompactDatabase aborts. Hence, you cannot use CompactDatabase on a corrupted database because the Initialize method on a corrupted database always fails.

Resolution:

To resolve this issue and recover SQL database, you should obtain the latest service pack for Microsoft SQL Server 2000 Windows CE Edition. If the issue is not resolved, you should use a third-party SQL Database Recovery tool. Such tools employ fast yet sophisticated algorithms to scan damaged area for performing MS SQL recovery.

SQL Recovery software is an efficient tool that can perform SQL server recovery on the databases created in MS SQL Server 2008, 2005, 2000. It is able to recover various database components such as identity, rules, tables, indexes, defaults, stored procedures. This SQL recovery tool can also recover database constraints such as primary key, foreign key, unique key, check, etc. It is compatible with Windows 7, Vista, 2003 Server, XP, 2000.

Wednesday, April 21, 2010

Recovering database from corrupt filegroups in SQL Server – Error 2522

If you are a database backend user in your organization, then you must be knowing how the size of the database increases immensely within a span of a few months. If yours is a growing organization, then the issue gets even more aggravated as you have to regularly maintain the database. For this purpose, SQL Server 2005 provides various options to support database growth. One of them is creating a filegroup that can loosely be termed as a logical storage unit containing the database objects that map to a file system file or multiple files. In this, additional disk drives are allocated to support estimated growth of the database. Then, the additional files can be shifted to these filegroups to spread the I/O over additional disks. However, even the filegroups-supported database can get corrupt due to various reasons. In such cases, you should replace corrupt database with its updated backup. However, if the backup is not available then you should consider using a SQL Database Recovery tool.

Consider a scenario wherein you have received the following error message when you open the SQL database:
“Unable to process index I_NAME of table O_NAME because filegroup F_NAME is invalid.”

The aforementioned message states that the index cannot be checked as one of the filegroup IDs, which is stored in the index metadata, does not exist.

Cause:
The root cause of this error message is that the filegroup IDs stored in the metadata for an index do not exist so that index can not be checked. It may be possible that the database is corrupt.

Resolution:
To start off, you should check whether this error message is because of some hardware failures. You should run the hardware diagnostics, check the SQL Server error log, etc. If the error is not hardware-related then you should replace the database with an updated backup. However, if you do not have the backup then you should consider using a third-party SQL Server recovery tool to Recover SQL database.

SQL Recovery software is a robust tool that can perform SQL recovery on the databases created in MS SQL Server 2008, 2005, 2000. It employs fast and complex algorithms to scan the damaged area to repair the databases. The SQL database recovery tool is able to recover various database components such as identity, rules, tables, indexes, defaults, stored procedures. It can also recover database constraints such as primary key, foreign key, unique key, check, etc. It is compatible with Windows 7, Vista, 2003 Server, XP, 2000.