none
CRM2011导入数据问题报错?一天了没有搞定,难道要重装下CRM RRS feed

  • 问题

  • CRM2011数据导入功能
    1,导入数据30000条
    2,数据分析阶段 数据分析总数量到一定数量后就会失败
    3,修改了CRM应用服务器的注册表项configdb:Data Source=cloudcc09-ccc;Initial Catalog=MSCRM_CONFIG;Integrated Security=True;
    4,在数据库服务器上修改超时时间,并且重新启动
    5,后来可能是服务器上的web资源是有限的,包括端口、连接数等等,当大量调用的时候,可能会把类似于端口号的资源全部占用掉,此时,就会出现类似于“基础连接已经关闭”或者你题目中提到的错误描述。
    解决的方法是修改服务器操作系统中的端口数量
    6,还是出超时的错误,在CRM系统日志中看到错误如下:
    Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Generic SQL error.Detail: 
    <OrganizationServiceFault xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts">
      <ErrorCode>-2147204784</ErrorCode>
      <ErrorDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
      <Message>Generic SQL error.</Message>
      <Timestamp>2012-05-08T11:18:07.3188902Z</Timestamp>
      <InnerFault>
        <ErrorCode>-2147220970</ErrorCode>
        <ErrorDetails xmlns:d3p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
        <Message>System.Data.SqlClient.SqlException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #7808D5A8</Message>
        <Timestamp>2012-05-08T11:18:07.3344905Z</Timestamp>
        <InnerFault i:nil="true" />
        <TraceText i:nil="true" />
      </InnerFault>
      <TraceText i:nil="true" />
    </OrganizationServiceFault>

    7,查看在CRM应用上的日志有很多错误日志
    1)CrmTrace encountered an error. Additional Info:Error in GetFileName : Error accessing file c:\crmdrop\logs\CLOUDCC01-CrmAsyncService(Maintenance#3140#E461143E)-bin-20120508-1.log (Reporting Process:CrmAsyncService, AppDomain:d:\PROGRA~1\MICROS~1\Server\bin\)

    2)Host CLOUDCC01: error while processing organization 516027da-3f6f-488d-a3c2-39b508f943aa. Exception: System.Data.SqlClient.SqlException (0x80131904): Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
       at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
       at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
       at System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject stateObj, UInt32 error)
       at System.Data.SqlClient.TdsParserStateObject.ReadSni(DbAsyncResult asyncResult, TdsParserStateObject stateObj)
       at System.Data.SqlClient.TdsParserStateObject.ReadNetworkPacket()
       at System.Data.SqlClient.TdsParserStateObject.ReadByte()
       at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
       at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
       at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
       at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
       at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
       at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
       at Microsoft.Crm.CrmDbConnection.InternalExecuteWithRetry[TResult](Func`1 ExecuteMethod, IDbCommand command)
       at Microsoft.Crm.CrmDbConnection.InternalExecuteNonQuery(IDbCommand command, Boolean capturePerfTrace)
       at Microsoft.Crm.CrmDbConnection.ExecuteNonQuery(IDbCommand command, Boolean impersonate, Boolean capturePerfTrace)
       at Microsoft.Crm.Asynchronous.DataAccessSharedBase.ExecuteSqlCommand(IDbCommand command, Nullable`1 expectedAffectedRecords)
       at Microsoft.Crm.Asynchronous.QueueDataAccess.MoveSuspendedToReady()
       at Microsoft.Crm.Asynchronous.QueueManager.<>c__DisplayClassf.<OnMoveSuspendedToReadyTimerEvent>b__e(IQueueDataAccess queueDataAccess, IOrganizationConfiguration orgConfig)
       at Microsoft.Crm.Asynchronous.QueueManager.ExecuteForAllOrganizations(OrganizationQueueDataAccessHandler handler)
    8,下面是服务器的警告
    1)Query execution time of 17.3 seconds exceeded the threshold of 10 seconds. Thread: 18; Database: sales_MSCRM; Query: 
    SET DEADLOCK_PRIORITY LOW
    BEGIN TRANSACTION
        DECLARE @res INT
        EXEC @res = sp_getapplock                 
                    @Resource = 'AsyncService_app_lock',
                    @LockMode = 'Exclusive'
        IF @res NOT IN (0, 1)
        BEGIN
            RAISERROR ( 'Unable to acquire App Lock', 16, 1 )
        END 
        ELSE
        BEGIN

    With TopSuspendedAsyncOperations(AsyncOperationId)
    AS
    (
    Select Top(2000) AsyncOperationId
    from AsyncOperationBase o1
    where
    StateCode = 1
    and ((PostponeUntil is NULL) or (PostponeUntil <= '05/08/2012 11:17:42'))
    and ((DependencyToken is NULL) or (not exists (
    select AsyncOperationId
    from AsyncOperationBase o2
    where
    o2.Sequence < o1.Sequence
    and o2.DependencyToken = o1.DependencyToken
    and o2.RecurrencePattern is null
    and o2.StateCode in (0,2,1))))
    )
    update AsyncOperationBase
    set
    StateCode = 0,
    StatusCode = 0,
    ModifiedOn = '05/08/2012 11:17:42',
    ModifiedBy = CreatedBy
    From AsyncOperationBase join TopSuspendedAsyncOperations on 
    AsyncOperationBase.AsyncOperationId = TopSuspendedAsyncOperations.AsyncOperationId

    EXEC @res = sp_releaseapplock 
                                @Resource = 'AsyncService_app_lock'
        END    
    COMMIT.
    2)Query execution time of 22.0 seconds exceeded the threshold of 10 seconds. Thread: 17; Database: sales_MSCRM; Query: 
    SET DEADLOCK_PRIORITY LOW
    BEGIN TRANSACTION
        DECLARE @res INT
        EXEC @res = sp_getapplock                 
                    @Resource = 'AsyncService_app_lock',
                    @LockMode = 'Exclusive'
        IF @res NOT IN (0, 1)
        BEGIN
            RAISERROR ( 'Unable to acquire App Lock', 16, 1 )
        END 
        ELSE
        BEGIN

    update AsyncOperationBase
    set
    HostId = 'CLOUDCC01.MSCRMAsyncService.e7d564d4-3a5e-4bb8-8c14-1c7057258332',
    StateCode = 2,
    StatusCode = 20,
    StartedOn = '05/08/2012 11:17:38',
    ModifiedOn = '05/08/2012 11:17:38',
    ModifiedBy = CreatedBy,
    RetryCount = case coalesce(ErrorCode, 0)
    when 0 then coalesce(RetryCount, 0)
    else coalesce(RetryCount, 0)+1
    end
    output
    INSERTED.AsyncOperationId,
    INSERTED.OperationType,
    INSERTED.Data,
    INSERTED.DependencyToken,
    INSERTED.RegardingObjectId,
    INSERTED.RegardingObjectIdName,
    INSERTED.RegardingObjectTypeCode,
    INSERTED.OwningBusinessUnit,
    INSERTED.OwningExtensionId,
    INSERTED.OwningExtensionIdName,
    INSERTED.OwningExtensionTypeCode,
    INSERTED.OwnerId,
    INSERTED.RetryCount,
    INSERTED.MessageName,
    INSERTED.RecurrencePattern,
    INSERTED.RecurrenceStartTime,
    INSERTED.CorrelationId,
    INSERTED.CorrelationUpdatedTime,
    INSERTED.Depth,
    INSERTED.PrimaryEntityType,
    INSERTED.RequestId,
    INSERTED.CreatedOn,
    INSERTED.ExecutionTimeSpan
    where
    AsyncOperationId in
    (select top(1) AsyncOperationId from AsyncOperationBase WITH (READPAST, READCOMMITTEDLOCK, UPDLOCK) 
    where StateCode = 0 
    and OperationType IS NOT null 
    order by Sequence asc)
    EXEC @res = sp_releaseapplock 
                                @Resource = 'AsyncService_app_lock'
        END    
    COMMIT.
    3)Query execution time of 23.8 seconds exceeded the threshold of 10 seconds. Thread: 4; Database: sales_MSCRM; Query: UPDATE ImportFileBase SET StatusCode = 5, CompletedOn = '05/08/2012 11:17:36' WHERE ImportFileId = 'a86ea623-ff98-e111-873f-00e081dd838a' AND StatusCode <> 5.

    windows live Id :hellohongfu@hotmail.com


    2012年5月8日 11:29

答案