Quantcast
Channel: CRM Development forum
Viewing all articles
Browse latest Browse all 9244

"Create New Organization" failed to complete. CRM 2011 SDK

$
0
0

Hi

I am trying to create CRM 2011 organization with CRM SDK. The process is completed successfully. But when I see Organization state in Deployement Manager, its set as 'Failed'. in eventviewr I see the following exception.


Microsoft.Crm.CrmException: Create new Organization (Name=d6c6e82e-ccbd-4e2a-9a8c-f232979a6b40, Id=testorg5) failed with Exception: System.Exception: Action Microsoft.Crm.Tools.Admin.CreateDatabaseAction failed. ---> Microsoft.Crm.CrmException: Cannot find database data files path. Make sure the user running the build had sysadmin rights to the SQL server used for building the database. at Microsoft.Crm.Setup.Database.Helpers.GetSqlDBFilesPath(String sqlServer) at Microsoft.Crm.Setup.Database.DatabaseInstaller.GetSqlDBFilesPath() at Microsoft.Crm.Setup.Database.DatabaseInstaller.AttachDB(ReleaseInfo r) at Microsoft.Crm.Setup.Database.DatabaseInstaller.installInternal(Boolean isInstall) at Microsoft.Crm.Setup.Database.DatabaseInstaller.Install(Int32 languageCode, String configurationFilePath, Boolean upgradeDatabase, Boolean isInstall) at Microsoft.Crm.Tools.Admin.InstallDatabaseAction.Do(IDictionary parameters) at Microsoft.Crm.Setup.Common.CrmAction.ExecuteAction(CrmAction action, IDictionary parameters, Boolean undo) --- End of inner exception stack trace --- at Microsoft.Crm.Setup.Common.CrmAction.ExecuteAction(CrmAction action, IDictionary parameters, Boolean undo) at Microsoft.Crm.Setup.Common.Installer.Install(IDictionary stateSaver) at Microsoft.Crm.Tools.Admin.OrganizationOperation.Install(IDictionary stateSaver) at Microsoft.Crm.Tools.Admin.OrganizationCreator.Install(IDictionary stateSaver) at Microsoft.Crm.Tools.Admin.OrganizationOperation.Execute() at Microsoft.Crm.Tools.Admin.OrganizationCreator.Execute() at Microsoft.Crm.Tools.Admin.CreateOrganizationInstaller.Create(ICreateOrganizationInfo organizationInfo) ---> System.Exception: Action Microsoft.Crm.Tools.Admin.CreateDatabaseAction failed. ---> Microsoft.Crm.CrmException: Cannot find database data files path. Make sure the user running the build had sysadmin rights to the SQL server used for building the database. at Microsoft.Crm.Setup.Database.Helpers.GetSqlDBFilesPath(String sqlServer) at Microsoft.Crm.Setup.Database.DatabaseInstaller.GetSqlDBFilesPath() at Microsoft.Crm.Setup.Database.DatabaseInstaller.AttachDB(ReleaseInfo r) at Microsoft.Crm.Setup.Database.DatabaseInstaller.installInternal(Boolean isInstall) at Microsoft.Crm.Setup.Database.DatabaseInstaller.Install(Int32 languageCode, String configurationFilePath, Boolean upgradeDatabase, Boolean isInstall) at Microsoft.Crm.Tools.Admin.InstallDatabaseAction.Do(IDictionary parameters) at Microsoft.Crm.Setup.Common.CrmAction.ExecuteAction(CrmAction action, IDictionary parameters, Boolean undo) --- End of inner exception stack trace --- at Microsoft.Crm.Setup.Common.CrmAction.ExecuteAction(CrmAction action, IDictionary parameters, Boolean undo) at Microsoft.Crm.Setup.Common.Installer.Install(IDictionary stateSaver) at Microsoft.Crm.Tools.Admin.OrganizationOperation.Install(IDictionary stateSaver) at Microsoft.Crm.Tools.Admin.OrganizationCreator.Install(IDictionary stateSaver) at Microsoft.Crm.Tools.Admin.OrganizationOperation.Execute() at Microsoft.Crm.Tools.Admin.OrganizationCreator.Execute() at Microsoft.Crm.Tools.Admin.CreateOrganizationInstaller.Create(ICreateOrganizationInfo organizationInfo) --- End of inner exception stack trace --- at Microsoft.Crm.Tools.Admin.CreateOrganizationInstaller.Create(ICreateOrganizationInfo organizationInfo) at Microsoft.Xrm.Sdk.Deployment.QueuedOperationProcessor.ProcessingMethod()

Code is:

 System.Uri serviceuri = new System.Uri("http://crmserver:5555/XRMDeployment/2011/Deployment.svc");
            DeploymentServiceClient client = Microsoft.Xrm.Sdk.Deployment.Proxy.ProxyClientHelper.CreateClient(serviceuri);

            System.ServiceModel.Description.ClientCredentials credentials = new System.ServiceModel.Description.ClientCredentials();

            //using (DeploymentServiceClient client = new DeploymentServiceClient())
            // {              

            // Set properties for the new organization
            Organization organization = new Organization
            {
                BaseCurrencyCode = "USD",
                BaseCurrencyName = "US Dollar",
                BaseCurrencyPrecision = 2,
                BaseCurrencySymbol = "$",
                BaseLanguageCode = 1033,
                FriendlyName = "TestOrg6",
                UniqueName = "testorg6",
                SqlCollation = "Latin1_General_CI_AI",
                SqlServerName = "crmserver\\SQLSERVER",
                SrsUrl = "http://crm2011/ReportServer_SQLSERVER",
                SqmIsEnabled = true
            };

            organization.State = OrganizationState.Enabled;

            // Create a request for the deployment service
            BeginCreateOrganizationRequest request = new BeginCreateOrganizationRequest();
            request.Organization = organization;
            // Execute the request
            BeginCreateOrganizationResponse response = (BeginCreateOrganizationResponse)client.Execute(request);

I am running my test application as Administrator which has sysadmin right in SQL server. All CRM services are running with Administrator right. CRM App Pool users are also added in SQL server. You help will be appreciated.

Thanks


Rizwan Ahmed. Software Engineer - Microsoft Lync | Exchange | SharePoint | Blackberry Enterprise Server | .NET


Viewing all articles
Browse latest Browse all 9244

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>