{"id":232975,"date":"2010-11-03T05:43:47","date_gmt":"2010-11-03T05:43:47","guid":{"rendered":"http:\/\/osmosee.wordpress.com\/?p=54"},"modified":"2024-02-02T04:57:07","modified_gmt":"2024-02-02T04:57:07","slug":"crm-organization-import","status":"publish","type":"post","link":"https:\/\/staging.osmosys.co\/uk\/crm-organization-import\/","title":{"rendered":"CRM Organization Import"},"content":{"rendered":"<div id=\"bsf_rt_marker\"><\/div><p>Recently we did a CRM Organization import where the SQL Database dump was provided by the client. Restoring the database and Importing it into CRM happened smoothly, but when we tried to access the new organization 404 &#8211; Not Found&#8217; error was displayed.<br \/>\nRestarted the machine as the database restoration and organization import took considerable time and CPU\/Memory. This time got an error as shown below:<\/p>\n<p><!--more--><\/p>\n<p><strong>ExecuteNonQuery requires the command to have a transaction when the connection assigned to the command is in a pending local transaction. The Transaction property of the command has not been initialized.<\/strong><\/p>\n<p>Checked the Microsoft Asynchronous Service, as it misbehaves some times. It is running normally, but restarted it just for the heck of it, but still got the same error.<br \/>\nChecked the Event Viewer for the cause and found the below:<\/p>\n<p><strong>error while processing organization 881538ba-5ae6-df11-a912-7071bc76bf3f. Exception: System.Data.SqlClient.SqlException: The SELECT permission was denied on the object &#8216;AsyncOperationBase&#8217;, database &#8216;****_MSCRM&#8217;, schema &#8216;dbo&#8217;.<br \/>\nThe UPDATE permission was denied on the object &#8216;AsyncOperationBase&#8217;, database &#8216;****_MSCRM&#8217;, schema &#8216;dbo&#8217;.<br \/>\nat System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)<br \/>\nat System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)<br \/>\nat System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)<br \/>\nat System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)<br \/>\nat System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)<br \/>\nat System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)<br \/>\nat System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)<br \/>\nat System.Data.SqlClient.SqlCommand.ExecuteNonQuery()<br \/>\nat Microsoft.Crm.CrmDbConnection.InternalExecuteNonQuery(IDbCommand command)<br \/>\nat Microsoft.Crm.CrmDbConnection.ExecuteNonQuery(IDbCommand command, Boolean impersonate)<br \/>\nat Microsoft.Crm.Asynchronous.DataAccessSharedBase.ExecuteSqlCommand(IDbCommand command, Nullable`1 expectedAffectedRecords)<br \/>\nat Microsoft.Crm.Asynchronous.QueueDataAccess.MoveSuspendedToReady()<br \/>\nat Microsoft.Crm.Asynchronous.QueueManager.b__1(IQueueDataAccess queueDataAccess)<br \/>\nat Microsoft.Crm.Asynchronous.QueueManager.ExecuteForAllOrganizations(OrganizationQueueDataAccessHandler handler)<br \/>\n<\/strong><\/p>\n<p>Above got us thinking and we found that the imported database came from a system that uses an alternative service account for CRM \/ Application Pool. Somehow the default user (network\\service) was stripped on the ***_MSCRM database.<\/p>\n<p>So opened the ORGANIZATION_MSCRM database in SQL Manager,<br \/>\nTreeviewed to Security -&gt; Users<\/p>\n<p>Then opened the database user NT AUTHORITY\\NETWORK SERVICE and checked role member dbowner.<br \/>\nReset the IIS and voila the problem is solved and we were able to access the imported CRM organization.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recently we did a CRM Organization import where the SQL Database dump was provided by the client. Restoring the database and Importing it into CRM happened smoothly, but when we tried to access the new organization 404 &#8211; Not Found&#8217; error was displayed. Restarted the machine as the database restoration and organization import took considerable [&hellip;]<\/p>\n","protected":false},"author":11,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","_lmt_disableupdate":"","_lmt_disable":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[39],"tags":[],"class_list":["post-232975","post","type-post","status-publish","format-standard","hentry","category-general"],"modified_by":null,"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/staging.osmosys.co\/uk\/wp-json\/wp\/v2\/posts\/232975","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/staging.osmosys.co\/uk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/staging.osmosys.co\/uk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/staging.osmosys.co\/uk\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/staging.osmosys.co\/uk\/wp-json\/wp\/v2\/comments?post=232975"}],"version-history":[{"count":0,"href":"https:\/\/staging.osmosys.co\/uk\/wp-json\/wp\/v2\/posts\/232975\/revisions"}],"wp:attachment":[{"href":"https:\/\/staging.osmosys.co\/uk\/wp-json\/wp\/v2\/media?parent=232975"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/staging.osmosys.co\/uk\/wp-json\/wp\/v2\/categories?post=232975"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/staging.osmosys.co\/uk\/wp-json\/wp\/v2\/tags?post=232975"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}