locked
Imorting organization from crm 4.0 to crm 4.0, still giving error......... RRS feed

  • Question

  • Hi All,

    I have organization which running on another  crm 4.0 server, i want to import that organization on another crm 4.0 server, after completed all process it shows the blow error how can i resolved...

    my organization database file size is somthing 5 GB, is that problem please let me know....




    below i pasted the some log file error which i got..

    04:39:37|  Error| Import Organization (Name=OctaWare, Id=2519029f-ce0a-e111-957f-080027d9c5bd) failed with Exception:
    System.InvalidOperationException: ExecuteNonQuery requires an open and available Connection. The connection's current state is closed.
       at System.Data.SqlClient.SqlConnection.GetOpenConnection(String method)
       at System.Data.SqlClient.SqlConnection.ValidateConnectionForExecute(String method, SqlCommand command)
       at System.Data.SqlClient.SqlCommand.ValidateCommand(String method, Boolean async)
       at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
       at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
       at Microsoft.Crm.CrmDbConnection.InternalExecuteNonQuery(IDbCommand command)
       at Microsoft.Crm.CrmDbConnection.ExecuteNonQuery(IDbCommand command, Boolean impersonate)
       at Microsoft.Crm.CrmDbConnection.SetTransactionIsolationLevel(IsolationLevel il)
       at Microsoft.Crm.CrmDbConnection.Dispose(Boolean disposing)
       at Microsoft.Crm.SqlExecutionContext.Dispose(Boolean disposing)
       at Microsoft.Crm.SqlExecutionContext.Dispose()
       at Microsoft.Crm.Tools.Admin.ImportOrganizationInstaller.Import(Guid organizationId, String organizationUniqueName, String organizationFriendlyName, String sqlServerName, String databaseName, Uri reportServerUrl, String privilegedUserGroupName, String sqlAccessGroupName, String userGroupName, String reportingGroupName, String privilegedReportingGroupName, ICollection`1 users, MultipleTenancy multipleTenancy)
    04:39:37|Warning| Attempting to cancel a long running process: ProgressWizard. This might leave the data in an invalid state and the application might not function correctly.
    04:58:10|  Error| Import Organization (Name=OctaWare, Id=2519029f-ce0a-e111-957f-080027d9c5bd) failed.
    The changes made during Import Organization could not be rolled back. Please manually delete the Organization database from the 'KYRASERVER' SQL Server if it was not successfully deleted.

    Microsoft.Crm.CrmException: Cannot delete 'Organization' with Value = (2519029f-ce0a-e111-957f-080027d9c5bd) in this State = (Enabled) from MSCRM_CONFIG database
       at Microsoft.Crm.Admin.AdminService.CrmOrganizationService.Delete(Guid organizationId)
       at Microsoft.Crm.Tools.Admin.ImportOrganizationInstaller.Import(Guid organizationId, String organizationUniqueName, String organizationFriendlyName, String sqlServerName, String databaseName, Uri reportServerUrl, String privilegedUserGroupName, String sqlAccessGroupName, String userGroupName, String reportingGroupName, String privilegedReportingGroupName, ICollection`1 users, MultipleTenancy multipleTenancy)
    04:59:18|  Error| Applying database updates to organization with name = OctaWareId=2519029f-ce0a-e111-957f-080027d9c5bd failed with Exception:
    System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Microsoft.Crm.BusinessEntities.CrmObjectNotFoundException: organization With Id = 2519029f-ce0a-e111-957f-080027d9c5bd Does Not Exist
       at Microsoft.Crm.BusinessEntities.BusinessProcessObject.Retrieve(BusinessEntityMoniker moniker, EntityExpression entityExpression, ExecutionContext context, Int32[] deletionCodes, Int32 languageCode)
       at Microsoft.Crm.BusinessEntities.BusinessProcessObject.Retrieve(BusinessEntityMoniker moniker, EntityExpression entityExpression, ExecutionContext context)
       at Microsoft.Crm.ObjectModel.OrganizationServiceInternal`1.Retrieve(BusinessEntityMoniker moniker, EntityExpression entityExpression, ExecutionContext context)
       at Microsoft.Crm.Caching.OrganizationSettingsCacheLoader.LoadCacheData(Guid key, ExecutionContext context)
       at Microsoft.Crm.Caching.ObjectModelCacheLoader`2.LoadCacheData(TKey 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.SE.CustomActions.FixReportSnapshotsAclAction.GetReportServer(IOrganizationContext context)
       at Microsoft.Crm.SE.CustomActions.FixReportSnapshotsAclAction.UpdateSnapshotsAcl(String action)
       --- End of inner exception stack trace ---
       at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
       at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
       at Microsoft.Crm.Setup.Database.DllMethodAction.Execute()
       at Microsoft.Crm.Setup.Database.DatabaseInstaller.ExecuteReleases(ReleaseCollection releases, Int32 currentProgress)
       at Microsoft.Crm.Setup.Database.DatabaseInstaller.installInternal()
       at Microsoft.Crm.Setup.Database.DatabaseInstaller.Install(Int32 languageCode, String configurationFilePath, Boolean upgradeDatabase)
       at Microsoft.Crm.Setup.Common.Update.DBUpdateDatabaseInstaller.ApplyDBUpdates(Guid orgId)
       at Microsoft.Crm.Tools.Admin.OrganizationController.SetState(Guid organizationId, OrganizationState organizationState)

    Thanks in Advance

    Shaikh Mohammad Sharique 
    Thursday, November 10, 2011 5:02 AM

Answers

  • Hi friends,

    I got the solution for my problem after googling. error was related to reports which was not access able in CRM during the importing organization then i deleted the reports from data base using query which was giving the GUIDs of reports in log file.

    To remove the reports from the database, delete them from the ReportBase table.
    Due to parent/child constraints, you will have to remove any child reports, so my SQL looked like this:


    --check report exists
    select * from reportbase where ReportId='e9c074ee-297b-de11-b6f5-005056ae24fb'
    --get any child reportIDs
    select reportid from reportbase where parentReportId='e9c074ee-297b-de11-b6f5-005056ae24fb'
    --delete first the child, then the main report
    delete from reportbase where ReportId='9A6BDB17-2A7B-DE11-B6F5-005056AE24FB'
    delete from reportbase where ReportId='e9c074ee-297b-de11-b6f5-005056ae24fb'

     

    Thanks & Regards

    Mohammad Sharique

     

    Thursday, November 24, 2011 5:41 AM