<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>Performance</title>
        <link>http://blog.crmbuzz.net/category/9.aspx</link>
        <description>Performance</description>
        <language>en-US</language>
        <copyright>Abe Saldana</copyright>
        <managingEditor>abraham@CRMBuzz.net</managingEditor>
        <generator>Subtext Version 1.9.4.78</generator>
        <item>
            <title>How to's - Detach an E-mail from a Queue</title>
            <link>http://blog.crmbuzz.net/archive/2008/06/12/How-tos---How-to-Detach-an-E-mail-from-a.aspx</link>
            <description>&lt;p&gt;The E-mail to Case process one of the final steps is to make the e-mail not to display on the Queue, that is called detaching from the queue, this blog post is a follow up on one of the initial blog post on this new CrmBuzz URL, the original post was &lt;a href="http://blog.crmbuzz.net/articles/Testing-Article.aspx"&gt;How to Detach an Email from a Queue? Summary...&lt;/a&gt;, so finally after some replies and follow up e-mails and questions I got the time to put in the details for one of most requested line:&lt;/p&gt;  &lt;p&gt;returnStatus = emailDetach.EmailDetachFromQueue(EmailID, SourceQueueId);&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;The code snipped:  &lt;/p&gt;  &lt;div&gt;   &lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;     &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; EmailDetachFromQueue(Guid EmailID, Guid SourceQueueID)&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   3:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; returnvalue = &lt;span style="color: #0000ff"&gt;false&lt;/span&gt;;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   4:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;try&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   5:&lt;/span&gt;     {&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   6:&lt;/span&gt;  &lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   7:&lt;/span&gt;         DetachFromQueueEmailRequest detachEmail = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; DetachFromQueueEmailRequest();&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   8:&lt;/span&gt;         detachEmail.EmailId = EmailID;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   9:&lt;/span&gt;         detachEmail.QueueId = SourceQueueID;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  10:&lt;/span&gt;  &lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  11:&lt;/span&gt;         DetachFromQueueEmailResponse detachedEmailResponse = (DetachFromQueueEmailResponse)service.Execute(detachEmail);&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  12:&lt;/span&gt;  &lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  13:&lt;/span&gt;         returnvalue = &lt;span style="color: #0000ff"&gt;true&lt;/span&gt;;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  14:&lt;/span&gt;  &lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  15:&lt;/span&gt;     }&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  16:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;catch&lt;/span&gt; (System.Exception e)&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  17:&lt;/span&gt;     {&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  18:&lt;/span&gt;         returnvalue = &lt;span style="color: #0000ff"&gt;false&lt;/span&gt;;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  19:&lt;/span&gt;  &lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  20:&lt;/span&gt;     }&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  21:&lt;/span&gt;  &lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  22:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; returnvalue;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  23:&lt;/span&gt; }&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;The E-mail detach process will not give you too much information on the validity on the completion and you probably will need to validate making another call, so these are some of the steps for the e-mail to case (incident)&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Validate E-mail content is not Spam or Duplicate&lt;/li&gt;

  &lt;li&gt;Create new Contact with E-mail address information&lt;/li&gt;

  &lt;ol&gt;
    &lt;li&gt;Create new Account with E-mail address information &lt;/li&gt;

    &lt;li&gt;Relate new Account with new Contact&lt;/li&gt;
  &lt;/ol&gt;

  &lt;li&gt;Validate that E-mail is not relation to any Case (Incident)&lt;/li&gt;

  &lt;li&gt;Create new Case (Incident) with E-mail information&lt;/li&gt;

  &lt;li&gt;Detach E-mail from the Queue (Private or Public Queue)&lt;/li&gt;

  &lt;li&gt;Assign the new Case (Incident) to the User Private Queue (Incident Owner)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;So these are the most common steps for converting an E-mail to a Case, I will be working on a similar process for Spam e-mails on MS Dynamics CRM 4.0 but in this version I will be using the Workflow's capabilities, stay tuned for more details on the new workflow E-mail to Case process.&lt;/p&gt;

