web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Failure to Import CRM 2011 Organisation with Custom Entities

(0) ShareShare
ReportReport
Posted on by

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

I have the same question (0)
  • David Jennaway Profile Picture
    14,065 on at

    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans