开发者

Fatal error when migrating data between 2 databases

At my company we're going from having individual databases for each customer to having one large database with every customer in it. We've gone through the pain staking task of writing a migration script in ASP to migrate over data into the new database. This migration script has worked up until this particular customer which has a MASSIVE amount of data to be migrated. There are 4 particular tables who between them have roughly 6.5 million rows to be migrated. For this particular customer the asp script runs fine for over an hour and then somewhere down the line we get the following error:

Microsoft OLE DB Provider for SQL Server error '80004005'

Warning: Fatal error 7105 occurred at Aug 17 2011 4:10PM. Note the error and time, and contact your system administrator.

So I'm wondering a couple of things. What does the above error mean? Also I'm wondering if there is a better way to开发者_如何转开发 migrate over this massive amount of data? Would a stored procedure (though I'd hate to have to write such a large procedure after writing such a large ASP script) end with the same results? To better explain the situation, it's not going to be a direct dump from one db to another. When the records from the old db get moved over they are assigned new IDs and anywhere else those ids are referenced as foreign keys they have to be updated with the new IDs accordingly.

If I'm leaving out any integral information needed to help answer my questions please let me know and I'll update my question post.

Thanks.


OK, well to answer just part of my question... I had to run a DBCC CHECKTABLE against the table the migration script was failing on. After discovering the errors via that check I ran it once again but this time with the parameter to fix errors DBCC CHECKTABLE (table_name,repair_allow_data_loss). After running that the table was repaired and the migration script ran just fine.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