&lt;p&gt;Check the Articles soon you would find information related to SDK connectivity with CRM 4.0 On Premises and Online versions&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;Abe Saldaña&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.crmbuzz.net"&gt;CrmBuzz.net&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This all is undocumented and unsupported. Therefore you should only try these kinds of modifications if you feel comfortable working with this. 
  &lt;br /&gt;Everything here, though, is my personal opinion and is not read nor approved before being posted. No warranties or other guarantees will be offered as to the quality of the opinions or anything else offered here. &lt;/p&gt;&lt;img src="http://blog.crmbuzz.net/aggbug/25.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Abe Saldana</dc:creator>
            <guid>http://blog.crmbuzz.net/archive/2008/06/12/How-tos---How-to-Detach-an-E-mail-from-a.aspx</guid>
            <pubDate>Thu, 12 Jun 2008 21:50:18 GMT</pubDate>
            <wfw:comment>http://blog.crmbuzz.net/comments/25.aspx</wfw:comment>
            <comments>http://blog.crmbuzz.net/archive/2008/06/12/How-tos---How-to-Detach-an-E-mail-from-a.aspx#feedback</comments>
            <wfw:commentRss>http://blog.crmbuzz.net/comments/commentRss/25.aspx</wfw:commentRss>
            <trackback:ping>http://blog.crmbuzz.net/services/trackbacks/25.aspx</trackback:ping>
        </item>
        <item>
            <title>Purging rows on Princiapl Object Access</title>
            <link>http://blog.crmbuzz.net/archive/2007/05/07/Purging-rows-on-Princiapl-Object-Access.aspx</link>
            <description>&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Arial; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"&gt;[Disclaimer:All postings are provided "AS IS" with no warranties, and confer no rights.]&lt;br /&gt;
