locked
Organization Import - The connection's current state is closed RRS feed

  • Question

  • Hi,

    This seems to be an ongoing problem with few that have found a resolution. Rollup 7 to Rollup 7.  I've done the basic's and updated the
    OLEDBTimeout(86400)  and ExtendedTimeout(1000000) registry entries.

    By chance today I get emailed about this hotfix, however seems it has been recalled by Microsoft? I've had multiple redeployments in 3.0 with very few problems, but after 7 rollups, somewhat concerned about the complexity to perform a simple restore.

    This is the article I received:

    200356   Microsoft Dynamics CRM 4.0 - Importing Organization fails with "The connection's state is closed"

    And the Error.

    20:25:02|  Error| Import Organization (Name=VTestLtd, Id=5cae9612-edce-de11-a674-080027a6ea90) 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)
    20:25:02|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.

    Help appreciated,
    Karlo
    Karlo Swart - http://www.ver206.com
    Wednesday, November 11, 2009 6:46 PM

Answers

  • Success.

    I manually deleted every custom report from the import database and did some serious praying. I'm not eliminating divine intervention as the actual reason it worked (as I'll probably need it again), but I'll touch on what I 'think' solved the problem from a MS CRM perspective.

    In my case the error occurred towards the end of adding the reports, so I decided to remove all custom reports.

    Delete from Reportbase
    Delete from ReportCategoryBase
    + Delete from ReportVisibilityBase

    where reportid = '[insert guid]'

    I managed to retrieve the custom reports through the 'IsPersonal' flag in the reportbase table, however there were still two (perhaps 3.0) custom reports without this flag.

    Import succeeded. Note I think there may be an issue with versions of the update rollup 7 not being checked across migrations as the originally migrated version may not have had the rollup 7 applied, nor the destination server. There was no warning like when the MS CRM update rollup's differ from source to target.

    Tough week, day 4 of a routine redeployment ;)

    Stuart Brown managed to resolve his problem in a similar way, so there might be something to it.

    http://social.microsoft.com/Forums/en-US/crmdeployment/thread/53c616e8-c454-48ec-9962-759071a82358

    Hope it helped and thanks for the suggestions Alex.

    Karlo











    Karlo Swart - http://www.ver206.com
    • Marked as answer by Karlo Swart Wednesday, November 11, 2009 10:22 PM
    Wednesday, November 11, 2009 10:21 PM

All replies

  • Hi Karlo,

    Is the org you are importing very large - in the tens of GBs ?

    Here's the KB that appears to be recalled:
    http://www.mskbarticles.com/index.php?kb=2003564

    Check that you have all the dot net updates and SPs on the server. 

    Alex Fagundes - www.PowerObjects.com
    Wednesday, November 11, 2009 6:59 PM
  • Hi Alex,

    Thanks for the reply and KB article.

    Org DB is 800MB. I've a later version of the problematic .dll and registry updated to all specified values. I guess next is a platform trace, though not sure I'll get any more information.

    Thanks,
    Karlo



    Karlo Swart - http://www.ver206.com
    Wednesday, November 11, 2009 9:36 PM
  • Success.

    I manually deleted every custom report from the import database and did some serious praying. I'm not eliminating divine intervention as the actual reason it worked (as I'll probably need it again), but I'll touch on what I 'think' solved the problem from a MS CRM perspective.

    In my case the error occurred towards the end of adding the reports, so I decided to remove all custom reports.

    Delete from Reportbase
    Delete from ReportCategoryBase
    + Delete from ReportVisibilityBase

    where reportid = '[insert guid]'

    I managed to retrieve the custom reports through the 'IsPersonal' flag in the reportbase table, however there were still two (perhaps 3.0) custom reports without this flag.

    Import succeeded. Note I think there may be an issue with versions of the update rollup 7 not being checked across migrations as the originally migrated version may not have had the rollup 7 applied, nor the destination server. There was no warning like when the MS CRM update rollup's differ from source to target.

    Tough week, day 4 of a routine redeployment ;)

    Stuart Brown managed to resolve his problem in a similar way, so there might be something to it.

    http://social.microsoft.com/Forums/en-US/crmdeployment/thread/53c616e8-c454-48ec-9962-759071a82358

    Hope it helped and thanks for the suggestions Alex.

    Karlo











    Karlo Swart - http://www.ver206.com
    • Marked as answer by Karlo Swart Wednesday, November 11, 2009 10:22 PM
    Wednesday, November 11, 2009 10:21 PM