locked
new CRM Server installation with existing SQL Server RRS feed

  • Question

  • Hi,

    I tried to move my existing CRM server to another machine. I didn't touch my SQL Server.
    This should be ok (see http://support.microsoft.com/kb/952934/en-us).

    After installing the new CRM server I get an error when I try to access the new CRM Web:

    Error Description:
    An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Error Details:
    Exception of type 'System.Web.HttpUnhandledException' was thrown.

    Full Stack:
    [NullReferenceException: Object reference not set to an instance of an object.]
    at Microsoft.Crm.Query.CrmSqlSelectCommandStrategy.AddPicklistCaseStatement(AttributeMetadata attribute, StringBuilder sqlString, String tableAlias)
    at Microsoft.Crm.Query.CrmSqlSelectCommandStrategy.AddOrderByClause(OrderExpression order, AttributeMetadata orderAttribute, String tableAlias)
    at Microsoft.Crm.Query.SelectVisitor.Visit(OrderExpression order)
    at Microsoft.Crm.Query.OrderExpression.GetSql(ExpressionVisitor visitor)
    at Microsoft.Crm.Query.SelectVisitor.Visit(EntityExpression entity)
    at Microsoft.Crm.Query.EntityExpression.GetSql(ExpressionVisitor visitor)
    at Microsoft.Crm.Query.SelectPlan.GetSql()
    at Microsoft.Crm.BusinessEntities.BusinessProcessObject.DoRetrieveMultiple(BusinessEntityCollection entities, EntityExpression entityExp, ExecutionContext context)
    at Microsoft.Crm.BusinessEntities.BusinessProcessObject.RetrieveMultiple(EntityExpression entityExpression, ExecutionContext context)
    at Microsoft.Crm.ObjectModel.SdkMessageProcessingStepServiceInternal`1.RetrieveByMessageProcessorKey(MessageProcessorKey key, ExecutionContext context)
    at Microsoft.Crm.Extensibility.MessageProcessorFactory.CreateMessageProcessor(IMessageProcessorConfiguration configuration, MessageProcessorKey key, ExecutionContext context)
    at Microsoft.Crm.Extensibility.MessageProcessorFactory.CreateInstance(MessageProcessorKey key, ExecutionContext context)
    at Microsoft.Crm.Caching.MessageProcessorCacheLoader.LoadCacheData(MessageProcessorKey key, ExecutionContext context)
    at Microsoft.Crm.Caching.ObjectModelCacheLoader`2.LoadCacheData(TKey key, IOrganizationContext context)
    at Microsoft.Crm.Caching.CrmMultiOrgCache`2.CreateEntry(TKey key, IOrganizationContext context)
    at Microsoft.Crm.Caching.CrmSharedMultiOrgCache`2.LookupEntry(TKey key, IOrganizationContext context)
    at Microsoft.Crm.Extensibility.InternalMessageDispatcher.Execute(PipelineExecutionContext context)
    at Microsoft.Crm.Extensibility.ExternalMessageDispatcher.Execute(String messageName, Int32 primaryObjectTypeCode, Int32 secondaryObjectTypeCode, PropertyBag fields, CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId)
    at Microsoft.Crm.Sdk.RequestBase.Process(Int32 primaryObjectTypeCode, Int32 secondaryObjectTypeCode, CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId)
    at Microsoft.Crm.Sdk.RequestBase.Process(CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId)
    at Microsoft.Crm.Sdk.CrmServiceInternal.Execute(RequestBase request, CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId)
    at Microsoft.Crm.Sdk.InProcessCrmService.Execute(Object request)
    at Microsoft.Crm.Application.Platform.ServiceCommands.PlatformCommand.ExecuteInternal()
    at Microsoft.Crm.Application.Platform.ServiceCommands.RetrieveCommand.Execute()
    at Microsoft.Crm.Application.Platform.DataSource.Retrieve(String entityName, Guid entityId, String[] columns)
    at Microsoft.Crm.Application.MasterSiteMap.LoadMasterSiteMapInternal(Guid organizationId, DynamicMetadataCache metadataCache, Boolean useReferenceXml)
    at Microsoft.Crm.Application.MasterSiteMap.LoadMasterSiteMap(Guid organizationId, DynamicMetadataCache metadataCache)
    at Microsoft.Crm.Caching.MasterSiteMapCacheLoader.LoadCacheData(MasterSiteMapCacheKey key, IOrganizationContext context)
    at Microsoft.Crm.Caching.BasicCrmCache`2.CreateEntry(TKey key, IOrganizationContext context)
    at Microsoft.Crm.Caching.BasicCrmCache`2.LookupEntry(TKey key, IOrganizationContext context)
    at Microsoft.Crm.Application.SiteMap.GetSiteMapForUser(IUser user, Client client, Boolean isOffline, String forceGroupProfiles)
    at Microsoft.Crm.Caching.UserSiteMapCacheLoader.LoadCacheData(UserSiteMapCacheKey key, IOrganizationContext context)
    at Microsoft.Crm.Caching.BasicCrmCache`2.CreateEntry(TKey key, IOrganizationContext context)
    at Microsoft.Crm.Caching.BasicCrmCache`2.LookupEntry(TKey key, IOrganizationContext context)
    at Microsoft.Crm.Caching.UserSiteMapCache.LookupEntry(Guid userId, IOrganizationContext context)
    at Microsoft.Crm.Web.Loader.ConfigurePage()
    at Microsoft.Crm.Application.Controls.AppUIPage.OnPreRender(EventArgs e)
    at Microsoft.Crm.Web.Loader.OnPreRender(EventArgs e)
    at System.Web.UI.Control.PreRenderRecursiveInternal()
    at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

    [HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown.]
    at System.Web.UI.Page.HandleError(Exception e)
    at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
    at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
    at System.Web.UI.Page.ProcessRequest()
    at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
    at System.Web.UI.Page.ProcessRequest(HttpContext context)
    at ASP.organisation_loader_aspx.ProcessRequest(HttpContext context)
    at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
    at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)


    Other Message:
    Error Number:
    Source File:
    Not available

    Line Number:
    Not available


    Date: 08-01-2008

    Time: 14:46:41

    Server: crm-dev2
    Request URL:
    http://crm-dev2:5555/organisation/loader.aspx


    I uninstalled and reinstalled the CRM server but had no luck. I checked the Accounts, everything seemed ok (PrivUserGroup, SQL Server Connection).


    Friday, August 1, 2008 1:11 PM