&lt;br /&gt;
Purging some tables on Crm is simple as calling the delete service and make sure that everything continues running properly, but when you have more than 10 million rows on one table (PrincipalObjectAccess) how do you will be able to take the delete process on stages?&lt;br /&gt;
&lt;br /&gt;
[MS Crm support response: There is an un-supported option that you could try if you want to get rid of all sharing that is currently setup in CRM. You could directly update the PrincipalObjectAccess table and set the AccessRightsMask and InheritedAccessRightsMask columns to 0. Then we have a deletion service that will go through and automatically clean up that table. This is not technically supported, but if you want to remove all sharing this could be an option that you could do.&lt;br /&gt;
&lt;br /&gt;
Ok that is awesome, but how to identify the rows that are not in use or ready to be deleted.&lt;br /&gt;
&lt;br /&gt;
This is one of the Sql scripts to get the total of rows ready to be deleted and terminated&lt;/span&gt;&lt;/p&gt;
&lt;div style="BORDER-RIGHT: black 1pt dashed; PADDING-RIGHT: 4pt; BORDER-TOP: black 1pt dashed; PADDING-LEFT: 4pt; BACKGROUND: #cccccc; PADDING-BOTTOM: 1pt; BORDER-LEFT: black 1pt dashed; PADDING-TOP: 1pt; BORDER-BOTTOM: black 1pt dashed; mso-element: para-border-div; mso-border-themecolor: text1; mso-border-alt: dot-dash black .75pt; mso-shading: windowtext; mso-pattern: gray-20 auto"&gt;
&lt;p class="CodeStyle"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;
&lt;p class="CodeStyle"&gt;declare @totalRows int&lt;br /&gt;
declare @ToDelete int&lt;br /&gt;
declare @ToDeleteMarked int&lt;br /&gt;
&lt;br /&gt;
SELECT @totalRows = count( * )&lt;br /&gt;
FROM PrincipalObjectAccess (nolock)&lt;br /&gt;
&lt;br /&gt;
SELECT @ToDelete= count( *) &lt;br /&gt;
FROM PrincipalObjectAccess (nolock)&lt;br /&gt;
where AccessRightsMask = 0&lt;br /&gt;
and InheritedAccessRightsMask &amp;gt; 0&lt;br /&gt;
&lt;br /&gt;
SELECT @ToDeleteMarked= count( *) &lt;br /&gt;
FROM PrincipalObjectAccess (nolock)&lt;br /&gt;
where AccessRightsMask = 0&lt;br /&gt;
and InheritedAccessRightsMask = 0&lt;br /&gt;
&lt;br /&gt;
Select @totalRows as TotalRows, &lt;br /&gt;
@ToDelete as ToDelete, &lt;br /&gt;
(@totalRows - @ToDelete) as RemainingRows, &lt;br /&gt;
@ToDeleteMarked as ToDeleteMarked&lt;span style="mso-tab-count: 1"&gt;  &lt;/span&gt;&lt;br style="mso-special-character: line-break" /&gt;
&lt;br style="mso-special-character: line-break" /&gt;
&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Arial; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Arial; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"&gt;Using the previous script will give you the totals only the following script is the one that will update your columns and marked the rows for deletion..&lt;br /&gt;
&lt;br /&gt;
[IMPORTANT: Make sure that you have SQL database backups before trying this and know that you may have to restore your databases if you run into issues. Also this can ONLY be done if you want to remove ALL sharing. There is not a way to leave some sharing intact. ]&lt;br style="mso-special-character: line-break" /&gt;
&lt;br style="mso-special-character: line-break" /&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;div style="BORDER-RIGHT: black 1pt dashed; PADDING-RIGHT: 4pt; BORDER-TOP: black 1pt dashed; PADDING-LEFT: 4pt; BACKGROUND: #cccccc; PADDING-BOTTOM: 1pt; BORDER-LEFT: black 1pt dashed; PADDING-TOP: 1pt; BORDER-BOTTOM: black 1pt dashed; mso-element: para-border-div; mso-border-themecolor: text1; mso-border-alt: dot-dash black .75pt; mso-shading: windowtext; mso-pattern: gray-20 auto"&gt;
&lt;p class="CodeStyle" style="BACKGROUND: #cccccc; mso-shading: windowtext; mso-pattern: gray-20 auto"&gt;&lt;span style="COLOR: #008a3e"&gt;SELECT&lt;/span&gt; top 500000 * &lt;br /&gt;
&lt;span style="COLOR: #008a3e"&gt;into&lt;/span&gt; #TempPOA &lt;span style="COLOR: #008a3e"&gt;FROM&lt;/span&gt; &lt;br /&gt;
&lt;span style="COLOR: #c00000"&gt;PrincipalObjectAccess&lt;/span&gt; (nolock)&lt;br /&gt;
&lt;span style="COLOR: #008a3e"&gt;where&lt;/span&gt; AccessRightsMask = 0 &lt;br /&gt;
and InheritedAccessRightsMask &amp;gt; 0&lt;br /&gt;
&lt;br /&gt;
&lt;span style="COLOR: #008a3e"&gt;update&lt;/span&gt; &lt;span style="COLOR: #c00000"&gt;PrincipalObjectAccess&lt;/span&gt; &lt;br /&gt;
&lt;span style="COLOR: #008a3e"&gt;set&lt;/span&gt; InheritedAccessRightsMask = 0&lt;br /&gt;
&lt;span style="COLOR: #008a3e"&gt;where&lt;/span&gt; rowguid in (&lt;span style="COLOR: #008a3e"&gt;Select&lt;/span&gt; rowguid &lt;span style="COLOR: #008a3e"&gt;from&lt;/span&gt; #tempPOA)&lt;br /&gt;
&lt;br /&gt;
drop table #TempPOA&lt;br style="mso-special-character: line-break" /&gt;
&lt;br style="mso-special-character: line-break" /&gt;
&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%"&gt;After finishing marking all the rows for deletion, now you can run the delete service, stop the service (not required) then run the following dos command&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div style="BORDER-RIGHT: black 1pt dashed; PADDING-RIGHT: 4pt; BORDER-TOP: black 1pt dashed; PADDING-LEFT: 4pt; BACKGROUND: #cccccc; PADDING-BOTTOM: 1pt; BORDER-LEFT: black 1pt dashed; PADDING-TOP: 1pt; BORDER-BOTTOM: black 1pt dashed; mso-element: para-border-div; mso-border-themecolor: text1; mso-border-alt: dot-dash black .75pt; mso-shading: windowtext; mso-pattern: gray-20 auto"&gt;
&lt;p class="CodeStyle"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="CodeStyle"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;C:\Program Files\Microsoft CRM\Server\bin\&lt;span style="COLOR: #c00000"&gt;CrmDeletionService.exe&lt;/span&gt; &lt;span style="COLOR: #008a3e"&gt;-runonce&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
[NOTE: -runonce = Clean up database right now.] &lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;we schedule the deletion service to run only once a day, on a business downtime, this process will keep your tables purged and on optimal conditions&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;
regards, &lt;br /&gt;
Abe Saldaña&lt;/p&gt;
&lt;p&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;
&lt;img src="http://blog.crmbuzz.net/aggbug/3.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Abe Saldana</dc:creator>
            <guid>http://blog.crmbuzz.net/archive/2007/05/07/Purging-rows-on-Princiapl-Object-Access.aspx</guid>
            <pubDate>Tue, 08 May 2007 03:23:24 GMT</pubDate>
            <wfw:comment>http://blog.crmbuzz.net/comments/3.aspx</wfw:comment>
            <comments>http://blog.crmbuzz.net/archive/2007/05/07/Purging-rows-on-Princiapl-Object-Access.aspx#feedback</comments>
            <wfw:commentRss>http://blog.crmbuzz.net/comments/commentRss/3.aspx</wfw:commentRss>
            <trackback:ping>http://blog.crmbuzz.net/services/trackbacks/3.aspx</trackback:ping>
        </item>
    </channel>
</rss>