question

RajalNigam avatar image
RajalNigam asked

We are trying to attach the database of SQL2005 to SQL2008 for upgrade.

We are trying to attach the database of SQL2005 to SQL2008 for upgrade. But we are receiving error while attaching the DB, error says to check the DB using 'DBCC'. 1. The error shows a Table which is their in System Tables but it is not their in the Table object explorer. 2. Unable to create table as it saya already exist. If i try an delete the table it says it's not found. 3. kindly help.
system-tables
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Tim avatar image
Tim answered
Does the 2005 database attach and then give you the error or just fail to attach? Have run ran DBCC CHECKDB on your 2005 Database on the 2005 Instance? Does it give the same error? Can you post the actual snippet of text from running DBCC CHECKDB on the database.
18 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Job well done though. You should schedule a daily or at least weekly job to run dbcc checkdb on your databases to ensure this doesn't happen again. Corruption will occur and you need backups that predate the corruption as you have learned the hard way. At least your issue wasn't user data. A bullet was dodged this time.
1 Like 1 ·
[link text][1]Hi Tim thanx a lot for a prompt response. The 2005 database is in use currently and we need to upgrade it to 2008 which is failing due to the table which exist in system tables but it's not their in Table Explorer. I am attaching the snap shot for more information. Thanx once again. [1]: /storage/temp/410-sqlerror2008_2008.zip
0 Likes 0 ·
sqlerror2008_2008.zip (114.1 KiB)
@RajaNigam, does this corruption appear when you run DBCC CHECKCATALOG on your production 2005 system? In SQL 2000 DBCC CHECKCATALOG was not part of DBCC CHECKDB, but you say you are on 2005 trying to go to 2008. At any rate, it appears you may have metadata corruption in your database. You might want to spend a few minutes reading over some of Paul Randals [blogs]( http://www.sqlskills.com/BLOGS/PAUL/category/Corruption.aspx) on corruption.
0 Likes 0 ·
Tim..ya I agree that their is particular table corruption issue. As it has created 2 tables with the same name...Is their anyway to delete the table info from system tables as I have tried almost everthing before posting the query?
0 Likes 0 ·
Have you tried any of the info outlined [Here]( http://www.sqlskills.com/BLOGS/PAUL/post/Disaster-recovery-101-fixing-metadata-corruption-without-a-backup.aspx) You still haven't answered me on if this error shows up when you run it in production on your SQL 2005 instance.
0 Likes 0 ·
Show more comments

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.