Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Failure to Import CRM 2011 Organisation with Custom Entities

Posted on by Microsoft Employee

Hi,

We are trying to import a CRM 2011 organisation into a vanilla CRM 2013 environment as per https://technet.microsoft.com/en-us/library/hh699673(v=crm.7).aspx.

During the import migration wizard the following error appears:

Moving data into table ContactBase on Thread 15
13:43:49| Error| Sql error=208 with message=
Invalid object name 'dbo.ContractDetailExtensionBase'.
for table=QueueItemBase
after totalRowsProcessed=0 and lastMovedRowId=00000000-0000-0000-0000-000000000000
in batch query:

set nocount on
declare @batchSize int = 50000
declare @totalRowsProcessed int = 0
,@batchRowsSelected int = -1 -- start value to enter loop
,@resultCode int = 0 -- 0 is success, 1 is failure
,@errorNumber int = 0 -- 0 is success, otherwise sql ERROR_NUMBER()
,@errorMessage nvarchar(2048) = ''

declare @lastMovedId uniqueidentifier = cast('00000000-0000-0000-0000-000000000000' as uniqueidentifier)
,@firstId uniqueidentifier

WHILE(@batchRowsSelected <> 0)
BEGIN
BEGIN TRAN
BEGIN TRY
SELECT @firstId = @lastMovedId

SELECT @lastMovedId = [QueueItemId]
FROM (SELECT TOP (@batchSize) [QueueItemId], ROW_NUMBER() OVER (ORDER BY [QueueItemId]) AS RowNumber FROM [QueueItemBase] WHERE [QueueItemId] > @firstId) t
WHERE RowNumber = @batchSize

IF @@ROWCOUNT = 0
BEGIN
SELECT TOP(1) @lastMovedId = [QueueItemId] FROM [QueueItemBase] ORDER BY [QueueItemId] DESC
END

UPDATE [QueueItemBase] SET [new_UrgencyRank] = t.[new_UrgencyRank] FROM [QueueItemExtensionBase] t WHERE [QueueItemBase].[QueueItemId] = t.[QueueItemId] AND t.[QueueItemId] > @firstId AND t.[QueueItemId] <= @lastMovedId

SELECT @batchRowsSelected = @@ROWCOUNT
SELECT @totalRowsProcessed = @totalRowsProcessed+@batchRowsSelected
END TRY
BEGIN CATCH
if @@TRANCOUNT>0
rollback tran
select @resultCode = 1 -- failure
,@errorNumber = ERROR_NUMBER()
,@errorMessage = ERROR_MESSAGE()
break;
END CATCH

if @@TRANCOUNT >0
commit tran
END

SELECT @resultCode AS ResultCode
,@totalRowsProcessed AS TotalRowsProcessed
,@firstId AS LastMovedId
,@errorNumber AS ErrorNumber
,@errorMessage AS ErrorMessage

, Error, OK, Option1

This seems to relate to a custom table that we have set up in the 2011 organisation through the CRM web interface, but for some reason gets dropped during the migration.

Is anyone able to advise a solution to this?

Thanks.

*This post is locked for comments

  • David Jennaway Profile Picture
    David Jennaway 14,063 on at
    RE: Failure to Import CRM 2011 Organisation with Custom Entities

    The error refers to ContractDetailExtensionBase, which is a system table, rather than for a custom entity. I can't see anything in the error that relates to a custom entity. Do you have any more information on why you think this relates to a custom entity ?

    Something strange is happening here. During the upgrade from CRM 2011 to 2013, the ExtensionBase tables are dropped as the custom attributes are moved into the Base table, so at some point the ContractDetailExtensionBase will no longer exist. The most likely reason for this error is if there were unsupported customisations made directly in the SQL database, rather than through the CRM web interface

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans