Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9131553
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T08:09:35+00:00 2026-06-17T08:09:35+00:00

Are there some pitfalls when I import organization with OptimizeOrgImport=1? How this optimization works

  • 0

Are there some pitfalls when I import organization with OptimizeOrgImport=1? How this optimization works internally?

Use case:

  1. Import organization, say “test”. (works fine)
  2. Import another copy of this organization, say “test2” (fails when updating users)
  3. Set OptimizeOrgImport=0 and import “test2” (fine again!)

Log of the step 2:

14:46:22|   Info| Import Organization (test2)
14:46:22|   Info| Update Organization...
14:48:20|   Info| Update Users...
14:48:44|  Error| Import Organization (Name=test2, Id=5b6bf441-650c-e211-b194-00185d111162) 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)

Thank you in adavance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T08:09:36+00:00Added an answer on June 17, 2026 at 8:09 am

    With the OptimizeOrgImport setting set to 1 you have to take following into account:

    When you use the registry entry
    OptimizeOrgImport
    and have the value of this entry set to 1, you cannot import the same organization database more than one time. If you want to import the same organization database more than one time, you must do one of the following things:

    • Set OptimizeOrgImport = 0 and use the normal import process.
    • Delete the organization, and then import the organization again.

    See http://support.microsoft.com/kb/977867/en

    Each organization database contains a table [dbo].[OrganizationBase]. One of its columns is OrganizationId. This GUID will identify the organization.

    If you make a backup of the Organization database on the CRM Environment Prod and restore it on the CRM Environment Test, it will keep its ID. If you later restore test2 it has the same ID as the one you have imported earlier.

    OptimizeOrgImport was introduced with Rollup 8 and introduced a new import process. I assume that the old import process (OptimizeOrgImport = 0) will also change the ID of the organization. Therefore you won’t have the issue with the old import process.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there some way to use Tuning Advisor for SQL Express? Is there some
Is there some event I can use to tell when the SelectedIndices property changes
Is there some free and easy to use 3D library for iOS (and Android)
Is there some alternative IDE for developing for Adruino I tried to use Eclipe
Are there any pitfalls to code like this? var Foo = function() { this.bar
Are there some good resources tutorials or anyone has tried to implement a Capcha
Is there some way to define an abstract type as a parameter in an
Is there some kind of software that I can feed uploaded images to and
Is there some crucial difference in writing the registry class in MVC with magic
Is there some regex that can be passed to re-seq such that it will

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.