Thinking Multi Tenant With CRM 4 (Titan)
Thursday, October 11, 2007 at 11:53PM Among all the changes in CRM 4, understanding the multi tenant support in is important. Before we jump into the multi tenant features, lets take a quick look at CRM 3.
In CRM3, when we installed CRM on a web server that web server was providing support for a single CRM organization. Behind the scenes if we peered into the database server we would find that setup had created two databases to support or organization. One contained the Metadata and the other contained the organization data. Several configuration options were stored on disk on the web server for that organization. If we wanted to install a second or third organization that meant we had to setup another web server and go through the complete installation again.
CRM 4's Multi Tenant capability is designed to allow one install to support multiple organizations. To accomplish this a number of fundamental changes to the platform had to happen.
First, our two databases have been combined into a single database per organization. You will find inside the organization database a set of tables that represent the Metadata that used to be part of the separate database. Each organization uses the naming construct of orgname_MSCRM. The "deployment" or install also creates a database that is shared by the install with information about all the organizations that have been provisioned. This central database is named MSCRM_Config. Probably one of the most important things to understand is the fact that each organization has its own database, and there is no sharing of data among the organizations. This high level of isolation will be a plus or minus depending on your specific scenario and your isolation requirements. No doubt there will be solutions or customizations done to move data between organizations, but the key is to understand that the default is complete organization isolation.
From an installation point of view, if you go through a standard install (not custom, it doesn't provision the default org), you will provision your first organization as part of that setup. Subsequent creation of additional organizations is handled using Deployment Manager -> Organizations - New Organization menu option - These additional organizations get created pretty quickly.
You may also notice Deployment Manager now has an Import Organization - you can read more about that here.
Another change you will find is around settings, in CRM 4 a number of the system settings have moved from web config or the registry to inside the CRM database and exposed by the System Settings pages. As you can see in the following example, these include things like level of ISV customizations and Application mode among others...
Another change you will notice pretty quick is the fact that the URL to access site will now have the organization name as part of the url e.g http://mycrmserver/myorgname/ The default (first org) can be accessed using the root without the org name but any additional will require specification of the orgname as part of the URL.
From a developer point of view there are also a number of things to keep in mind. First, its important to understand that each organization has its own set of Metadata including all customizations. So that means that if you need a custom entity in all organizations you need to either create it in each or import it into each organization.
Developers will also notice that if they are using the new 2007 web service end point they will need to provide the organization name to indicate which organization they are working with. Now is also a pretty good time to make sure that you understand that if you use the 2006 web service end point it does not allow you to access any organization other than the default organization. If you are building new code for the platform you will really want to target using the new 2007 web service end point.
To help with discovery needs developers can use the new Discovery web service to determine what organizations are provisioned and what the Web Service and Metadata Service URLs are.
Stay tuned for more posts on things like the discovery service and multi tenant information.

Reader Comments (2)
-----
23:48:47| Error| Create new Organization (Name=CRMVPC2, Id=d0966a95-86a8-dc11-9bf0-0003ff3f6dca) failed with Exception:
Microsoft.Crm.CrmException: Configure Organization Utility cannot run on a Domain Controller machine.
at Microsoft.Crm.Setup.Server.Utility.NewOrgUtility.OrganizationConfigureGroups(String languageCode, String privilegedUserGroup, String sqlAccessGroup, String userGroup, String reportingGroup, String privilegedReportingGroup, Guid organizationId)
at Microsoft.Crm.Setup.Server.Utility.NewOrgUtility.ConfigureOrganization(String organizationId, String organizationName, String userAccountName, String userFirstName, String userLastName, String userEmail, String languageCode, String privilegedUserGroup, String sqlAccessGroup, String userGroup, String reportingGroup, String privilegedReportingGroup, Boolean grantNetworkServiceAccess, Boolean autoGroupManagement, String importFileLocation, Boolean sqmOption)
at Microsoft.Crm.Tools.Admin.CreateOrganizationInstaller.Create(Guid organizationId, String organizationUniqueName, String organizationFriendlyName, String baseCurrencyCode, String baseCurrencyName, String baseCurrencySymbol, String initialUserDomainName, String initialUserFirstName, String initialUserLastName, String sqlServerName, Uri reportServerUrl, String privilegedUserGroupName, String sqlAccessGroupName, String userGroupName, String reportingGroupName, String privilegedReportingGroupName, String applicationPath, String languageId, Boolean sqmOption, String organizationCollation, MultipleTenancy multipleTenancy)
23:48:47|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.