Answers

  • I solved my problem.

    The problem was, that my first installation was an english Version of CRM 4 and the second was a german version of CRM 4.

    I uninstalled both CRM Servers and the SQL Server installation. Afterwards I installed two german versions and used the same SQL Server with no problems.

    So I can't change from a non-english Version to english or back. This is quite disappointing.
    Even worse the second installation finishs with no problem or warning and leaves the software in an inoperable mode.
    Friday, August 8, 2008 12:41 PM

All replies

  • Did you check the account that CRM is running under? You may have to do some additional work with security in SQL Server.

     

    Also, is the CRM server trusted for delegation in Active Directory?

    Friday, August 1, 2008 2:19 PM
  • check the domain account

     

    For More see MS CRM Support section

     

    http://support.microsoft.com/ph/12976

     

    Regards,
    Imran

    http://www.crmxperts.com


     

     

    Wednesday, August 6, 2008 1:47 PM
    Moderator
  • The CRM Server runs as NT Authority\Network Service
    The account has security Settings in SQL Server.

    The server was not trusted for delegation. The old server wasn't trusted neither. I changed the trust but it didn't help.
    I also tried to repair the installation but with no success.



    Thursday, August 7, 2008 12:00 PM
  • Okay, so next I would look at security within SQL Server. You should see that the server running CR has permissions to SQL. You can tell this by looking at seeing an account named DOMAIN\SERVERNAME$ that has been granted access in SQL.

     

    Also, you might want to check the PrivUserGroup in Active Directory - the CRM server should be added as a member.

     

    If all those fail to resolve the issue, then we may be barking up the wrong tree. It might be helpful to enable tracing to get a more concise error.

    Thursday, August 7, 2008 12:41 PM
  • My Server CRM-DEV2 is listed in SQL Server Security as <Domain>\CRM-DEV2$
    It is only in the public role (for all databases). There are also the PrivReportingGroup, ReportingGroup, SQLAccessGroup and Network Service listed.
    The Server is also a member of the PrivUserGroup in AD, I checked this before.

    CRM-DEV (the original server) had no Problems, it was only CRM-DEV2, the new one which should replace the old one, which is making this problems.

    I already watched the logs and traces, I used CrmDiagTool4 of CRM Server. I also traced with SQL Server.
    Unfortunately I didn't found anything which helped me in the traces.
    I think the problem is due to misconfiguration (SQL Server or CRM).
    If interested I could send the log files.

    This is a part of the CRM Web log file (located in program files\microsoft dynamics crm\trace.

    >SELECT OrganizationId, EventId, EventData, CreatedOn FROM Notification WHERE CreatedOn > '08/08/2008 07:28:15'
    [2008-08-08 09:49:29.2] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread:   10(MSCRM:-NotificationManager.NotificationWatcherThreadProc) |Category: Platform.Sql |User: 00000000-0000-0000-0000-000000000000 |Level: Info | CrmDbConnection.InternalExecuteReader
        at CrmDbConnection.InternalExecuteReader(IDbCommand command)
        at CrmDbConnection.ExecuteReader(IDbCommand command, Boolean impersonate)
        at NotificationService.GetConfigScopeNotifications(ConfigScope scope, Object organizationId, Int32[] events, DateTime lastChecked)
        at NotificationService.GetNotifications(Object organizationId, Int32[] events, DateTime lastChecked)
        at DBNotificationsProvider.GetNotifications(DateTime lastChecked)
        at NotificationManager.NotificationWatcherThreadProc()
        at ThreadHelper.ThreadStart_Context(Object state)
        at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
        at ThreadHelper.ThreadStart()

    The SQL Server trace is to long to post.
    Friday, August 8, 2008 7:58 AM
  • I think your problem about GUIDs. Because new installation process creates new guids in active directory. So Your server didn't find new guids in crm database.
    Please check this, am I right? If real problem is this, we can find a way for solve this problem.

    Baris KANLICA
    Software Specialist and Consultant
    www.cub-e.net

     

    Friday, August 8, 2008 11:35 AM
  • I solved my problem.

    The problem was, that my first installation was an english Version of CRM 4 and the second was a german version of CRM 4.

    I uninstalled both CRM Servers and the SQL Server installation. Afterwards I installed two german versions and used the same SQL Server with no problems.

    So I can't change from a non-english Version to english or back. This is quite disappointing.
    Even worse the second installation finishs with no problem or warning and leaves the software in an inoperable mode.
    Friday, August 8, 2008 12:41 PM