locked
Cannot create new entities through system import - MS CRM 3.0 RRS feed

  • Question

  • Hi,

    When I try to do an import of an xml file I get an error and this is what comes up in the error logs:

    # CRM Tracing Version 1.1
    # LocalTime: 2010-04-06 16:10:54.1
    # Categories: *:Error
    # Schedule: Daily
    # CallStackOn: True
    # ComputerName: DEVCRM03
    # CRMVersion: 3.0.5300.0
    [2010-04-06 16:10:54.1] Process: w3wp |Thread: 8844 |Category: Platform.Metadata |User: 9ed3595c-9de2-dd11-9443-0050569a68d7 |Level: Error | SqlHelper.ExecuteNonQuery
     at SqlHelper.ExecuteNonQuery(MetadataHelper helper, String registryName, SqlCommand sqlCommand)
     at EntityCreateAction.AddIndexes()
     at EntityCreateAction.DatabaseOperation()
     at MetadataHelper.ProcessQueue()
     at ImportEntityHandler.CreateEntityAndAttributesFromNode(XmlNode entityNode)
     at ImportEntityHandler.ImportItem()
     at ImportHandler.Import()
     at RootImportHandler.RunImport(String[] ImportEntities, ImportMask Mask)
     at ImportXml.RunImport(String parameterXml)
     at ImportXmlWebService.Import(String parameterXml, String customizationXml)
     at RuntimeMethodInfo.InternalInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean isBinderDefault, Assembly caller, Boolean verifyAccess)
     at RuntimeMethodInfo.InternalInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean verifyAccess)
     at RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
     at LogicalMethodInfo.Invoke(Object target, Object[] values)
     at WebServiceHandler.Invoke()
     at WebServiceHandler.CoreProcessRequest()
     at SyncSessionlessHandler.ProcessRequest(HttpContext context)
     at CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute()
     at HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
     at HttpApplication.ResumeSteps(Exception error)
     at HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData)
     at HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr)
     at HttpRuntime.ProcessRequest(HttpWorkerRequest wr)
     at ISAPIRuntime.ProcessRequest(IntPtr ecb, Int32 iWRType)
    >Exception when executing non-query: exec p_RecreateIndexes Exception: System.Data.SqlClient.SqlException: Invalid object name 'CRM3_0_DEV01_METABASE..EntityIndex'.
       at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
       at Microsoft.Crm.Metadata.SqlHelper.ExecuteNonQuery(MetadataHelper helper, String registryName, SqlCommand sqlCommand)
    [2010-04-06 16:10:54.1] Process: w3wp |Thread: 8844 |Category: Exception |User: 9ed3595c-9de2-dd11-9443-0050569a68d7 |Level: Error | CrmSoapExtension.GetCrmException
     at CrmSoapExtension.GetCrmException(Exception exception)
     at CrmSoapExtension.GetCrmException(Exception exception)
     at CrmSoapExtension.ProcessMessage(SoapMessage message)
     at SoapMessage.RunExtensions(SoapExtension[] extensions)
     at SoapServerProtocol.WriteException(Exception e, Stream outputStream)
     at WebServiceHandler.WriteException(Exception e)
     at WebServiceHandler.Invoke()
     at WebServiceHandler.CoreProcessRequest()
     at SyncSessionlessHandler.ProcessRequest(HttpContext context)
     at CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute()
     at HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
     at HttpApplication.ResumeSteps(Exception error)
     at HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData)
     at HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr)
     at HttpRuntime.ProcessRequest(HttpWorkerRequest wr)
     at ISAPIRuntime.ProcessRequest(IntPtr ecb, Int32 iWRType)
    >Crm Exception: Message: , ErrorCode: -2147204784, InnerException: System.Data.SqlClient.SqlException: Invalid object name 'CRM3_0_DEV01_METABASE..EntityIndex'.
       at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
       at Microsoft.Crm.Metadata.SqlHelper.ExecuteNonQuery(MetadataHelper helper, String registryName, SqlCommand sqlCommand)
       at Microsoft.Crm.Metadata.EntityCreateAction.AddIndexes()
       at Microsoft.Crm.Metadata.EntityCreateAction.DatabaseOperation()
       at Microsoft.Crm.Metadata.MetadataHelper.ProcessQueue()
       at Microsoft.Crm.Tools.ImportExportPublish.ImportEntityHandler.CreateEntityAndAttributesFromNode(XmlNode entityNode)
       at Microsoft.Crm.Tools.ImportExportPublish.ImportEntityHandler.ImportItem()
       at Microsoft.Crm.Tools.ImportExportPublish.ImportHandler.Import()
       at Microsoft.Crm.Tools.ImportExportPublish.RootImportHandler.RunImport(String[] ImportEntities, ImportMask Mask)
       at Microsoft.Crm.Tools.ImportExportPublish.ImportXml.RunImport(String parameterXml)
       at Microsoft.Crm.WebServices.ImportXmlWebService.Import(String parameterXml, String customizationXml)
    [2010-04-06 16:10:54.2] Process: w3wp |Thread: 8844 |Category: Platform |User: 9ed3595c-9de2-dd11-9443-0050569a68d7 |Level: Error | CrmSoapExtension.ProcessMessage
     at CrmSoapExtension.ProcessMessage(SoapMessage message)
     at SoapMessage.RunExtensions(SoapExtension[] extensions)
     at SoapServerProtocol.WriteException(Exception e, Stream outputStream)
     at WebServiceHandler.WriteException(Exception e)
     at WebServiceHandler.Invoke()
     at WebServiceHandler.CoreProcessRequest()
     at SyncSessionlessHandler.ProcessRequest(HttpContext context)
     at CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute()
     at HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
     at HttpApplication.ResumeSteps(Exception error)
     at HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData)
     at HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr)
     at HttpRuntime.ProcessRequest(HttpWorkerRequest wr)
     at ISAPIRuntime.ProcessRequest(IntPtr ecb, Int32 iWRType)
    >CrmSoapExtension detected CrmException:
    System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Data.SqlClient.SqlException: Invalid object name 'CRM3_0_DEV01_METABASE..EntityIndex'.
       at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
       at Microsoft.Crm.Metadata.SqlHelper.ExecuteNonQuery(MetadataHelper helper, String registryName, SqlCommand sqlCommand)
       at Microsoft.Crm.Metadata.EntityCreateAction.AddIndexes()
       at Microsoft.Crm.Metadata.EntityCreateAction.DatabaseOperation()
       at Microsoft.Crm.Metadata.MetadataHelper.ProcessQueue()
       at Microsoft.Crm.Tools.ImportExportPublish.ImportEntityHandler.CreateEntityAndAttributesFromNode(XmlNode entityNode)
       at Microsoft.Crm.Tools.ImportExportPublish.ImportEntityHandler.ImportItem()
       at Microsoft.Crm.Tools.ImportExportPublish.ImportHandler.Import()
       at Microsoft.Crm.Tools.ImportExportPublish.RootImportHandler.RunImport(String[] ImportEntities, ImportMask Mask)
       at Microsoft.Crm.Tools.ImportExportPublish.ImportXml.RunImport(String parameterXml)
       at Microsoft.Crm.WebServices.ImportXmlWebService.Import(String parameterXml, String customizationXml)
       --- End of inner exception stack trace ---

    We recently moved the sql database from one server to another in the same domain. It looks like this is still pointing to the old database ''CRM3_0_DEV01_METABASE'.

    How do I change this or do I have to do a redeployment to fix it?

    Cheers,

    Stanley

    Tuesday, April 6, 2010 7:22 AM

Answers