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

Thursday, December 23, 2010

How to overcome Error 8921 in MS SQL Server 2000 database

In MS SQL Server, the CHECKTABLE command is used to check the integrity of the database tables. To do this, it uses several parameters to perform different types of checks. However, if the table is corrupt then this command may not work and exit abruptly. Such database corruption may cause because of several issues including virus infections, hardware malfunctioning, etc. These cases can well be solved using appropriate corrective measures failing which you should use a third-party MS SQL repair software to do the needful.

Consider a scenario in which you are running the CHECKTABLE tool on a database in MS SQL Server 2000. However, the tool fails to execute and exits abruptly showing the following error message.

"CHECKTABLE terminated. A failure was detected while collecting facts. Possibly tempdb out of space or a system table is inconsistent. Check previous errors."

Cause:

The reason behind the failing of CHECKTABLE is that the internal query that DBCC uses to acquire parallelism and scalability due to some miscellaneous reason such as database corruption.

Resolution:

The database corruption can be handled using the following MDF repair methods:


Address hardware corruption issues
: You should check if the issues is not being caused due to hardware malfunctioning. You can use the following measures to find out and resolve such issues:

Running hardware diagnostics and fixing any errors that occur while doing so.
Checking Windows application log and MS SQL Server Error log to see whether some error has appeared because of hardware corruption. Try to correct the problem, if possible.
Swapping the hardware components to try and isolate the exact reason of database corruption.
Reinstalling the operating system after formatting the hard disks.


Restore from backup: If the hardware components are perfectly in place, then you should check the state of the database backup. If the backup is clean and updated, then you can restore the database from the backup.

Run DBCC CHECKDB: If the backup solution is not possible, then run DBCC CHECKDB with the appropriate repair clause to repair MDF file.

If the aforementioned methods are unable to resolve the issue, then you should use a third-party MDF file repair software. These database repair tools are extremely safe to use that do not damage the existing while performing SQL repair.

The best SQL database recovery tool that repairs SQL database in most occasions is Stellar Phoenix SQL Data Recovery in MS SQL Server 2008, 2005, 2000, and 7.0. Able to recover various SQL objects including collations, NDF files, tables, stored procedures, triggers, etc, this .MDF repair software is compatible with Windows 7, Server 2008, Vista, Server 2003, XP, and 2000.

Resource taken from here: http://goarticles.com/article/How-to-overcome-Error-8921-in-MS-SQL-Server-2000-database/3838582
»»  Read More...

Monday, October 4, 2010

Repair & Restore SQL Server Database from Suspect Mode


Sometimes when you try to connect to your SQL database server, you may get your SQL database in suspect mode. At that point your database server would not allow you to access and perform any operation on it. Your database will accessible only when the database will be repaired. For fixing the problem you will have to use advanced SQL database recovery tool.

SQL server database can go in suspect mode for many reasons; some of them are given below:

Improper shutdown of the database server
Corruption of the database files
Unavailable device files
Unavailable database files
Database resource used by operating system
SQL Server incorrectly asserts free data page space when a row is inserted



You can know the exact reason for the SQL database suspect mode. You will have to use given below query for knowing the exact reason.

“DBCC CHECKDB (’YourDatabasename’) WITH NO_INFOMSGS, ALL_ERRORMSGS”

After running the above query you will able to know the exact reason of the database suspect mode.

To fix the suspect mode and restore the database, run following queries in Query Analyzer of SQL server database,

“EXEC sp_resetstatus ‘yourDatabasename’;
ALTER DATABASE yourDatabasename SET EMERGENCY
DBCC checkdb(’yourDatabasename’)
ALTER DATABASE yourDatabasename SET SINGLE_USER WITH ROLLBACK IMMEDIATE
DBCC CheckDB (’yourDatabasename’, REPAIR_ALLOW_DATA_LOSS)
ALTER DATABASE yourDatabasename SET MULTI_USER”

At finally you have done it. But sometimes after the running of above queries in query analyzer you are still unable to perform any operation on the database. This means your database has got badly corrupted. At that situation you will have to use third party SQL server recovery software to repair the database.


Stellar Phoenix SQL database recovery tool is the advanced repair and restore tool that support MS SQL server 2008, 2005, 2000 and 7.0. It can also repair the NDF files of the database. It is comfortable with windows 7, XP, Vista, 2003, 2000 and NT.
»»  Read More...