Solved

Error after attaching a database

Posted on 2002-06-05
6
1,065 Views
Last Modified: 2008-02-01
I am using MS SQL 2000 Server
I had attached a database (.mdf) of size of around 1GB and after attaching when i query a table using SELECT statement i am displayed around 6550 rows and then it displays an error as given below :


Server: Msg 3624, Level 20, State 1, Line 1
 
Location:      q:\SPHINX\NTDBMS\storeng\drs\include\record.inl:1447
Expression:      m_SizeRec > 0 && m_SizeRec <= MAXDATAROW
SPID:           54
Process ID:      784

Connection Broken
0
Comment
Question by:viswa20
6 Comments
 
LVL 7

Expert Comment

by:lozzamoore
Comment Utility
Which front end tool are you using to run the Select statement from?
Cheers,
0
 

Expert Comment

by:Dr_Database
Comment Utility
The described problem may be, that the clustered index of the table is corrupted after the failed add column attempt. A clustered index may be corrupted if all of the following conditions are met:

You tried to add a column to an existing table and in the same transaction you added a foreign key reference from the new column to a column that is a unique clustered or unique nonclustered index key on the same table.

The add column failed and the transaction was rolled back.

After the transaction failed and was rolled back, an INSERT statement to the same table may result in an error message similar to one you mentioned.

To work around this problem you can either:
Drop, and then re-create the index.
-or-
Use this statement to re-create the corrupted index:
CREATE CLUSTERED INDEX...WITH DROP_EXISTING

Hope this helps.

Regards,
Dr. Database
0
 
LVL 69

Expert Comment

by:ScottPletcher
Comment Utility
Is the database you attached the same version and release level (including Service Pack) as the 2000 server?  If it's not, problems may arise because of internal differences in the format of .MDFs.

If, for example, it's a SQL 7.0 database, a backup and restore -- rather than an sp_attach -- should work.  If you can't make a backup from the original .mdf source, you may need to install a SQL Server instance that's at the proper release level, attach the .mdf, do a backup, then restore that backup to your new 2000 instance.
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 

Expert Comment

by:modulo
Comment Utility
Dear: Dr_Database

I've rejected your proposed answer as Experts Exchange holds an experiment to work without the answer button.

See:        http://www.experts-exchange.com/jsp/communityNews.jsp
Paragraph: Site Update for Wednesday, November 06, 2002

By this rejection the Asker will be notified by mail and hopefully he will take his responsibility to finalize the question or post an additional comment.
The Asker sees a button beside every post which says "Accept This Comment As Answer" (including rejected answers) -- so if he/she thinks yours is the best, you'll be awarded the points and the grade.

Thanks !

modulo

Community Support Moderator
Experts Exchange
0
 

Expert Comment

by:CleanupPing
Comment Utility
viswa20:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 

Accepted Solution

by:
modulo earned 0 total points
Comment Utility
PAQ'd and points removed

modulo

Community Support Moderator
Experts Exchange
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Viewers will learn how the fundamental information of how to create a table.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now