Error while Attaching a DB file | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Error while Attaching a DB file

I have an MDF and LDF file that I have been unable to attach to a SQL 2005 server. When I attempt the "Attach" process I recieve the following error: **************************** An exception occurred while executing a Transact-SQL statement or batch.
(Microsoft.SqlServer.ConnectionInfo) Could not find an entry for table or index with partition ID 524288 in database 5. This error can occur if a stored procedure references a dropped table, or metadata is corrupted. Drop and re-create the stored procedure, or execute DBCC CHECKDB. (Microsoft SQL Server, Error: 602). **************************** I’ve searched the web but have not been able to find information that would be helpful. Does DBCC work on MDF files? I thought that they only work on database once they are attached to SQL Server? Any suggestions on what to do or where to look would be greateful. Thanks,
Rodney
You may be missing a file from the database… Ask the person who sent it, to verify all of the files for you.
Why don’t you try attaching it using only the mdf file using ‘sp_attach_single_file_db’ Satya
If you have a filegroup backup for this database then can take chance of piecemeal restore to restore primary filegroup, as suggested its better to check the source for complete details. Satya SKJ
Microsoft SQL Server MVP
Writer, Contributing Editor & Moderator
http://www.SQL-Server-Performance.Com
This posting is provided AS IS with no rights for the sake of knowledge sharing. The greatest discovery of my generation is that a human being can alter his life by altering his attitudes of mind.

DBCC CHECKDB can be run only when database is online and accessable by SQL Engine These MDF & LDF are from different version of SQL Server, if YES pls. let me know the version.
If possible pls. post the SQL log files. Girish Patil
MS-SQL DBA
http://www.facebook.com/p/Girish_Patil/517990969
Did you guys rename the mdf and ldf files?
If yes, rename them back and then attach the files… You get this type of error when you rename the files..
MohammedU.
Moderator
SQL-Server-Performance.com All postings are provided “AS IS” with no warranties for accuracy.

Hi,
try to attach only the mdf file do not put the ldf file in the same location.
AKTHAR
]]>