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

Thursday, October 28, 2010

Resolving Error 8925 in MS SQL Server 2000 database using SQL database recovery software

In MS SQL Server databases, the records are stored in the form of pages, which are linked to each other in a sequential manner. Because of being linked to each other, the searching and inserting new records is made easy thereby saving a lot of precious time. However, at times the database are unable to exhibit the expected functionality because of database corruption, which can occur due to various reasons such as virus infections, hardware malfunctioning, abrupt system shutdown, etc. In these circumstances, certain in-build methods can be used to recover SQL database. If these methods do not work, then I would suggest to use a third-party MS SQL Server software to overcome such situations.

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

"Table error: Cross object linkage: Page P_ID1, slot S_ID1, in object ID O_ID1, index ID I_ID1 refers to page P_ID2, slot S_ID2, in object ID O_ID2, index ID I_ID2."

Cause:

The primary cause of this problem is that the P_ID1 page points to another, P_ID2, page in a different object.

Resolution:

You should perform the following methods to recover MDF file in these situations:

* Address hardware-related issues: A lot of times these errors are caused by malfunctioning of the hardware components. You can use the following measures in order to resolve such issues:

o Fixing the errors that appear after running hardware diagnostics.
o Checking the Windows Application log report and MS SQL Server Error log to ascertain whether the error has occured because of hardware malfunctioning.
o Checking if write-caching is enaled on the disks. If yes, then contact the local hardware vendor to get it changed.
o Swapping the hardware components to isolate the actual reason of database corruption.
o Reinstalling the operating system after formatting the hard drive.

* Restore from backup: If the hardware is alright, then you should restore database from the backup if it is clean and updated.

* Run DBCC CHECKDB: If the backup does not solve the problem, then you should run DBCC CHECKDB with the suggested repair clause.

If you still are getting the similar error message even after using these methods, then you need to repair the damaged SQL database using a third-party master database file recovery software. These SQL database recovery tools are able to repair corrupt MDF files without any damage to the existing files.

The best SQL database recovery software that restores various database objects including collations, tables, NDF files, stored procedures, etc, is Stellar Phoenix SQL Data Recovery. Supporting MS SQL Server 7.0, 2000, 2005, and 2008, this .MDF recovery software is compatible with Windows 7, Server 2008, Vista, Server 2003, XP, and 2000.
»»  Read More...

Saturday, September 4, 2010

Truncating Transaction Log in SQLServer 2000

Few days back I had a situation when size of my database transcation log was growing too fast (at a point it reached 60 GB). so I had to find some way to truncate it to some minimal size. After lot of googling, I found how to truncate the transaction log.

Run these two commands in Query Analyser.

1. BACKUP LOG (DBName) WITH TRUNCATE_ONLY
2. DBCC SHRINKFILE((DBName)_log, (Desired transaction filesize) )

Remarks :

* DBCC SHRINKFILE applies to the files in the current database. If you try to run this command in a different DB then the DB you want to shrink, SQL Server will give following error

Server: Msg 8985, Level 16, State 1, Line 1
Could not locate file ‘(DBName)_log’ in sysfiles.

* SQL Server uses (Desired transaction filesize) to calculate the target size for the entire log; therefore, target_size is the amount of free space in the log after the shrink operation. Target size for the entire log is then translated to target size for each log file. DBCC SHRINKFILE attempts to shrink each physical log file to its target size immediately. If no part of the logical log resides in the virtual logs beyond the log file’s target size, the file is successfully truncated and DBCC SHRINKFILE completes with no messages. However, if part of the logical log resides in the virtual logs beyond the target size, SQL Server frees as much space as possible and then issues an informational message. The message tells you what actions you need to perform to move the logical log out of the virtual logs at the end of the file. (Remarks are taken from MSDN)

References…..

1. Microsoft Knowledge Base (KB272318)
2. DBCC SHRINKFILE

Source: http://gargmanoj.wordpress.com/category/ms-sql-server-2000/
»»  Read More...